From ea692399d5729aaf6041e8f979444ab76968ed46 Mon Sep 17 00:00:00 2001
From: A. Täffner <darkalex@firesplash.de>
Date: Mon, 25 Jan 2016 03:43:30 -0500
Subject: [PATCH] LOC,DS,TLSA and SPF RRs
---
interface/web/dns/form/dns_spf.tform.php | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/interface/web/dns/form/dns_spf.tform.php b/interface/web/dns/form/dns_spf.tform.php
index ea2cf83..c3daed3 100644
--- a/interface/web/dns/form/dns_spf.tform.php
+++ b/interface/web/dns/form/dns_spf.tform.php
@@ -97,7 +97,7 @@
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'default' => 'TXT',
+ 'default' => 'SPF',
'value' => '',
'width' => '5',
'maxlength' => '5'
@@ -105,21 +105,17 @@
'data' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
+ 'validators' => array (
+ 0 => array (
+ 'type' => 'NOTEMPTY',
+ 'errmsg'=> 'data_error_empty'
+ ),
+ ),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
- /*
- 'aux' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'default' => '0',
- 'value' => '',
- 'width' => '10',
- 'maxlength' => '10'
- ),
- */
'ttl' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
@@ -136,6 +132,7 @@
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'Y',
+ 'value' => array(0 => 'N', 1 => 'Y')
),
'stamp' => array (
'datatype' => 'VARCHAR',
@@ -154,11 +151,15 @@
'maxlength' => '10'
),
//#################################
- // End Datatable fields
+ // ENDE Datatable fields
//#################################
)
);
-
-
+if($_SESSION["s"]["user"]["typ"] == 'admin') {
+ unset($form["tabs"]['dns']['fields']['data']['validators']);
+ $form["tabs"]['dns']['fields']['data']['validators'][0]['type'] = 'NOTEMPTY';
+ $form["tabs"]['dns']['fields']['data']['validators'][0]['errmsg'] = 'data_error_empty';
+ $form["tabs"]['dns']['fields']['data']['maxlength'] = 512;
+}
?>
--
Gitblit v1.9.1