eggification
[MosaicDocument.git] / Products / MosaicDocument / default_slots / slot_string_form.pt
diff --git a/Products/MosaicDocument/default_slots/slot_string_form.pt b/Products/MosaicDocument/default_slots/slot_string_form.pt
new file mode 100755 (executable)
index 0000000..3a36d61
--- /dev/null
@@ -0,0 +1,25 @@
+<html tal:omit-tag="">
+  <head tal:replace="nothing">
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
+    <title>slot_string_form</title>
+  </head>
+  <body tal:define="object nocall:options/object;
+                    size object/size;
+                    castOperator object/castOperator;
+                    choices object/choices;
+                    text python:(castOperator == 'tokens' and [' '.join(object.text),] or [object.text,])[0];"
+        tal:omit-tag="">
+    <input type="text" class="mosaic_input"
+           tal:condition="not:choices"
+           tal:attributes="name python:'.'.join((object.getId(), 'text')) + ':'.join(('', 'record', castOperator)) ;
+                           size size;
+                           value text;" />
+                           
+     <select tal:condition="choices" class="mosaic_input"
+             tal:attributes="name python:'.'.join((object.getId(), 'text')) + ':'.join(('', 'record', castOperator)) ; ">
+      <option tal:attributes="value choice ;
+                              selected python:str(choice) == str(text)"
+              tal:content="choice" tal:repeat="choice choices">Choice</option>
+    </select>
+  </body>
+</html>
\ No newline at end of file