Merge branch 'wip-MDL-24355-MOODLE_19_STABLE' of git://github.com/andyjdavis/moodle...
[moodle.git] / auth / shibboleth / index_form.html
blob4a658830387362804efd7add6fcdcbdda4c15898
1 <?php
2 $config = get_config('auth/shibboleth');
4 if ($show_instructions) {
5 $columns = 'twocolumns';
6 } else {
7 $columns = 'onecolumn';
9 ?>
10 <div class="loginbox clearfix <?php echo $columns ?>">
11 <div class="loginpanel">
12 <!--<h2><?php print_string("returningtosite") ?></h2>-->
14 <h2><?php
15 if (isset($config->login_name) && !empty($config->login_name)){
16 echo $config->login_name;
17 } else {
18 print_string("auth_shibboleth_login_long", "auth");
20 ?></h2>
21 <div class="subcontent loginsub">
22 <div class="desc">
23 <?php
24 if (!empty($errormsg)) {
25 echo '<div class="loginerrors">';
26 formerr($errormsg);
27 echo '</div>';
31 <div class="guestsub">
32 <p><?php print_string("auth_shibboleth_select_organization", "auth"); ?></p>
33 <form action="login.php" method="post" id="guestlogin">
34 <select name="idp">
35 <option value="-" ><?php print_string("auth_shibboleth_select_member", "auth"); ?></option>
36 <?php
37 print_idp_list();
39 </select><p><input type="submit" value="<?php print_string("select"); ?>" accesskey="s" /></p>
40 </form>
41 <p>
42 <?php
43 print_string("auth_shibboleth_contact_administrator", "auth");
44 echo '<a href="mailto:'.get_admin()->email.'"> Moodle Administrator</a>.';
46 </p>
47 </div>
48 </div>
49 </div>
51 <?php if ($CFG->guestloginbutton) { ?>
52 <div class="subcontent guestsub">
53 <div class="desc">
54 <?php print_string("someallowguest") ?>
55 </div>
56 <form action="../../login/index.php" method="post" id="guestlogin">
57 <div class="guestform">
58 <input type="hidden" name="username" value="guest" />
59 <input type="hidden" name="password" value="guest" />
60 <input type="hidden" name="testcookies" value="1" />
61 <input type="submit" value="<?php print_string("loginguest") ?>" />
62 </div>
63 </form>
64 </div>
65 <?php } ?>
66 </div>
69 <?php if ($show_instructions) { ?>
70 <div class="signuppanel">
71 <h2><?php print_string("firsttime") ?></h2>
72 <div class="subcontent">
73 <?php if (is_enabled_auth('none')) { // instructions override the rest for security reasons
74 print_string("loginstepsnone");
75 } else if ($CFG->registerauth == 'email') {
76 if (!empty($CFG->auth_instructions)) {
77 echo format_text($CFG->auth_instructions);
78 } else {
79 print_string("loginsteps", "", "signup.php");
80 } ?>
81 <div class="signupform">
82 <form action="../../login/signup.php" method="get" id="signup">
83 <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
84 </form>
85 </div>
86 <?php } else if (!empty($CFG->registerauth)) {
87 echo format_text($CFG->auth_instructions); ?>
88 <div class="signupform">
89 <form action="../../login/signup.php" method="get" id="signup">
90 <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
91 </form>
92 </div>
93 <?php } else {
94 echo format_text($CFG->auth_instructions);
95 } ?>
96 </div>
97 </div>
98 <?php } ?>
99 </div>