Finished #485 and worked out bugs: password fields always update, added margins, fixed Chrome width bug, wrapped checkbox in label element
This commit is contained in:
parent
9f264942d8
commit
dab1d70280
@ -251,6 +251,11 @@ textarea#comment_content {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#password_boolean {
|
||||
margin-top: 4px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
/* comments */
|
||||
|
||||
.comment_author {
|
||||
|
@ -22,7 +22,7 @@
|
||||
{% block mediagoblin_head %}
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#password").after('<input type="text" value="" name="password_clear" id="password_clear" /><input type="checkbox" id="password_boolean" />Show password');
|
||||
$("#password").after('<input type="text" value="" name="password_clear" id="password_clear" /><label><input type="checkbox" id="password_boolean" />Show password</label>');
|
||||
$('#password_clear').hide();
|
||||
$('#password_boolean').click(function(){
|
||||
if($('#password_boolean').prop("checked")) {
|
||||
@ -35,6 +35,10 @@
|
||||
$('#password').show();
|
||||
};
|
||||
});
|
||||
$('#password,#password_clear').keyup(function(){
|
||||
$('#password').val($(this).val());
|
||||
$('#password_clear').val($(this).val());
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock mediagoblin_head %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user