-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reindent file a bit. Add missing separator div to conform to the add/…
…edit forms style.
- Loading branch information
Showing
3 changed files
with
208 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<html metal:use-macro="context/@@standard_macros/page"> | ||
<body> | ||
<div metal:fill-slot="body"> | ||
|
||
<div metal:define-macro="addform"> | ||
|
||
<form action="." tal:attributes="action request/URL" method="post" | ||
enctype="multipart/form-data"> | ||
|
||
<div metal:define-macro="formbody"> | ||
|
||
<h3 tal:condition="view/label" | ||
tal:content="view/label" | ||
metal:define-slot="heading" | ||
>Edit something</h3> | ||
|
||
<p tal:define="status view/update" | ||
tal:condition="status" | ||
tal:content="status" /> | ||
|
||
<p tal:condition="view/errors" i18n:translate=""> | ||
There are <strong tal:content="python:len(view.errors)" | ||
i18n:name="num_errors">6</strong> input errors. | ||
</p> | ||
|
||
<div metal:define-slot="extra_info" tal:replace="nothing"> | ||
</div> | ||
|
||
<div class="row" metal:define-slot="extra_top" tal:replace="nothing"> | ||
<div class="label">Extra top</div> | ||
<div class="label"><input type="text" style="width:100%" /></div> | ||
</div> | ||
|
||
<div metal:use-macro="context/@@form_macros/widget_rows" /> | ||
|
||
<div class="separator"></div> | ||
|
||
<div class="row" | ||
metal:define-slot="extra_bottom" tal:replace="nothing"> | ||
<div class="label">Extra bottom</div> | ||
<div class="field"><input type="text" style="width:100%" /></div> | ||
</div> | ||
|
||
<div class="separator"></div> | ||
|
||
</div> | ||
<br/><br/> | ||
<div class="row"> | ||
<div class="controls"><hr /> | ||
<input type='submit' value='Refresh' | ||
i18n:attributes='value refresh-button' /> | ||
<input type='submit' value='Add' name='UPDATE_SUBMIT' | ||
i18n:attributes='value add-button' /> | ||
<span tal:condition="context/nameAllowed|nothing" tal:omit-tag=""> | ||
<b i18n:translate="">Object Name</b> | ||
<input type='text' name='add_input_name' | ||
tal:attributes="value context/contentName" /> | ||
</span> | ||
</div> | ||
</div> | ||
|
||
<div class="row" metal:define-slot="extra_buttons" tal:replace="nothing"> | ||
</div> | ||
|
||
<div class="separator"></div> | ||
</form> | ||
</div> | ||
|
||
</div> | ||
</body> | ||
|
||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<tal:block condition="view/update"/><html metal:use-macro="context/@@standard_macros/page"> | ||
|
||
<body> | ||
<div metal:fill-slot="body"> | ||
|
||
<div metal:define-macro="body"> | ||
|
||
<form action="." tal:attributes="action request/URL" method="post" | ||
enctype="multipart/form-data"> | ||
|
||
<div metal:define-macro="formbody"> | ||
|
||
<h3 tal:condition="view/label" | ||
tal:content="view/label" | ||
metal:define-slot="heading" | ||
>Edit something</h3> | ||
|
||
<p tal:condition="view/feedback" tal:content="view/feedback"> | ||
A feedback message to the user | ||
</p> | ||
|
||
<div tal:condition="view/errors"> | ||
<ul> | ||
<li tal:repeat="error view/errors"> | ||
<strong tal:content="error/__class__"> | ||
Error Type</strong>: | ||
<span tal:content="error">Error text</span> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<div metal:define-slot="extra_info" tal:replace="nothing"> | ||
</div> | ||
|
||
<div class="row" metal:define-slot="extra_top" | ||
tal:replace="nothing"> | ||
<div class="label">Extra top</div> | ||
<div class="label"> | ||
<input type="text" style="width:100%" /> | ||
</div> | ||
</div> | ||
|
||
<div metal:use-macro="context/@@form_macros/widget_rows" /> | ||
|
||
<div class="row" | ||
metal:define-slot="extra_bottom" | ||
tal:replace="nothing"> | ||
<div class="label">Extra bottom</div> | ||
<div class="field"> | ||
<input type="text" style="width:100%" /> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="row"> | ||
<div class="controls"> | ||
<!-- | ||
<input type="submit" value="Refresh" | ||
i18n:attributes="value refresh-button" | ||
/> | ||
--> | ||
<input tal:condition="view/show_previous" | ||
type="submit" name="PREVIOUS_SUBMIT" value="Previous" | ||
i18n:attributes="value previous-button" /> | ||
<input tal:condition="view/show_submit" | ||
type="submit" name="UPDATE_SUBMIT" value="Submit" | ||
i18n:attributes="value submit-button"/> | ||
<input tal:condition="view/show_next" | ||
type="submit" name="NEXT_SUBMIT" value="Next" | ||
i18n:attributes="value next-button" /> | ||
</div> | ||
</div> | ||
<div class="separator"></div> | ||
|
||
<div tal:replace="structure view/renderHidden"> | ||
<!-- type=hidden input controls for passing state without session --> | ||
<input type="hidden" name="example" value="foo" /> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
<tal:tag condition="view/update" | ||
/><html metal:use-macro="views/standard_macros/page"> | ||
<tal:tag condition="view/update" /><html metal:use-macro="views/standard_macros/page"> | ||
<body> | ||
<div metal:fill-slot="body"> | ||
<div metal:fill-slot="body"> | ||
|
||
<div metal:define-macro="body"> | ||
<div metal:define-macro="body"> | ||
|
||
<form action="." tal:attributes="action request/URL" method="POST" | ||
enctype="multipart/form-data" > | ||
<form action="." tal:attributes="action request/URL" method="POST" | ||
enctype="multipart/form-data" > | ||
|
||
<div metal:define-macro="formbody"> | ||
<div metal:define-macro="formbody"> | ||
|
||
<h3 tal:condition="view/label" | ||
tal:content="view/label" | ||
metal:define-slot="heading" | ||
>Edit something</h3> | ||
<h3 tal:condition="view/label" | ||
tal:content="view/label" | ||
metal:define-slot="heading" | ||
>Edit something</h3> | ||
|
||
<p tal:condition="view/feedback" tal:content="view/feedback" /> | ||
<p tal:condition="view/feedback" tal:content="view/feedback" /> | ||
|
||
<div metal:define-slot="extra_info" tal:replace="nothing"> | ||
</div> | ||
<div metal:define-slot="extra_info" tal:replace="nothing"> | ||
</div> | ||
|
||
<div class="row" | ||
metal:define-slot="extra_top" tal:replace="nothing"> | ||
<div class="label">Extra top</div> | ||
<div class="field"><input type="text" style="width:100%" /></div> | ||
</div> | ||
|
||
<div metal:use-macro="context/@@form_macros/widget_rows" /> | ||
|
||
<div class="row" | ||
metal:define-slot="extra_bottom" tal:replace="nothing"> | ||
<div class="label">Extra bottom</div> | ||
<div class="field"><input type="text" style="width:100%" /></div> | ||
</div> | ||
<div class="row" | ||
metal:define-slot="extra_top" tal:replace="nothing"> | ||
<div class="label">Extra top</div> | ||
<div class="field"><input type="text" style="width:100%" /></div> | ||
</div> | ||
|
||
</div> | ||
<div metal:use-macro="context/@@form_macros/widget_rows" /> | ||
|
||
<div class="row"> | ||
<div class="controls"> | ||
<!-- <input type="submit" value="Refresh" | ||
i18n:attributes="value refresh-button" /> --> | ||
<input tal:condition="view/show_previous" | ||
type="submit" name="PREVIOUS_SUBMIT" value="Previous" | ||
i18n:attributes="value previous-button" /> | ||
<input tal:condition="view/show_submit" | ||
type="submit" name="UPDATE_SUBMIT" value="Submit" | ||
i18n:attributes="value submit-button"/> | ||
<input tal:condition="view/show_next" | ||
type="submit" name="NEXT_SUBMIT" value="Next" | ||
i18n:attributes="value next-button" /> | ||
</div> | ||
</div> | ||
<div class="row" | ||
metal:define-slot="extra_bottom" tal:replace="nothing"> | ||
<div class="label">Extra bottom</div> | ||
<div class="field"><input type="text" style="width:100%" /></div> | ||
</div> | ||
|
||
</div> | ||
|
||
<div tal:replace="structure view/renderHidden"> | ||
<!-- type=hidden input controls for passing state without session --> | ||
<input type="hidden" name="example" value="foo" /> | ||
</div> | ||
</form> | ||
<div class="row"> | ||
<div class="controls"> | ||
<!-- <input type="submit" value="Refresh" | ||
i18n:attributes="value refresh-button" /> --> | ||
<input tal:condition="view/show_previous" | ||
type="submit" name="PREVIOUS_SUBMIT" value="Previous" | ||
i18n:attributes="value previous-button" /> | ||
<input tal:condition="view/show_submit" | ||
type="submit" name="UPDATE_SUBMIT" value="Submit" | ||
i18n:attributes="value submit-button"/> | ||
<input tal:condition="view/show_next" | ||
type="submit" name="NEXT_SUBMIT" value="Next" | ||
i18n:attributes="value next-button" /> | ||
</div> | ||
</div> | ||
<div class="separator"></div> | ||
|
||
</div> | ||
<div tal:replace="structure view/renderHidden"> | ||
<!-- type=hidden input controls for passing state without session --> | ||
<input type="hidden" name="example" value="foo" /> | ||
</div> | ||
</form> | ||
|
||
</div> | ||
|
||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> |