From 03ae94635c203d6301f56b86e2bed173f5815117 Mon Sep 17 00:00:00 2001 From: thom Date: Sat, 13 Jun 2020 01:05:45 +0200 Subject: [PATCH 1/2] Reorder DNS tabs (#3727) --- interface/web/dns/form/dns_soa.tform.php | 52 ++++++++++---------- interface/web/dns/templates/dns_soa_edit.htm | 13 +++-- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/interface/web/dns/form/dns_soa.tform.php b/interface/web/dns/form/dns_soa.tform.php index e56211782a..cccd2f6cd7 100644 --- a/interface/web/dns/form/dns_soa.tform.php +++ b/interface/web/dns/form/dns_soa.tform.php @@ -46,7 +46,7 @@ $form["action"] = "dns_soa_edit.php"; $form["db_table"] = "dns_soa"; $form["db_table_idx"] = "id"; $form["db_history"] = "yes"; -$form["tab_default"] = "dns_soa"; +$form["tab_default"] = "dns_records"; $form["list_default"] = "dns_soa_list.php"; $form["auth"] = 'yes'; // yes / no @@ -56,6 +56,31 @@ $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete +$form["tabs"]['dns_records'] = array ( + 'title' => "Records", + 'width' => 100, + 'template' => "templates/dns_records_edit.htm", + 'fields' => array ( + //################################# + // Begin Datatable fields + //################################# + + //################################# + // END Datatable fields + //################################# + ), + 'plugins' => array ( + 'dns_records' => array ( + 'class' => 'plugin_listview', + 'options' => array( + 'listdef' => 'list/dns_a.list.php', + 'sqlextwhere' => "zone = ".@$app->functions->intval(@$_REQUEST['id']), + 'sql_order_by' => "ORDER BY type, name" + ) + ) + ) +); + $form["tabs"]['dns_soa'] = array ( 'title' => "DNS Zone", 'width' => 100, @@ -294,31 +319,6 @@ $form["tabs"]['dns_soa'] = array ( ) ); -$form["tabs"]['dns_records'] = array ( - 'title' => "Records", - 'width' => 100, - 'template' => "templates/dns_records_edit.htm", - 'fields' => array ( - //################################# - // Begin Datatable fields - //################################# - - //################################# - // END Datatable fields - //################################# - ), - 'plugins' => array ( - 'dns_records' => array ( - 'class' => 'plugin_listview', - 'options' => array( - 'listdef' => 'list/dns_a.list.php', - 'sqlextwhere' => "zone = ".@$app->functions->intval(@$_REQUEST['id']), - 'sql_order_by' => "ORDER BY type, name" - ) - ) - ) -); - // show update acl to admins only. if(!$app->auth->is_admin()) unset($form["tabs"]['dns_soa']['fields']['update_acl']); diff --git a/interface/web/dns/templates/dns_soa_edit.htm b/interface/web/dns/templates/dns_soa_edit.htm index ce8154c857..d27e541b06 100644 --- a/interface/web/dns/templates/dns_soa_edit.htm +++ b/interface/web/dns/templates/dns_soa_edit.htm @@ -1,7 +1,10 @@

{tmpl_var name='configuration_error_txt'}

-
{tmpl_var name='config_error_tstamp'} : 
{tmpl_var name='config_error_msg'}
+
+
{tmpl_var name='config_error_tstamp'} : 
+
{tmpl_var name='config_error_msg'}
+
@@ -125,23 +128,23 @@ {tmpl_var name='active'} - +
{tmpl_var name='dnssec_wanted'}
({tmpl_var name='dnssec_wanted_info'}) -
+
-
+ - +
-- GitLab From 1db7ed0b14d36c37c90d8c640eab5ef3f51aaadd Mon Sep 17 00:00:00 2001 From: thom Date: Sat, 13 Jun 2020 01:06:38 +0200 Subject: [PATCH 2/2] Display zone error messages in records tab --- interface/web/dns/templates/dns_records_edit.htm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/interface/web/dns/templates/dns_records_edit.htm b/interface/web/dns/templates/dns_records_edit.htm index 979cebe5fd..97800079b7 100644 --- a/interface/web/dns/templates/dns_records_edit.htm +++ b/interface/web/dns/templates/dns_records_edit.htm @@ -1,3 +1,12 @@ + +
+

{tmpl_var name='configuration_error_txt'}

+
+
{tmpl_var name='config_error_tstamp'} : 
+
{tmpl_var name='config_error_msg'}
+
+
+
{tmpl_var name='dns_records'} @@ -5,5 +14,5 @@
- +
-- GitLab