1
# Copyright (C) 2010 eBox technologies S.L.
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License, version 2, as
5
# published by the Free Software Foundation.
7
# This program is distributed in the hope that it will be useful,
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
# GNU General Public License for more details.
12
# You should have received a copy of the GNU General Public License
13
# along with this program; if not, write to the Free Software
14
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16
# Class: EBox::DNS::View::GatewayTableCustomizer
18
# This class is used to override the EBox::View::Customizer method
19
# that allows modification on the fields of the DomainTable mode.
21
# We hide the dynamic attribute in add new form
23
package EBox::DNS::View::DomainTableCustomizer;
25
use base 'EBox::View::Customizer';
30
# Group: Public methods
32
# Method: initHTMLStateField
34
# Given a field, it returns if the field has to be shown. hidden, or disabled
40
# fieldName - string containing the field name
41
# fields - array ref of instancied types with their current values
45
# One of these strings:
51
sub initHTMLStateField
53
my ($self, $fieldName, $fields) = @_;
55
if (defined($fieldName) and ($fieldName eq 'dynamic')) {
58
return $self->SUPER::initHTMLStateField($fieldName, $fields);