${h.form(url('update_user', id=c.user.user_id),method='put')}
gravatar

%if c.visual.use_gravatar: ${_('Change avatar at')} gravatar.com
${_('Using')} ${c.user.email} %else: ${_('Avatars are disabled')}
${c.user.email or _('Missing email, please update this user email address.')} ##show current ip just if we show ourself %if c.rhodecode_user.username == c.user.username: [${_('current IP')}: ${c.perm_user.ip_addr or "?"}] %endif %endif

<% readonly = None %> <% disabled = "" %>
%if c.extern_type != 'rhodecode':
<% readonly = "readonly" %> <% disabled = " disabled" %> ${_('This user is in an external Source of Record (%s); some details cannot be managed here.' % c.extern_type)}.
%endif
${h.text('username',class_='medium%s' % disabled, readonly=readonly)}
${h.text('email',class_='medium')}
${h.text('extern_type',class_='medium disabled',readonly="readonly")}
${h.text('extern_name',class_='medium disabled',readonly="readonly")}
${h.password('new_password',class_='medium%s' % disabled,autocomplete="off",readonly=readonly)}
${h.password('password_confirmation',class_="medium%s" % disabled,autocomplete="off",readonly=readonly)}
${h.text('firstname',class_='medium')}
${h.text('lastname',class_='medium')}
${h.checkbox('active',value=True)}
${h.checkbox('admin',value=True)}
${h.submit('save',_('Save'),class_="btn")} ${h.reset('reset',_('Reset'),class_="btn")}
${h.end_form()}