mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-22 11:59:33 +00:00
added a checkbox to make the password visible
This commit is contained in:
parent
76f9d087c9
commit
f35ab6a3b4
@ -98,6 +98,11 @@ class ConfigureForm(forms.Form):
|
||||
help_text=_('You should have been requested to select a password \
|
||||
when you created the account.'))
|
||||
|
||||
showpw = forms.BooleanField(label=_('show password'),
|
||||
required=False,
|
||||
widget=forms.CheckboxInput
|
||||
(attrs={'onclick': 'show_pass();'}))
|
||||
|
||||
dynamicdns_ipurl = TrimmedCharField(
|
||||
label=_('IP check URL'),
|
||||
required=False,
|
||||
|
||||
@ -30,5 +30,16 @@
|
||||
<input type="submit" class="btn btn-primary btn-md" value="Update setup"/>
|
||||
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block page_js %}
|
||||
<script type="text/javascript">
|
||||
function show_pass()
|
||||
{
|
||||
if(document.getElementById('id_dynamicdns-showpw').checked){
|
||||
document.getElementById("id_dynamicdns-dynamicdns_secret").type='text';}
|
||||
else
|
||||
document.getElementById("id_dynamicdns-dynamicdns_secret").type='password';
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user