Logo Search packages:      
Sourcecode: zope-formulator version File versions  Download package

def Formulator::Form::Form::remove_group (   self,
  group 
) [inherited]

Remove a group.

Definition at line 145 of file Form.py.

00145                                  :
        """Remove a group.
        """
        groups = self.groups
        if group == self.group_list[0]:
            return 0 # can't remove first group
        if not groups.has_key(group):
            return 0 # group does not exist (NOTE: should we raise instead?)
        # move whatever is in the group now to the end of the first group
        groups[self.group_list[0]].extend(groups[group])
        # now remove the key
        del groups[group]
        # remove it from the group order list as well
        self.group_list.remove(group)

        self.group_list = self.group_list
        self.groups = groups
        return 1

    security.declareProtected('Change Formulator Forms', 'rename_group')
    def rename_group(self, group, name):


Generated by  Doxygen 1.6.0   Back to index