Add disabled field

This commit is contained in:
Nicky Gerritsen 2016-03-21 08:06:15 +01:00
parent afbac1ebcf
commit d19c8e9f0b
2 changed files with 23 additions and 1 deletions

View file

@ -54,6 +54,7 @@ $defaults['defaulttype'] = 'Master'; # Choose between 'Native
$defaults['ns'][0] = 'unconfigured.primaryns'; # The value of the first NS-record
$defaults['ns'][1] = 'unconfigured.secondaryns'; # The value of the second NS-record
$defaults['ttl'] = 3600; # Default TTL for records
$defaults['disabled'] = false; # Default disabled state
## UI Options
$menutype = 'horizontal'; # horizontal|vertical - use a horizontal or vertical menu

View file

@ -346,6 +346,12 @@ $(document).ready(function () {
width: '2%',
display: displayContent('ttl'),
listClass: 'ttl'
},
disabled: {
title: 'Disabled',
width: '2%',
display: displayContent('disabled'),
listClass: 'disabled'
}
}
}, function (data) {
@ -597,7 +603,22 @@ $(document).ready(function () {
defaultValue: '<?php echo $defaults['ttl']; ?>',
inputClass: 'ttl',
listClass: 'ttl'
}
},
disabled: {
title: 'Disabled',
width: '2%',
create: true,
display: displayContent('disabled'),
defaultValue: '<?php echo $defaults['disabled'] ? 'false' : 'true'; ?>',
inputClass: 'disabled',
listClass: 'disabled',
options: function() {
return {
'0': 'false',
'1': 'true',
};
},
},
}
}, function (data) {
data.childTable.jtable('load');