Skip to content

Commit

Permalink
[#1030] Update to the user edit and read templates
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartin committed Oct 3, 2013
1 parent 3054c1e commit 34af1d5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 19 deletions.
11 changes: 3 additions & 8 deletions ckan/templates/user/edit.html
Expand Up @@ -3,14 +3,9 @@
{% block actions_content %}{% endblock %}

{% block breadcrumb_content %}
{% if c.userobj.name == c.user_dict.name %}
<li><a href="{{ h.url_for(controller='user', action='dashboard') }}">{{ _('Dashboard') }}</a></li>
<li class="active"><a href="#">{{ _('Edit settings') }}</a></li>
{% else %}
<li><a href="{{ h.url_for(controller='user', action='index') }}">{{ _('Users') }}</a></li>
<li><a href="{{ h.url_for(controller='user', action='read', id=c.user_dict.name) }}">{{ c.user_dict.display_name }}</a></li>
<li class="active"><a href="#">{{ _('Edit') }}</a></li>
{% endif %}
<li><a href="{{ h.url_for(controller='user', action='index') }}">{{ _('Users') }}</a></li>
<li><a href="{{ h.url_for(controller='user', action='read', id=c.user_dict.name) }}">{{ c.user_dict.display_name }}</a></li>
<li class="active"><a href="#">{{ _('Manage') }}</a></li>
{% endblock %}

{% block primary_content_inner %}
Expand Down
4 changes: 1 addition & 3 deletions ckan/templates/user/edit_base.html
@@ -1,8 +1,6 @@
{% extends "page.html" %}

{% set user = c.userobj %}

{% block subtitle %}{{ _('Dashboard') }}{% endblock %}
{% block subtitle %}{{ _('Manage') }} - {{ c.user_dict.display_name }} - {{ _('Users') }}{% endblock %}

{% block primary_content %}
<article class="module">
Expand Down
7 changes: 3 additions & 4 deletions ckan/templates/user/edit_user_form.html
Expand Up @@ -4,7 +4,7 @@
{{ form.errors(error_summary) }}

<fieldset>
<legend>{{ _('Change your details') }}</legend>
<legend>{{ _('Change details') }}</legend>

{{ form.input('name', label=_('Username'), id='field-username', value=data.name, error=errors.name, classes=['control-medium'], is_required=true) }}

Expand All @@ -20,19 +20,18 @@
{% endcall %}
{% endif %}

{{ form.required_message() }}

</fieldset>

<fieldset>
<legend>{{ _('Change your password') }}</legend>
<legend>{{ _('Change password') }}</legend>

{{ form.input('password1', type='password', label=_('Password'), id='field-password', value=data.password1, error=errors.password1, classes=['control-medium'], attrs={'autocomplete': 'off'} ) }}

{{ form.input('password2', type='password', label=_('Confirm Password'), id='field-password-confirm', value=data.password2, error=errors.password2, classes=['control-medium'], attrs={'autocomplete': 'off'}) }}
</fieldset>

<div class="form-actions">
{{ form.required_message() }}
<button class="btn btn-primary" type="submit" name="save">{{ _('Update Profile') }}</button>
</div>
</form>
6 changes: 3 additions & 3 deletions ckan/templates/user/read_base.html
Expand Up @@ -10,9 +10,9 @@
{% endblock %}

{% block content_action %}
{% if h.check_access('user_update', user) %}
{% link_for _('Edit'), controller='user', action='edit', id=user.name, class_='btn', icon='wrench' %}
{% endif %}
{% if h.check_access('user_update', user) %}
{% link_for _('Manage'), controller='user', action='edit', id=user.name, class_='btn', icon='wrench' %}
{% endif %}
{% endblock %}

{% block content_primary_nav %}
Expand Down
1 change: 0 additions & 1 deletion ckan/templates/user/snippets/back_to_user_action.html

This file was deleted.

0 comments on commit 34af1d5

Please sign in to comment.