##// END OF EJS Templates
caches: use dogpile for sql_cache_short region.
caches: use dogpile for sql_cache_short region.

File last commit:

r2114:6e357177 default
r2883:f2837b35 default
Show More
user_edit_profile.mako
150 lines | 5.5 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 <%namespace name="base" file="/base/base.mako"/>
<div class="panel panel-default user-profile">
<div class="panel-heading">
<h3 class="panel-title">${_('User Profile')}</h3>
</div>
<div class="panel-body">
<div class="user-profile-content">
users: ported controllers from pylons into pyramid views.
r2114 ${h.secure_form(h.route_path('user_update', user_id=c.user.user_id), class_='form', request=request)}
templating: use .mako as extensions for template files.
r1282 <% readonly = None %>
<% disabled = "" %>
%if c.extern_type != 'rhodecode':
<% readonly = "readonly" %>
<% disabled = " disabled" %>
<div class="infoform">
<div class="fields">
<p>${_('This user was created from external source (%s). Editing some of the settings is limited.' % c.extern_type)}</p>
</div>
</div>
%endif
<div class="form">
<div class="fields">
<div class="field">
<div class="label photo">
${_('Photo')}:
</div>
<div class="input profile">
%if c.visual.use_gravatar:
${base.gravatar(c.user.email, 100)}
<p class="help-block">${_('Change the avatar at')} <a href="http://gravatar.com">gravatar.com</a>.</p>
%else:
${base.gravatar(c.user.email, 20)}
${_('Avatars are disabled')}
%endif
</div>
</div>
<div class="field">
<div class="label">
${_('Username')}:
</div>
<div class="input">
${h.text('username', class_='%s medium' % disabled, readonly=readonly)}
</div>
</div>
<div class="field">
<div class="label">
<label for="name">${_('First Name')}:</label>
</div>
<div class="input">
${h.text('firstname', class_="medium")}
</div>
</div>
<div class="field">
<div class="label">
<label for="lastname">${_('Last Name')}:</label>
</div>
<div class="input">
${h.text('lastname', class_="medium")}
</div>
</div>
<div class="field">
<div class="label">
<label for="email">${_('Email')}:</label>
</div>
<div class="input">
## we should be able to edit email !
${h.text('email', class_="medium")}
</div>
</div>
<div class="field">
<div class="label">
${_('New Password')}:
</div>
<div class="input">
${h.password('new_password',class_='%s medium' % disabled,autocomplete="off",readonly=readonly)}
</div>
</div>
<div class="field">
<div class="label">
${_('New Password Confirmation')}:
</div>
<div class="input">
${h.password('password_confirmation',class_="%s medium" % disabled,autocomplete="off",readonly=readonly)}
</div>
</div>
<div class="field">
<div class="label-text">
${_('Active')}:
</div>
<div class="input user-checkbox">
${h.checkbox('active',value=True)}
</div>
</div>
<div class="field">
<div class="label-text">
${_('Super Admin')}:
</div>
<div class="input user-checkbox">
${h.checkbox('admin',value=True)}
</div>
</div>
<div class="field">
<div class="label-text">
${_('Source of Record')}:
</div>
<div class="input">
<p>${c.extern_type}</p>
${h.hidden('extern_type', readonly="readonly")}
</div>
</div>
<div class="field">
<div class="label-text">
${_('Name in Source of Record')}:
</div>
<div class="input">
<p>${c.extern_name}</p>
${h.hidden('extern_name', readonly="readonly")}
</div>
</div>
<div class="field">
<div class="label">
${_('Language')}:
</div>
<div class="input">
## allowed_languages is defined in the users.py
## c.language comes from base.py as a default language
${h.select('language', c.language, c.allowed_languages)}
routing: switched static redirection links to pyramid....
r1679 <p class="help-block">${h.literal(_('Help translate %(rc_link)s into your language.') % {'rc_link': h.link_to('RhodeCode Enterprise', h.route_url('rhodecode_translations'))})}</p>
templating: use .mako as extensions for template files.
r1282 </div>
</div>
<div class="buttons">
${h.submit('save', _('Save'), class_="btn")}
${h.reset('reset', _('Reset'), class_="btn")}
</div>
</div>
</div>
${h.end_form()}
</div>
</div>
</div>
<script>
$('#language').select2({
'containerCssClass': "drop-menu",
'dropdownCssClass': "drop-menu-dropdown",
'dropdownAutoWidth': true
});
</script>