Permalink
Browse files

MDL-56767 block_login: add bootstrap markup

Remove existing overrides forcing the markup off
  • Loading branch information...
danpoltawski committed Nov 15, 2016
1 parent b4d6669 commit 1efacd2b35051e0c447def8bf7cbd2818d97f52c
@@ -78,20 +78,24 @@ function get_content () {
$this->content->text .= "\n".'<form class="loginform" id="login" method="post" action="'.get_login_url().'" '.$autocomplete.'>';
$this->content->text .= '<div class="c1 fld username"><label for="login_username">'.$strusername.'</label>';
$this->content->text .= '<input type="text" name="username" id="login_username" value="'.s($username).'" /></div>';
$this->content->text .= '<div class="form-group"><label for="login_username">'.$strusername.'</label>';
$this->content->text .= '<input type="text" name="username" id="login_username" class="form-control" value="'.s($username).'" /></div>';
$this->content->text .= '<div class="c1 fld password"><label for="login_password">'.get_string('password').'</label>';
$this->content->text .= '<div class="form-group"><label for="login_password">'.get_string('password').'</label>';
$this->content->text .= '<input type="password" name="password" id="login_password" value="" '.$autocomplete.' /></div>';
$this->content->text .= '<input type="password" name="password" id="login_password" class="form-control" value="" '.$autocomplete.' /></div>';
if (isset($CFG->rememberusername) and $CFG->rememberusername == 2) {
$checked = $username ? 'checked="checked"' : '';
$this->content->text .= '<div class="c1 rememberusername"><input type="checkbox" name="rememberusername" id="rememberusername" value="1" '.$checked.'/>';
$this->content->text .= ' <label for="rememberusername">'.get_string('rememberusername', 'admin').'</label></div>';
$this->content->text .= '<div class="form-check-inline">';
$this->content->text .= '<input type="checkbox" name="rememberusername" id="rememberusername" class="form-check-input" value="1" '.$checked.'/>';
$this->content->text .= ' <label for="rememberusername" class="form-check-label">'.get_string('rememberusername', 'admin').'</label>';
$this->content->text .= '</div>';
}
$this->content->text .= '<div class="c1 btn"><input type="submit" value="'.get_string('login').'" /></div>';
$this->content->text .= '<div class="form-group">';
$this->content->text .= '<input type="submit" class="btn btn-primary" value="'.get_string('login').'" />';
$this->content->text .= '</div>';
$this->content->text .= "</form>\n";
@@ -100,37 +100,6 @@ fieldset.hidden {
visibility: inherit;
}
/* .controls vs .controls
*
* in expanding course list, can be fixed in renderer though
*/
/* .btn vs .btn
*
* links, inputs and buttons are commonly styled with .btn in
* bootstrap but it seems that some buttons in Moodle are
* wrapped in div.btn e.g. the login block's "login" button
*/
div.c1.btn {
display: block;
padding: 0;
margin-bottom: 0;
font-size: inherit;
line-height: inherit;
text-align: inherit;
cursor: default;
color: inherit;
text-shadow: inherit;
background-color: inherit;
background-image: none;
background-repeat: no-repeat;
border: none;
border-radius: 0;
box-shadow: none;
}
/* .container vs .container
*
* bootstrap uses .container to set the width of the layout at 960px or so, Moodle uses it
@@ -100,37 +100,6 @@ fieldset.hidden {
visibility: inherit;
}
/* .controls vs .controls
*
* in expanding course list, can be fixed in renderer though
*/
/* .btn vs .btn
*
* links, inputs and buttons are commonly styled with .btn in
* bootstrap but it seems that some buttons in Moodle are
* wrapped in div.btn e.g. the login block's "login" button
*/
div.c1.btn {
display: block;
padding: 0;
margin-bottom: 0;
font-size: inherit;
line-height: inherit;
text-align: inherit;
cursor: default;
color: inherit;
text-shadow: inherit;
background-color: inherit;
background-image: none;
background-repeat: no-repeat;
border: none;
border-radius: 0;
box-shadow: none;
}
/* .container vs .container
*
* bootstrap uses .container to set the width of the layout at 960px or so, Moodle uses it
@@ -13506,33 +13506,6 @@ fieldset.hidden {
display: inherit;
visibility: inherit;
}
/* .controls vs .controls
*
* in expanding course list, can be fixed in renderer though
*/
/* .btn vs .btn
*
* links, inputs and buttons are commonly styled with .btn in
* bootstrap but it seems that some buttons in Moodle are
* wrapped in div.btn e.g. the login block's "login" button
*/
div.c1.btn {
display: block;
padding: 0;
margin-bottom: 0;
font-size: inherit;
line-height: inherit;
text-align: inherit;
cursor: default;
color: inherit;
text-shadow: inherit;
background-color: inherit;
background-image: none;
background-repeat: no-repeat;
border: none;
border-radius: 0;
box-shadow: none;
}
/* .container vs .container
*
* bootstrap uses .container to set the width of the layout at 960px or so, Moodle uses it

0 comments on commit 1efacd2

Please sign in to comment.