Skip to content

Commit

Permalink
Add button
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigel Babu committed Jan 28, 2014
1 parent 2e3c493 commit 77d1bfb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ckan/templates/user/edit_user_form.html
Expand Up @@ -37,6 +37,12 @@
<a class="btn btn-danger pull-left" href="{% url_for controller='user', action='delete', id=data.id %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a>
{% endif %}
{% endblock %}
{% block generate_button %}
{% if h.check_access('user_cycle_apikey', {'id': data.id}) %}
{% set locale = h.dump_json({'content': _('Are you sure you want to regenerate the API key?')}) %}
<a class="btn btn-warning" href="{% url_for controller='user', action='cycle_apikey', id=data.id %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block generate_button_text %}{{ _('Regenerate API Key') }}{% endblock %}</a>
{% endif %}
{% endblock %}
{{ form.required_message() }}
<button class="btn btn-primary" type="submit" name="save">{{ _('Update Profile') }}</button>
</div>
Expand Down

0 comments on commit 77d1bfb

Please sign in to comment.