public static function sign_up_sign_in($url) { // TODO: add sign in as guest. $dropdown_content = array('class' => 'dropdown-menu', 'style' => 'padding: 15px; padding-bottom: 0px;'); $form = array('method' => 'post', 'action' => $url, 'accept-charset' => 'UTF-8'); $username = array('type' => 'text', 'placeholder' => 'Username', 'id' => 'username', 'name' => 'username'); $password = array('type' => 'password', 'placeholder' => 'Password', 'id' => 'password', 'name' => 'password'); $submit = array('value' => 'Sign In', 'class' => 'btn btn-primary btn-block', 'id' => 'sign-in'); return html::ul('nav pull-right', html::li(html::a(new moodle_url('/login/signup.php'), 'Sign Up')) . bootstrap::list_divider() . bootstrap::dropdown('Sign In', html::div($dropdown_content, html::form($form, html::input($username) . html::input($password) . html::checkbox('rememberusername', 'Remember username') . html::submit($submit))))); }