211 lines
7.3 KiB
XML
Executable file
211 lines
7.3 KiB
XML
Executable file
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"
|
|
i18n:domain="loops">
|
|
<body>
|
|
|
|
|
|
<metal:form define-macro="form">
|
|
<h1 i18n:translate=""
|
|
tal:content="view/label | default">Edit</h1>
|
|
<div>
|
|
<form method="post">
|
|
<input type="hidden" name="action" value="update" />
|
|
<br />
|
|
<metal:fields use-macro="view/fieldRenderers/fields" />
|
|
<br />
|
|
<input type="submit" name="submit" value="Save"
|
|
i18n:attributes="value"
|
|
tal:attributes="value view/label_submit | string:Save" />
|
|
</form>
|
|
</div>
|
|
</metal:form>
|
|
|
|
|
|
<metal:fields define-macro="fields">
|
|
<tal:define define="manageMode manageMode|view/manageMode|nothing;
|
|
fields view/fields;
|
|
instance view/instance;
|
|
data view/data;
|
|
state view/formState">
|
|
<table style="width: 100%">
|
|
<tbody tal:condition="state/severity">
|
|
<tr>
|
|
<td colspan="2">
|
|
<div class="error error-heading"
|
|
i18n:translate="">Please correct the indicated errors.</div></td></tr>
|
|
</tbody>
|
|
<tal:fields repeat="field fields">
|
|
<tal:field define="name field/name;
|
|
errors state/fieldInstances/?name/errors|python: [];">
|
|
<metal:field use-macro="python: view.fieldRenderers[field.fieldRenderer]" />
|
|
</tal:field>
|
|
</tal:fields>
|
|
</table>
|
|
<tal:add condition="manageMode">
|
|
<metal:add use-macro="view/fieldEditRenderers/add_buttons" />
|
|
</tal:add>
|
|
</tal:define>
|
|
</metal:fields>
|
|
|
|
|
|
<metal:field define-macro="field">
|
|
<tbody tal:omit-tag="not:errors"
|
|
class="error"
|
|
style="padding: 4px; margin-bottom: 4px;">
|
|
<tal:errors repeat="error errors">
|
|
<tr>
|
|
<td colspan="2" style="padding: 4px">
|
|
<div i18n:translate=""
|
|
tal:content="error/description">???</div></td>
|
|
</tr>
|
|
</tal:errors>
|
|
<tr>
|
|
<tal:field>
|
|
<td style="padding: 4px; border-top: none; vertical-align: top"
|
|
tal:attributes="title field/description">
|
|
<b tal:content="field/title">...</b><span
|
|
tal:condition="field/required"> *</span>
|
|
</td>
|
|
<td class="field" style="border-top: none">
|
|
<metal:input use-macro="python:
|
|
view.fieldRenderers[field.inputRenderer]" />
|
|
</td>
|
|
</tal:field>
|
|
</tr>
|
|
<tr style="border-bottom: 1px solid #dddddd"
|
|
tal:condition="manageMode">
|
|
<td style="border-top: none">
|
|
<metal:move use-macro="view/fieldEditRenderers/move_icons" />
|
|
</td>
|
|
<td style="border-top: none">
|
|
<metal:edit use-macro="view/fieldEditRenderers/edit_buttons" />
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</metal:field>
|
|
|
|
|
|
<metal:textline define-macro="input_textline">
|
|
<input type="text" name="field"
|
|
xxdojoType="dijit.form.ValidationTextBox"
|
|
tal:define="width field/width|nothing"
|
|
tal:attributes="name name; id name;
|
|
style python:
|
|
('width: %s;;' % (width and str(width)+'px' or '555px')) +
|
|
'height: 1.5em;;';
|
|
value data/?name|string:;
|
|
xxrequired field/required_js;" />
|
|
</metal:textline>
|
|
|
|
|
|
<metal:textline define-macro="input_date">
|
|
<input type="text" name="field" style="width: 8em; height: 1.5em"
|
|
dojoType="dijit.form.DateTextBox"
|
|
tal:define="width field/width|nothing"
|
|
tal:attributes="name name;
|
|
value data/?name|string:;
|
|
required field/required_js" />
|
|
<input type="text" name="field" style="width: 6em; height: 1.5em"
|
|
dojoType="dijit.form.TimeTextBox"
|
|
tal:define="width field/width|nothing"
|
|
tal:condition="not:field/hideTime|python:False"
|
|
tal:attributes="name name;
|
|
value data/?name|string:;
|
|
required field/required_js" />
|
|
</metal:textline>
|
|
|
|
|
|
<metal:password define-macro="input_password">
|
|
<input type="password" name="field"
|
|
tal:define="width field/width|nothing"
|
|
tal:attributes="name name;
|
|
style python:
|
|
'width: %s' % (width and str(width)+'px' or '600px');
|
|
value data/?name|string:" />
|
|
</metal:password>
|
|
|
|
|
|
<metal:textarea define-macro="input_textarea">
|
|
<textarea name="field" rows="3"
|
|
tal:define="width field/width|nothing;
|
|
height field/height|python:3"
|
|
tal:attributes="name name;
|
|
rows python: height or 3;
|
|
style python:
|
|
'width: %s' % (width and str(width)+'px' or '600px');"
|
|
tal:content="data/?name|string:">
|
|
</textarea>
|
|
</metal:textarea>
|
|
|
|
|
|
<metal:html define-macro="input_html">
|
|
<metal:textarea use-macro="view/fieldRenderers/input_textarea" />
|
|
</metal:html>
|
|
|
|
|
|
<metal:upload define-macro="input_fileupload">
|
|
<input type="file" name="field"
|
|
tal:attributes="name name;" />
|
|
</metal:upload>
|
|
|
|
|
|
<metal:checkbox define-macro="input_checkbox">
|
|
<input type="checkbox" name="field" value="true"
|
|
tal:attributes="name name;
|
|
checked data/?name|nothing" />
|
|
</metal:checkbox>
|
|
|
|
|
|
<metal:dropdown define-macro="input_dropdown">
|
|
<select name="field" style="width: auto"
|
|
tal:define="width field/width|nothing"
|
|
tal:attributes="name name;
|
|
style python:
|
|
'width: %s' % (width and str(width)+'px' or '');">
|
|
<option tal:repeat="item python:
|
|
field.getVocabularyItems(instance, request)"
|
|
tal:content="item/title"
|
|
tal:attributes="value item/token;
|
|
selected python:
|
|
item['token'] == data.get(name)">Mrs</option>
|
|
</select>
|
|
</metal:dropdown>
|
|
|
|
|
|
<metal:list define-macro="input_list">
|
|
<textarea name="field" rows="3"
|
|
tal:define="width field/width|nothing;
|
|
height field/height|python:3"
|
|
tal:attributes="name name;
|
|
rows python: height or 3;
|
|
style python:
|
|
'width: %s' % (width and str(width)+'px' or '600px');"
|
|
tal:content="data/?name|string:" />
|
|
</metal:list>
|
|
|
|
|
|
<metal:spacer define-macro="field_spacer">
|
|
<tr>
|
|
<td colspan="2" style="border-top:none; font-size: 50%"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2"
|
|
style="border-top: 1px solid #bbbbbb; padding: 8px 4px;
|
|
margin-top: 10px;">
|
|
<div><b tal:content="field/title"></b></div>
|
|
<div tal:content="structure field/description"></div>
|
|
</td>
|
|
</tr>
|
|
<tr style="border-bottom: 1px solid #dddddd"
|
|
tal:condition="manageMode">
|
|
<td style="border-top: none">
|
|
<metal:move use-macro="view/fieldEditRenderers/move_icons" />
|
|
</td>
|
|
<td style="border-top: none">
|
|
<metal:edit use-macro="view/fieldEditRenderers/edit_buttons" />
|
|
</td>
|
|
</tr>
|
|
</metal:spacer>
|
|
|
|
|
|
</body>
|
|
</html>
|