-
Notifications
You must be signed in to change notification settings - Fork 2k
/
edit_user_form.html
36 lines (24 loc) · 1.84 KB
/
edit_user_form.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{% import 'macros/form.html' as form %}
<form class="dataset-form form-horizontal" method="post" action="{{ action }}">
{{ form.errors(error_summary) }}
<fieldset>
<legend>{{ _('Change your details') }}</legend>
{{ form.input('name', label=_('Username'), id='field-username', value=data.name, error=errors.name, classes=['control-medium']) }}
{{ form.input('fullname', label=_('Full name'), id='field-fullname', value=data.fullname, error=errors.fullname, placeholder=_('eg. Joe Bloggs'), classes=['control-medium']) }}
{{ form.input('email', label=_('Email'), id='field-email', type='email', value=data.email, error=errors.email, placeholder=_('eg. joe@example.com'), classes=['control-medium']) }}
{{ form.markdown('about', label=_('About'), id='field-about', value=data.about, error=errors.about, placeholder=_('A little information about yourself')) }}
{% if c.show_email_notifications %}
{% call form.checkbox('email_notifications', label=_('Subscribe to activity notification emails'), id='field-email-notifications', value=True, checked=c.userobj.email_notifications) %}
{{ form.help(_('Whenever there\'s a new activity on the site related to a thing that you follow you\'ll get a notification email'), classes=['info-help-tight']) }}
{% endcall %}
{% endif %}
</fieldset>
<fieldset>
<legend>{{ _('Change your password') }}</legend>
{{ form.input('password1', label=_('Password'), id='field-password', value=data.password1, error=errors.password1, classes=['control-medium']) }}
{{ form.input('password2', label=_('Confirm Password'), id='field-password-confirm', value=data.password2, error=errors.password2, classes=['control-medium']) }}
</fieldset>
<div class="form-actions">
<button class="btn btn-primary" type="submit" name="save">{{ _('Update Profile') }}</button>
</div>
</form>