def metaFields(self, lang=None): metafields = [] field = Metafield(u"nodename", attrs={ "label": t(lang, "node name"), "type": u"text" }) metafields.append(field) field = Metafield(u"style_full", attrs={ "label": t(lang, "full view style"), "type": u"list", "valuelist": u"full_standard;full_text" }) metafields.append(field) field = Metafield(u"style", attrs={ "label": t(lang, "style"), "type": u"list", "valuelist": u"thumbnail;list;text", }) metafields.append(field) return metafields
def metaFields(self, lang=None): metafields = Container.metaFields(self, lang=lang) field = Metafield(u"style_hide_empty") field.set("label", t(lang, "hide empty directories")) field.set("type", u"check") metafields.append(field) return metafields
def metaFields(self, lang=None): field = Metafield("upload_fileatt") field.set("label", t(lang, "workflowstep-fileatt_label_upload_file")) field.set("type", "upload") field2 = Metafield("mask_fileatt") field2.set("label", t(lang, "workflowstep-fileatt_label_mask")) field2.set("type", "text") return [field, field2]
def metaFields(self, lang=None): ret = list() field = Metafield("publishsetpublishedversion") field.set("label", t(lang, "admin_wfstep_publishsetpublishedversion")) field.set("type", "check") ret.append(field) field = Metafield("publishsetupdatetime") field.set("label", t(lang, "admin_wfstep_publishsetupdatetime")) field.set("type", "check") ret.append(field) return ret
def metaFields(self, lang=None): metafields = [] field = Metafield(u"nodename", attrs={ "label": t(lang, "node name"), "type": u"text" }) metafields.append(field) return metafields
def metaFields(self, lang=None): ret = [] field = Metafield("from") field.set("label", t(lang, "admin_wfstep_checkcontent_sender")) field.set("type", "text") ret.append(field) field = Metafield("email") field.set("label", t(lang, "admin_wfstep_checkcontent_recipient")) field.set("type", "text") ret.append(field) field = Metafield("subject") field.set("label", t(lang, "admin_wfstep_checkcontent_subject")) field.set("type", "text") ret.append(field) field = Metafield("text") field.set("label", t(lang, "admin_wfstep_checkcontent_text")) field.set("type", "memo") ret.append(field) return ret
def metaFields(self, lang=None): ret = list() field = Metafield("upload_pdfform") field.set("label", t(lang, "workflowstep-addformpage_label_upload_pdfform")) field.set("type", "upload") ret.append(field) field = Metafield("pdf_fields_editable") field.set("label", t(lang, "workflowstep-addformpage_label_pdf_fields_editable")) field.set("type", "check") ret.append(field) field = Metafield("pdf_form_separate") field.set("label", t(lang, "workflowstep-addformpage_label_pdf_form_separate")) field.set("type", "check") ret.append(field) field = Metafield("pdf_form_overwrite") field.set("label", t(lang, "workflowstep-addformpage_label_pdf_overwrite")) field.set("type", "check") ret.append(field) return ret
def metaFields(self, lang=None): field = Metafield("masks") field.set("label", t(lang, "admin_wfstep_masks_to_display")) field.set("type", "text") return [field]
def metaFields(self, lang=None): ret = [] field = Metafield("destination") field.set("label", t(lang, "admin_wfstep_addtofolder_destination")) field.set("type", "treeselect") ret.append(field) field = Metafield("destination_subfolder") field.set("label", t(lang, "admin_wfstep_addtofolder_destination_subfolder")) field.set("type", "text") ret.append(field) return ret
def metaFields(self, lang=None): ret = list() field = Metafield("attrname") field.set("label", t(lang, "admin_wfstep_urn_attrname")) field.set("type", "text") ret.append(field) field = Metafield("snid1") field.set("label", t(lang, "admin_wfstep_urn_snid1")) field.set("type", "text") ret.append(field) field = Metafield("snid2") field.set("label", t(lang, "admin_wfstep_urn_snid2")) field.set("type", "text") ret.append(field) field = Metafield("niss") field.set("label", t(lang, "admin_wfstep_urn_niss")) field.set("type", "text") ret.append(field) return ret
def metaFields(self, lang=None): ret = list() field = Metafield("attrname") field.set("label", t(lang, "attributname")) field.set("type", "text") ret.append(field) field = Metafield("accesstype") field.set("label", t(lang, "accesstype")) field.set("type", "mlist") field.set("valuelist", ";read;write;data") ret.append(field) field = Metafield("recipient") field.set("label", t(lang, "admin_wfstep_email_recipient")) field.set("type", "text") ret.append(field) field = Metafield("subject") field.set("label", t(lang, "admin_wfstep_email_subject")) field.set("type", "text") ret.append(field) field = Metafield("body") field.set("label", t(lang, "admin_wfstep_email_text")) field.set("type", "memo") ret.append(field) return ret
def metaFields(self, lang=None): field = Metafield("filetype") field.set("label", t(lang, "admin_wfstep_deletefiletype")) field.set("type", "text") return [field]
def metaFields(self, lang=None): ret = list() field = Metafield("prefix") field.set("label", t(lang, "admin_wfstep_text_before_upload_form")) field.set("type", "memo") ret.append(field) field = Metafield("suffix") field.set("label", t(lang, "admin_wfstep_text_after_upload_form")) field.set("type", "memo") ret.append(field) field = Metafield("singleobj") field.set("label", t(lang, "admin_wfstep_single_upload")) field.set("type", "check") ret.append(field) field = Metafield("limit") field.set("label", t(lang, "admin_wfstep_uploadtype")) field.set("type", "text") ret.append(field) return ret
def metaFields(self, lang=None): field = Metafield("condition") field.set("label", t(lang, "admin_wfstep_condition")) field.set("type", "text") return [field]
def metaFields(self, lang=None): if not PYPDF_MODULE_PRESENT: field = Metafield("infotext") field.set("label", t(lang, "admin_wfstep_addpic2pdf_hint")) field.set("type", "label") field.set("value", t(lang, "admin_wfstep_addpic2pdf_no_pypdf")) return [field] ret = [] field = Metafield("prefix") field.set("label", t(lang, "admin_wfstep_text_before_data")) field.set("type", "memo") ret.append(field) field = Metafield("logoupload") field.set("label", t(lang, "admin_wfstep_addpic2pdf_upload01")) field.set("type", "upload") ret.append(field) field = Metafield("url_mapping") field.set("label", t(lang, "admin_wfstep_addpic2pdf_label_url_mapping")) field.set("type", "memo") ret.append(field) return ret
def FieldDetail(req, pid, id, err=0): _option = "" for key in req.params.keys(): if key.startswith("option_"): _option += key[7] if err == 0 and id == "": # new field field = Metafield(u"") db.session.commit() elif id != "": # edit field field = q(Metadatatype).get(pid).children.filter_by(name=id, type=u'metafield').scalar() else: # error filling values _fieldvalue = "" if req.params.get('mtype', '') + "_value" in req.params.keys(): _fieldvalue = ustr(req.params[req.params.get('mtype', '') + "_value"]) if (req.params.get("mname") == ""): field = Metafield(req.params.get("orig_name")) else: field = Metafield(req.params.get("mname")) field.setLabel(req.params.get("mlabel")) field.setOrderPos(req.params.get("orderpos")) field.setFieldtype(req.params.get("mtype")) field.setOption(_option) field.setValues(_fieldvalue) field.setDescription(req.params.get("mdescription")) db.session.commit() attr = {} metadatatype = getMetaType(pid) for t in metadatatype.getDatatypes(): content_class = Node.get_class_for_typestring(t) node = content_class(name=u'') try: attr.update(node.getTechnAttributes()) except AttributeError: logg.exception("attribute error in FieldDetail, continue") continue metafields = {} for fields in getFieldsForMeta(pid): if fields.getType() != "union": metafields[fields.name] = fields v = getAdminStdVars(req) v["metadatatype"] = metadatatype v["metafield"] = field v["error"] = err v["fieldtypes"] = getMetaFieldTypeNames() v["dateoptions"] = dateoption v["datatypes"] = attr v["requiredoptions"] = requiredoption v["fieldoptions"] = fieldoption v["metafields"] = metafields v["filtertype"] = req.params.get("filtertype", "") v["actpage"] = req.params.get("actpage") v["icons"] = {"externer Link": "/img/extlink.png", "Email": "/img/email.png"} v["url_targets"] = {"selbes Fenster": "same", "neues Fenster": "_blank"} v["valuelist"] = ("", "", "", "") if field.getFieldtype() == "url": v["valuelist"] = field.getValueList() while len(v["valuelist"]) != 4: v["valuelist"].append("") else: v["valuelist"] = field.getValueList() v["field"] = None if field.id: v["field"] = field v["adminfields"] = [] v["csrf"] = req.csrf_token.current_token for t in getMetaFieldTypeNames(): f = getMetadataType(t) if 'attr_dict' in inspect.getargspec(f.getMaskEditorHTML).args: attr_dict = dict(field.attrs.items()) v["adminfields"] .append(f.getMaskEditorHTML(v["field"], metadatatype=metadatatype, language=lang(req), attr_dict=attr_dict)) else: v["adminfields"] .append(f.getMaskEditorHTML(v["field"], metadatatype=metadatatype, language=lang(req))) db.session.commit() return req.getTAL("web/admin/modules/metatype_field.html", v, macro="modify_field")
def metaFields(self, lang=None): ret = [] field = Metafield("endtext") field.set("label", t(lang, "admin_wfstep_endtext")) field.set("type", "memo") ret.append(field) field = Metafield("endremove") field.set("label", t(lang, "admin_wfstep_endremove")) field.set("type", "check") ret.append(field) field = Metafield("endsetupdatetime") field.set("label", t(lang, "admin_wfstep_endsetupdatetime")) field.set("type", "check") ret.append(field) return ret
def metaFields(self, lang=None): ret = [] field = Metafield("newnodetype") field.set("label", t(lang, "admin_wfstep_node_types_to_create")) field.set("type", "text") ret.append(field) field = Metafield("starttext") field.set("label", t(lang, "admin_wfstep_starttext")) field.set("type", "htmlmemo") ret.append(field) field = Metafield("allowcontinue") field.set("label", t(lang, "admin_wfstep_allowcontinue")) field.set("type", "check") ret.append(field) return ret
def metaFields(self, lang=None): field = Metafield("text") field.set("label", t(lang, "admin_wfstep_textpage_text_to_display")) field.set("type", "htmlmemo") return [field]
def metaFields(self, lang=None): ret = list() field = Metafield("from") field.set("label", t(lang, "admin_wfstep_email_sender")) field.set("type", "text") ret.append(field) field = Metafield("email") field.set("label", t(lang, "admin_wfstep_email_recipient")) field.set("type", "text") ret.append(field) field = Metafield("subject") field.set("label", t(lang, "admin_wfstep_email_subject")) field.set("type", "memo") ret.append(field) field = Metafield("text") field.set("label", t(lang, "admin_wfstep_email_text")) field.set("type", "memo") ret.append(field) field = Metafield("allowedit") field.set("label", t(lang, "admin_wfstep_email_text_editable")) field.set("type", "list") field.set("valuelist", t(lang, "admin_wfstep_email_text_editable_options")) ret.append(field) field = Metafield("sendcondition") field.set("label", t(lang, "admin_wfstep_email_sendcondition")) field.set("type", "text") ret.append(field) field = Metafield("attach_pdf_form") field.set("label", t(lang, "workflowstep-email_label_attach_pdf_form")) field.set("type", "check") ret.append(field) return ret
def metaFields(self, lang=None): ret = list() field = Metafield("upload_pdfform") field.set("label", t(lang, "workflowstep-addformpage_label_upload_pdfform")) field.set("type", "upload") ret.append(field) field = Metafield("pdf_fields_editable") field.set( "label", t(lang, "workflowstep-addformpage_label_pdf_fields_editable")) field.set("type", "check") ret.append(field) field = Metafield("pdf_form_separate") field.set("label", t(lang, "workflowstep-addformpage_label_pdf_form_separate")) field.set("type", "check") ret.append(field) field = Metafield("pdf_form_overwrite") field.set("label", t(lang, "workflowstep-addformpage_label_pdf_overwrite")) field.set("type", "check") ret.append(field) return ret
def metaFields(self, lang=None): ret = [] field = Metafield("destination") field.set("label", t(lang, "admin_wfstep_classify_destination")) field.set("type", "treeselect") ret.append(field) field = Metafield("destination_attr") field.set("label", t(lang, "admin_wfstep_classify_destination_attr")) field.set("type", "text") ret.append(field) field = Metafield("only_sub") field.set("label", t(lang, "admin_wfstep_classify_only_sub")) field.set("type", "check") ret.append(field) return ret
def FieldDetail(req, pid, id, err=0): _option = "" for key in req.params.keys(): if key.startswith("option_"): _option += key[7] if err == 0 and id == "": # new field field = Metafield(u"") db.session.commit() elif id != "": # edit field field = q(Metadatatype).get(pid).children.filter_by(name=id, type=u'metafield').scalar() else: # error filling values _fieldvalue = "" if req.params.get('mtype', '') + "_value" in req.params.keys(): _fieldvalue = ustr(req.params[req.params.get('mtype', '') + "_value"]) if (req.params.get("mname") == ""): field = Metafield(req.params.get("orig_name")) else: field = Metafield(req.params.get("mname")) field.setLabel(req.params.get("mlabel")) field.setOrderPos(req.params.get("orderpos")) field.setFieldtype(req.params.get("mtype")) field.setOption(_option) field.setValues(_fieldvalue) field.setDescription(req.params.get("mdescription")) db.session.commit() attr = {} metadatatype = getMetaType(pid) for t in metadatatype.getDatatypes(): content_class = Node.get_class_for_typestring(t) node = content_class(name=u'') try: attr.update(node.getTechnAttributes()) except AttributeError: logg.exception("attribute error in FieldDetail, continue") continue metafields = {} for fields in getFieldsForMeta(pid): if fields.getType() != "union": metafields[fields.name] = fields v = getAdminStdVars(req) v["metadatatype"] = metadatatype v["metafield"] = field v["error"] = err v["fieldtypes"] = getMetaFieldTypeNames() v["dateoptions"] = dateoption v["datatypes"] = attr v["requiredoptions"] = requiredoption v["fieldoptions"] = fieldoption v["metafields"] = metafields v["filtertype"] = req.params.get("filtertype", "") v["actpage"] = req.params.get("actpage") v["icons"] = {"externer Link": "/img/extlink.png", "Email": "/img/email.png"} v["url_targets"] = {"selbes Fenster": "same", "neues Fenster": "_blank"} v["valuelist"] = ("", "", "", "") if field.getFieldtype() == "url": v["valuelist"] = field.getValueList() while len(v["valuelist"]) != 4: v["valuelist"].append("") else: v["valuelist"] = field.getValueList() v["field"] = None if field.id: v["field"] = field v["adminfields"] = [] for t in getMetaFieldTypeNames(): f = getMetadataType(t) if 'attr_dict' in inspect.getargspec(f.getMaskEditorHTML).args: attr_dict = dict(field.attrs.items()) v["adminfields"] .append(f.getMaskEditorHTML(v["field"], metadatatype=metadatatype, language=lang(req), attr_dict=attr_dict)) else: v["adminfields"] .append(f.getMaskEditorHTML(v["field"], metadatatype=metadatatype, language=lang(req))) db.session.commit() return req.getTAL("web/admin/modules/metatype_field.html", v, macro="modify_field")
def metaFields(self, lang=None): field = Metafield("mask") field.set("label", t(lang, "admin_wfstep_editor_mask")) field.set("type", "text") return [field]