Commit d5437711 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Made the index page build its own form, since it is beginning to become too

much different from the normal auth login form. Made it also not try to
validate the form, since that's handled by the auth stuff.
parent b868e5ff
......@@ -39,8 +39,48 @@ if (!get_config('installed')) {
// this, we can guarantee whether the user is logged in or not for this page.
if (!$SESSION->is_logged_in()) {
require_once('form.php');
$form = auth_get_login_form();
$form['renderer'] = 'div';
$form = array(
'name' => 'login',
'method' => 'post',
'action' => '',
'renderer' => 'div',
'submit' => false,
'elements' => array(
'login' => array(
'type' => 'fieldset',
'legend' => get_string('login'),
'elements' => array(
'login_username' => array(
'type' => 'text',
'title' => get_string('username'),
'description' => get_string('usernamedesc'),
'help' => get_string('usernamehelp'),
'rules' => array(
'required' => true
)
),
'login_password' => array(
'type' => 'password',
'title' => get_string('password'),
'description' => get_string('passworddesc'),
'help' => get_string('passwordhelp'),
'value' => '',
'rules' => array(
'required' => true
)
)
)
),
'submit' => array(
'type' => 'submit',
'value' => get_string('login')
),
'register' => array(
'value' => '<div><a href="' . get_config('wwwroot') . 'register.php">' . get_string('register') . '</a></div>'
)
)
);
$login_form = form($form);
$pagename = 'loggedouthome';
}
......
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