[859] | 1 | <metal:block define-macro="buttons"> |
---|
| 2 | <input type="submit" name="cpsdocument_edit_button" |
---|
| 3 | class="standalone" value="button_change" |
---|
| 4 | id="cpsdocument_edit_button" |
---|
| 5 | i18n:attributes="value" |
---|
| 6 | tal:condition="not:creation" /> |
---|
| 7 | <input type="submit" name="cpsdocument_edit_and_view_button" |
---|
| 8 | class="standalone" value="button_change_and_view" |
---|
| 9 | id="cpsdocument_edit_and_view_button" |
---|
| 10 | i18n:attributes="value" |
---|
[2029] | 11 | tal:condition="python:creation and 0" /> |
---|
[859] | 12 | <input type="submit" name="cpsdocument_create_button" |
---|
| 13 | class="standalone" value="button_create" |
---|
| 14 | i18n:attributes="value" |
---|
| 15 | id="cpsdocument_create_button" |
---|
| 16 | tal:condition="creation" /> |
---|
[2042] | 17 | <span tal:condition="python:0"> |
---|
[2025] | 18 | <tal:block define=" |
---|
| 19 | use_ajax use_ajax|python:True; |
---|
| 20 | content_changed python:cpsmcat('psm_content_changed'); |
---|
| 21 | content_error python:cpsmcat('psm_content_error'); |
---|
| 22 | working python:cpsmcat('psm_ajax_working')" |
---|
| 23 | condition="python:use_ajax"> |
---|
| 24 | <script type="text/javascript" |
---|
| 25 | tal:content="string: |
---|
| 26 | // unobtrusive form controller, that leaves the form accessible |
---|
| 27 | var editor = new CPSDocumentEditor( |
---|
| 28 | 'editForm', |
---|
| 29 | $$('editForm').action, |
---|
| 30 | 'editForm', |
---|
| 31 | new Array('cpsdocument_edit_button'), |
---|
| 32 | new Array('cpsdocument_edit_and_view_button'), |
---|
| 33 | 'page_title', |
---|
| 34 | {content_changed: '${content_changed}', |
---|
| 35 | working: '${working}', |
---|
| 36 | content_error: '${content_error}'}, |
---|
| 37 | null, |
---|
| 38 | new Array('addwidget_button'));" |
---|
| 39 | > |
---|
| 40 | </script> |
---|
| 41 | </tal:block> |
---|
[2042] | 42 | </span> |
---|
[859] | 43 | </metal:block> |
---|