def setUpWidgets(self, ignore_request=False): data = {} for i in self.contents: data['%s.name' %i.id] = i.id self.widgets = form.setUpDataWidgets( self.form_fields, self.prefix, self.context, self.request, data=data, ignore_request=ignore_request)
def setUpWidgets(self, ignore_request=False): # setup widgets in data entry mode not bound to context self.widgets = form.setUpDataWidgets(self.form_fields, self.prefix, self.context, self.request, ignore_request=ignore_request)
def setUpWidgets(self, ignore_request=False): class WorkflowForm: note = None date_active = None self.adapters = { self.IWorkflowForm: WorkflowForm, } self.widgets = form.setUpDataWidgets( self.form_fields, self.prefix, self.context, self.request, ignore_request=ignore_request)
def setUpWidgets(self, ignore_request=False): data = {} for i in self.contents: data['%s.name' % i.id] = i.id self.widgets = form.setUpDataWidgets(self.form_fields, self.prefix, self.context, self.request, data=data, ignore_request=ignore_request)
def setUpWidgets(self, ignore_request=False): query_data = self.request['SESSION'].get('getpaid.order.filter.query',{}) query_data = dict([("form." + akey,query_data[akey] or "") for akey in query_data if (query_data[akey]) and (("form." + akey) not in self.request.form.keys() )]) query_data.update(dict([(akey + "-empty-marker",'1') for akey in query_data if query_data[akey]])) #all this to avoid excluding empty date filtering query_data['form.creation_date'] = self.request.get('form.creation_date', self.request['SESSION'].get('getpaid.order.filter.creation_date','')) self.request.form.update(query_data) self.adapters = {} self.widgets = form.setUpDataWidgets( self.form_fields, self.prefix, self.context, self.request, ignore_request=ignore_request )
def setUpWidgets(self, ignore_request=False): """Create widgets for the folder contents.""" super(ContentsView, self).setUpWidgets(ignore_request) data = {} self.content_fields() for i in self._getBatchObj(): data['%s.name' % i.id] = i.getId() self.widgets = form.setUpDataWidgets( self.form_fields, self.prefix, self.context, self.request, data=data, ignore_request=ignore_request) self.widgets += form.setUpWidgets( self.delta_field, self.prefix, self.context, self.request, ignore_request=ignore_request)
def setUpWidgets(self, ignore_request=False): data = {} ptool = getUtility(IPropertiesTool) charset = ptool.getProperty('default_charset', None) for name in getFieldNames(IPortalConfig): value = ptool.getProperty(name) try: value = value.decode(charset) except (AttributeError, UnicodeEncodeError): pass data[name] = value data['smtp_server'] = ptool.smtp_server() self.widgets = form.setUpDataWidgets( self.form_fields, self.prefix, self.context, self.request, data=data, ignore_request=ignore_request)
def setUpWidgets( self, ignore_request=False): # setup widgets in data entry mode not bound to context actions = self.actions self.actions = [] for action in actions: if getattr(action, 'condition', None): if action.condition(self, self.context): self.actions.append(action) else: self.actions.append(action) if not self.has_write_permission(self.context): self.form_fields = self.form_fields.omit('commit_message') self.adapters = {} self.widgets = form.setUpDataWidgets( self.form_fields, self.prefix, self.context, self.request, ignore_request = ignore_request )
def setUpWidgets(self, ignore_request=False): query_data = self.request['SESSION'].get('getpaid.order.filter.query', {}) query_data = dict([ ("form." + akey, query_data[akey] or "") for akey in query_data if (query_data[akey]) and (("form." + akey) not in self.request.form.keys()) ]) query_data.update( dict([(akey + "-empty-marker", '1') for akey in query_data if query_data[akey]])) #all this to avoid excluding empty date filtering query_data['form.creation_date'] = self.request.get( 'form.creation_date', self.request['SESSION'].get('getpaid.order.filter.creation_date', '')) self.request.form.update(query_data) self.adapters = {} self.widgets = form.setUpDataWidgets(self.form_fields, self.prefix, self.context, self.request, ignore_request=ignore_request)
def setUpWidgets(self, ignore_request=False): # setup widgets in data entry mode not bound to context self.widgets = form.setUpDataWidgets( self.form_fields, self.prefix, self.context, self.request, ignore_request=ignore_request )
def setUpWidgets(self, ignore_request=False): self.adapters = {} self.widgets = form.setUpDataWidgets( self.form_fields, self.prefix, self.context, self.request, ignore_request=ignore_request )