~ubuntu-branches/ubuntu/lucid/ebox-dns/lucid

« back to all changes in this revision

Viewing changes to src/EBox/View/DomainTableCustomizer.pm

  • Committer: Bazaar Package Importer
  • Author(s): Javier Uruen Val, Javier Uruen Val
  • Date: 2010-02-07 18:51:11 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100207185111-qfo58di723initiu
Tags: 1.5-0ubuntu1
 [Javier Uruen Val]
 * New upstream release (LP: #521806)
 * debian/control
   - Bump eBox dependency
   - Add dependency on libcrypt-openssl-random-perl
   - Update description
   - Bump Standards-version to 3.8.4. No changes required.
 * debian/copyright: updated emails and dates.
 * debian/watch: fixed by adding /latest in the url

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2010 eBox technologies S.L.
 
2
#
 
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.
 
6
#
 
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.
 
11
#
 
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
 
15
 
 
16
# Class: EBox::DNS::View::GatewayTableCustomizer
 
17
#
 
18
#   This class is used to override the EBox::View::Customizer method
 
19
#   that allows modification on the fields of the DomainTable mode.
 
20
#
 
21
#   We hide the dynamic attribute in add new form
 
22
#
 
23
package EBox::DNS::View::DomainTableCustomizer;
 
24
 
 
25
use base 'EBox::View::Customizer';
 
26
 
 
27
use strict;
 
28
use warnings;
 
29
 
 
30
# Group: Public methods
 
31
 
 
32
# Method: initHTMLStateField
 
33
#
 
34
#   Given a field, it returns if the field has to be shown. hidden, or disabled
 
35
#
 
36
# Parameters:
 
37
#
 
38
#    (Positional)
 
39
#
 
40
#   fieldName - string containing the field name
 
41
#   fields - array ref of instancied types with their current values
 
42
#
 
43
# Returns:
 
44
#
 
45
#   One of these strings:
 
46
#
 
47
#          show
 
48
#          hide
 
49
#          disable
 
50
#
 
51
sub initHTMLStateField
 
52
{
 
53
    my ($self, $fieldName, $fields) = @_;
 
54
 
 
55
    if (defined($fieldName) and ($fieldName eq 'dynamic')) {
 
56
        return 'hide';
 
57
    } else {
 
58
        return $self->SUPER::initHTMLStateField($fieldName, $fields);
 
59
    }
 
60
 
 
61
}
 
62
 
 
63
1;