Commit 547d4209 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie

Fixed the transient login form

parent de92700b
......@@ -397,40 +397,33 @@ function auth_get_login_form() {
}
$elements = array(
'login' => array(
'type' => 'fieldset',
'legend' => get_string('login'),
'elements' => array(
'login_username' => array(
'type' => 'text',
'title' => get_string('username') . ':',
'description' => get_string('usernamedescription'),
'rules' => array(
'required' => true
)
),
'login_password' => array(
'type' => 'password',
'title' => get_string('password') . ':',
'description' => get_string('passworddescription'),
'value' => '',
'rules' => array(
'required' => true
)
),
'login_institution' => array(
'type' => 'select',
'title' => get_string('institution'). ':',
'defaultvalue' => $defaultinstitution,
'options' => $institutions,
'rules' => array(
'required' => true
),
'ignore' => count($institutions) == 1
)
'login_username' => array(
'type' => 'text',
'title' => get_string('username') . ':',
'description' => get_string('usernamedescription'),
'rules' => array(
'required' => true
)
),
'login_password' => array(
'type' => 'password',
'title' => get_string('password') . ':',
'description' => get_string('passworddescription'),
'value' => '',
'rules' => array(
'required' => true
)
),
'login_institution' => array(
'type' => 'select',
'title' => get_string('institution'). ':',
'defaultvalue' => $defaultinstitution,
'options' => $institutions,
'rules' => array(
'required' => true
),
'ignore' => count($institutions) == 1
),
'submit' => array(
'type' => 'submit',
'value' => get_string('login')
......@@ -700,6 +693,9 @@ function auth_handle_account_expiries() {
}
function auth_generate_login_form() {
if (!get_config('installed')) {
return;
}
require_once('pieforms/pieform.php');
$institutions = get_records_menu('institution', '', '', 'name, displayname');
$defaultinstitution = get_cookie('institution');
......
......@@ -671,40 +671,37 @@ div.sidebar p {
/* LOGIN FOR COLUMN LEFT BEGINS */
.maincontent #loginbox {
.maincontent #loginform_container {
margin-top: 10px;
padding: 0;
border: 1px solid #d4d1c0;
border: 1px solid #d4d1c0;
}
.maincontent #loginbox fieldset {
border: none;
padding: 0 5px 0 5px;
margin: 0 5px 0 5px;
.maincontent #loginform_container table {
border: 0;
}
.maincontent #loginform_container td,
.maincontent #loginform_container th {
background-color: #eef4da;
}
.maincontent #login legend {
margin: 0;
padding: 0;
display: none;
.maincontent #loginform_container {
padding: 0 5px 0 5px;
}
.maincontent #login th {
.maincontent #loginform_container th {
margin: 0;
padding: 0;
padding: 2px 0 0 7px;
}
.maincontent #login td {
.maincontent #loginform_container td {
margin: 0;
padding: 0;
}
.maincontent #login .description {
font-size: 9px;
color: #7e7e7e;
padding: 2px 0 0 7px;
}
.maincontent #login_submit_container {
font-size: 9px;
display: inline;
}
.maincontent #login_submit_container td {
background-color: white;
}
.maincontent #login_submit {
margin: 5px 0 0 12px;
margin: 5px 0 0 0;
}
/* LOGIN FOR COLUMN LEFT ENDS */
......
......@@ -3,7 +3,7 @@
{include file="columnfullstart.tpl"}
<h2>{$loginmessage}</h2>
<div id="loginbox"><noscript><p>{str tag="javascriptnotenabled"}</p></noscript>
<div id="loginform_container"><noscript><p>{str tag="javascriptnotenabled"}</p></noscript>
{$login_form}
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment