Bagaimana cara untuk mematikan autocomplete login form di Moodle? Karena tidak ada fitur Administrator untuk mematikannya, terpaksa Anda harus melakukan hard code. Ada 2 file yang perlu Anda rubah.
- Buka file di folder \blocks\login\blocks_login.php, kemudian edit file tersebut.
$this->content->text .= '<div class="form-group">'; $this->content->text .= '<label for="login_username">'.$strusername.'</label>'; $this->content->text .= '<input type="text" name="username" id="login_username" '; $this->content->text .= ' class="form-control" value="'.s($username).'" autocomplete="username"/></div>';
menjadi
$this->content->text .= '<div class="form-group">'; $this->content->text .= '<label for="login_username">'.$strusername.'</label>'; $this->content->text .= '<input type="text" name="username" id="login_username" '; $this->content->text .= ' class="form-control" value="'.s($username).'" autocomplete="off"/></div>';
- Buka file di folder \lib\templates\loginform.mustache, kemudian edit file tersebut.
<input type="text" name="username" id="username" {{! !}}class="form-control form-control-lg" {{! !}}value="{{username}}" {{! !}}placeholder="{{^canloginbyemail}}{{#cleanstr}}username{{/cleanstr}}{{/canloginbyemail}}{{! !}}{{#canloginbyemail}}{{#cleanstr}}usernameemail{{/cleanstr}}{{/canloginbyemail}}" {{! !}}autocomplete="username">
menjadi
<input type="text" name="username" id="username" {{! !}}class="form-control form-control-lg" {{! !}}value="{{username}}" {{! !}}placeholder="{{^canloginbyemail}}{{#cleanstr}}username{{/cleanstr}}{{/canloginbyemail}}{{! !}}{{#canloginbyemail}}{{#cleanstr}}usernameemail{{/cleanstr}}{{/canloginbyemail}}" {{! !}}autocomplete="off">
Post a Comment