def before_update(self): user = get_current(self.request) if 'proposal' not in self.request.content_to_manage: self.behaviors = [CrateAndPublish, CreateIdea, Cancel] self.behaviors_instances = OrderedDict() specific_behaviors = [b._class_ for b in self.specific_behaviors_instances] self._init_behaviors(specific_behaviors) self.schema = update_anonymous_schemanode( self.request.root, self.schema) self.schema = update_challenge_schemanode( self.request, user, self.schema) if not getattr(self, 'is_home_form', False): self.action = self.request.resource_url( self.context, 'novaideoapi', query={'op': 'update_action_view', 'node_id': CreateIdea.node_definition.id}) self.schema.widget = deform.widget.FormWidget( css_class='deform novaideo-ajax-form') else: self.action = self.request.resource_url( self.context, 'createidea') self.schema.widget = deform.widget.FormWidget( css_class='material-form deform')
def before_update(self): user = get_current(self.request) self.schema = update_anonymous_schemanode( self.request.root, self.schema) self.schema = update_challenge_schemanode( self.request, user, self.schema) ideas_widget = ideas_choice(self.context, self.request) ideas_widget.item_css_class = 'hide-bloc' ideas_widget.css_class = 'controlled-items' self.schema.get('related_ideas').widget = ideas_widget
def before_update(self): user = get_current(self.request) self.schema = update_anonymous_schemanode(self.request.root, self.schema) self.schema = update_challenge_schemanode(self.request, user, self.schema) ideas_widget = ideas_choice(self.context, self.request) ideas_widget.item_css_class = 'hide-bloc' ideas_widget.css_class = 'controlled-items' self.schema.get('related_ideas').widget = ideas_widget
def before_update(self): user = get_current(self.request) self.schema = update_anonymous_schemanode( self.request.root, self.schema) self.schema = update_challenge_schemanode( self.request, user, self.schema) self.action = self.request.resource_url( self.context, 'novaideoapi', query={'op': 'update_action_view', 'node_id': TransformToQuestion.node_definition.id}) self.schema.widget = deform.widget.FormWidget( css_class='deform novaideo-ajax-form')
def before_update(self): user = get_current(self.request) self.schema = update_anonymous_schemanode( self.request.root, self.schema) self.schema = update_challenge_schemanode( self.request, user, self.schema) self.action = self.request.resource_url( self.context, 'novaideoapi', query={'op': 'update_action_view', 'node_id': DuplicateIdea.node_definition.id}) self.schema.widget = deform.widget.FormWidget( css_class='deform novaideo-ajax-form')
def before_update(self): user = get_current(self.request) self.schema = update_anonymous_schemanode(self.request.root, self.schema) self.schema = update_challenge_schemanode(self.request, user, self.schema) if not getattr(self, 'is_home_form', False): self.action = self.request.resource_url( self.context, 'novaideoapi', query={ 'op': 'update_action_view', 'node_id': AskQuestion.node_definition.id }) self.schema.widget = deform.widget.FormWidget( css_class='deform novaideo-ajax-form') else: self.action = self.request.resource_url(self.context, 'askquestion') self.schema.widget = deform.widget.FormWidget( css_class='material-form deform')