list2form : améliorations sur le code XML généré
authorProgfou <jean-christophe.andre@auf.org>
Wed, 5 Sep 2018 23:47:34 +0000 (19:47 -0400)
committerProgfou <jean-christophe.andre@auf.org>
Wed, 5 Sep 2018 23:47:34 +0000 (19:47 -0400)
wcs/list2form.py

index 3581d72..806eae4 100755 (executable)
@@ -49,7 +49,7 @@ div { margin-top: 0.5em; }
   </div>
   <div>
     <label>Supprimer la premi&egrave;re ligne du fichier&nbsp;:</label>
-    <input type="checkbox" name="delete_first" checked="on" />
+    <input type="checkbox" name="delete_first" />
   </div>
   </fieldset>
   <fieldset>
@@ -75,12 +75,19 @@ WCS_FORM = """<?xml version="1.0" encoding="%(encoding)s"?>
 <formdef>
   <name>%(form_name)s</name>
   <url_name>%(url_name)s</url_name>
-  <category>Pour importation</category>
+  <category category_id="1">Pour importation</category>
+  <workflow workflow_id="_default">Par d&#233;faut</workflow>
+  <detailed_emails>true</detailed_emails>
+  <disabled>false</disabled>
   <only_allow_one>true</only_allow_one>
   <allow_drafts>false</allow_drafts>
   <discussion>false</discussion>
+  <enable_tracking_codes>false</enable_tracking_codes>
+  <always_advertise>false</always_advertise>
+  <private_status_and_history>true</private_status_and_history>
   <confirmation>true</confirmation>
   <signing>false</signing>
+  <max_field_id>1</max_field_id>
   <fields>
     <field>
       <label>%(field_name)s</label>
@@ -96,8 +103,10 @@ WCS_FORM = """<?xml version="1.0" encoding="%(encoding)s"?>
 %(item_list)s
       </items>
       <show_as_radio>False</show_as_radio>
+      <id>0</id>
     </field>
   </fields>
+  <options />
 </formdef>"""
 
 WCS_ITEM = """        <item>%s</item>"""