Ejemplo n.º 1
0
 def __init__(self, context, request):
     super(Change, self).__init__(context, request)
     enforce_schema(context, ISiteIntro)
     if type(context.introduction) == str:
         # If the introduction-text is a string then convert it to a Unicode object
         s = to_unicode_or_bust(context.introduction)
         context.introduction = s
     self.form_fields['introduction'].custom_widget = wym_editor_widget
    def add_profile_attributes(self, userInfo, data):
        enforce_schema(userInfo.user, self.inviteFields.profileInterface)
        fields = self.form_fields.select(*self.inviteFields.profileFieldIds)
        for field in fields:
            field.interface = self.inviteFields.profileInterface

        form.applyChanges(userInfo.user, fields, data)
        # wpb: Why not use self.set_delivery?
        set_digest(userInfo, self.groupInfo, data)
Ejemplo n.º 3
0
    def add_profile_attributes(self, userInfo, data):
        enforce_schema(userInfo.user, self.inviteFields.profileInterface)
        fields = self.form_fields.select(*self.inviteFields.profileFieldIds)
        for field in fields:
            field.interface = self.inviteFields.profileInterface

        form.applyChanges(userInfo.user, fields, data)
        # wpb: Why not use self.set_delivery?
        set_digest(userInfo, self.groupInfo, data)
Ejemplo n.º 4
0
    def __init__(self, profile, request):
        super(ChangeProfileForm, self).__init__(profile, request)
        profileInterfaceName = profile_interface_name(profile)
        registerInterfaceName = '%sRegister' % profileInterfaceName

        self.profileInterface = getattr(interfaces, profileInterfaceName)
        self.registerInterface = interface = getattr(interfaces,
                                                     registerInterfaceName)
        enforce_schema(profile, interface)

        self.__hiddenFieldNames = ['form.came_from']
    def __init__(self, profile, request):
        super(ChangeProfileForm, self).__init__(profile, request)
        profileInterfaceName = profile_interface_name(profile)
        registerInterfaceName = '%sRegister' % profileInterfaceName

        self.profileInterface = getattr(interfaces, profileInterfaceName)
        self.registerInterface = interface = getattr(interfaces,
                                                     registerInterfaceName)
        enforce_schema(profile, interface)

        self.__hiddenFieldNames = ['form.came_from']
Ejemplo n.º 6
0
 def __init__(self, context, request):
     GroupForm.__init__(self, context, request)
     enforce_schema(self.context, IGroupProperties)
     self.groupVisibility = GroupVisibility(self.groupInfo)
     self.label = _('change-properties-page-title',
                    'Change group properties')
Ejemplo n.º 7
0
 def form_fields(self):
     enforce_schema(self.context, IChangeLinks)
     retval = form.Fields(IChangeLinks, render_context=True)
     retval['related_links'].custom_widget = wym_editor_widget
     return retval
Ejemplo n.º 8
0
 def form_fields(self):
     enforce_schema(self.context, IChangeAbout)
     retval = form.Fields(IChangeAbout, render_context=True)
     retval['aboutText'].custom_widget = wym_editor_widget
     return retval
Ejemplo n.º 9
0
 def form_fields(self):
     enforce_schema(self.context, IChangeAbout)
     retval = form.Fields(IChangeAbout, render_context=True)
     retval['aboutText'].custom_widget = wym_editor_widget
     return retval
Ejemplo n.º 10
0
 def __init__(self, context, request):
     GroupForm.__init__(self, context, request)
     enforce_schema(self.context, IGroupProperties)
     self.groupVisibility = GroupVisibility(self.groupInfo)
     self.label = _('change-properties-page-title',
                    'Change group properties')