diff --git a/powerdnsadmin/templates/admin_edit_key.html b/powerdnsadmin/templates/admin_edit_key.html index 23f58d3..c7eeec9 100644 --- a/powerdnsadmin/templates/admin_edit_key.html +++ b/powerdnsadmin/templates/admin_edit_key.html @@ -1,303 +1,338 @@ {% extends "base.html" %} - {% set active_page = "admin_keys" %} - -{% if (key is not none and key.role.name != "User") %}{% set hide_opts = True %}{%else %}{% set hide_opts = False %}{% endif %} - -{% block title %} - - Edit Key - {{ SITE_NAME }} - -{% endblock %} +{% if create %} + {% set action_label = 'Create' %} + {% set form_action = url_for('admin.edit_key') %} +{% else %} + {% set action_label = 'Edit' %} + {% set form_action = url_for('admin.edit_key', key_id=key.id) %} +{% endif %} +{% if (key is not none and key.role.name != "User") %}{% set hide_opts = True %}{% else %} + {% set hide_opts = False %}{% endif %} +{% block title %}{{ action_label }} API Key - {{ SITE_NAME }}{% endblock %} {% block dashboard_stat %} -
-
-
-
-

- API Keys - {% if create %}Add API Key{% else %}Edit API Key - {{ key.id }}{% endif %} -

+
+
+
+
+

{{ action_label }} API Key

+
+
+ +
+
-
- -
-
-
{% endblock %} {% block content %} -
-
-
-
-
-
-

{% if create %}Add{% else %}Edit{% endif %} Key

-
-
- - -
-
- - -
-
- - - -
-
- - - -
+ + {% endblock %} {% block extrascripts %} - + function redirect_modal() { + window.location.href = '{{ url_for('admin.manage_keys') }}'; + modal.modal('hide'); + } + {% endif %} + {% endblock %} + {% block modals %} -