From a5d69e3e40d63727ca5d81f5007d7d1fd625d114 Mon Sep 17 00:00:00 2001 From: Matt Scott Date: Mon, 20 Feb 2023 10:08:09 -0500 Subject: [PATCH] Completed first-found updates for the basic settings view. --- .../templates/admin_setting_basic.html | 202 +++++++++--------- 1 file changed, 100 insertions(+), 102 deletions(-) diff --git a/powerdnsadmin/templates/admin_setting_basic.html b/powerdnsadmin/templates/admin_setting_basic.html index bb801e3..b0e2867 100644 --- a/powerdnsadmin/templates/admin_setting_basic.html +++ b/powerdnsadmin/templates/admin_setting_basic.html @@ -1,116 +1,114 @@ {% extends "base.html" %} - {% set active_page = "admin_settings" %} - -{% block title %} - - Basic Settings - {{ SITE_NAME }} - -{% endblock %} +{% block title %}Basic Settings - {{ SITE_NAME }}{% endblock %} {% block dashboard_stat %} -
-
-
-
-

- Settings - Basic -

+
+
+
+
+

Basic Settings

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

Basic Settings

-
-
- - - - - - - - - - {% for setting in settings %} - - - {% if SETTING.get(setting) in [False] %} - - - {% elif SETTING.get(setting) in [True] %} - - - {% else %} - - - {% endif %} - - {% endfor %} - -
Setting NameCurrent ValueAction
- {{ setting }} -  Off - -  On - - - - - -
-
-
-
-
+
+
+
+
+

Settings Editor

+
+ +
+ + + + + + + + + + {% for setting in settings %} + + + {% if SETTING.get(setting) in [False] %} + + + {% elif SETTING.get(setting) in [True] %} + + + {% else %} + + + {% endif %} + + {% endfor %} + +
Setting NameCurrent ValueAction
+ +  Off + +  On + + + + + +
+
+ +
+ +
+ +
{% endblock %} {% block extrascripts %} - + $(document.body).on('click', '.setting-save-button', function () { + var setting = $(this).prop('id'); + var value = $(this).parents('tr').find('#value')[0].value; + var postdata = { + 'value': value, + '_csrf_token': '{{ csrf_token() }}' + }; + applyChanges(postdata, $SCRIPT_ROOT + '/admin/setting/basic/' + setting + '/edit', false, true) + }); + {% endblock %} \ No newline at end of file