2011-09-18 08:00:05 -05:00
|
|
|
<tal:main define="tool context/getTool">
|
2011-11-25 11:01:20 -06:00
|
|
|
<html metal:use-macro="context/ui/template/macros/main">
|
2011-09-18 08:00:05 -05:00
|
|
|
<metal:fill fill-slot="content"
|
2012-11-29 13:45:21 -06:00
|
|
|
tal:define="dummy python: contextObj.allows('Modify portal content', raiseError=True);
|
2012-05-05 10:04:19 -05:00
|
|
|
errors request/errors | python:{};
|
|
|
|
layout python: contextObj.getPageLayout(layoutType);
|
|
|
|
cssJs python: {};
|
|
|
|
phaseInfo python: contextObj.getAppyPhases(currentOnly=True, layoutType=layoutType);
|
|
|
|
phase phaseInfo/name;
|
2012-06-02 10:39:05 -05:00
|
|
|
page request/page|python:contextObj.getDefaultEditPage();
|
2013-01-14 09:58:30 -06:00
|
|
|
dummy python: contextObj.setLock(user, page);
|
2012-06-02 10:39:05 -05:00
|
|
|
confirmMsg request/confirmMsg | nothing;
|
|
|
|
groupedWidgets python: contextObj.getGroupedAppyTypes(layoutType, page, cssJs=cssJs);"
|
2012-01-04 11:03:46 -06:00
|
|
|
tal:on-error="structure python: tool.manageError(error)">
|
2009-10-18 07:52:27 -05:00
|
|
|
|
2011-11-25 11:01:20 -06:00
|
|
|
<metal:prologue use-macro="context/ui/page/macros/prologue"/>
|
2013-01-18 07:32:29 -06:00
|
|
|
<tal:comment replace="nothing">Warn the user that the form should be left via buttons</tal:comment>
|
|
|
|
<script type="text/javascript">
|
|
|
|
window.onbeforeunload = function(e){
|
|
|
|
theForm = document.getElementById('appyForm');
|
|
|
|
if (theForm.button.value == "") {
|
|
|
|
var e = e || window.event;
|
|
|
|
if (e) {e.returnValue = warn_leave_form;}
|
|
|
|
return warn_leave_form;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<form id="appyForm" name="appyForm" method="post" enctype="multipart/form-data"
|
|
|
|
tal:attributes="action python: contextObj.absolute_url()+'/do'">
|
2011-09-18 08:00:05 -05:00
|
|
|
<input type="hidden" name="action" value="Update"/>
|
2013-01-18 07:32:29 -06:00
|
|
|
<input type="hidden" name="button" value=""/>
|
2011-09-18 08:00:05 -05:00
|
|
|
<input type="hidden" name="page" tal:attributes="value page"/>
|
|
|
|
<input type="hidden" name="nav" tal:attributes="value request/nav|nothing"/>
|
|
|
|
<input type="hidden" name="confirmed" value="False"/>
|
2011-11-25 11:01:20 -06:00
|
|
|
<metal:show use-macro="context/ui/page/macros/show"/>
|
2011-09-18 08:00:05 -05:00
|
|
|
</form>
|
2013-01-18 07:32:29 -06:00
|
|
|
<script tal:condition="confirmMsg" type="text/javascript"
|
2011-09-18 08:00:05 -05:00
|
|
|
tal:content="python: 'askConfirm(\'script\', \'postConfirmedEditForm()\', \'%s\')' % confirmMsg">
|
|
|
|
</script>
|
2011-11-25 11:01:20 -06:00
|
|
|
<metal:footer use-macro="context/ui/page/macros/footer"/>
|
2011-09-18 08:00:05 -05:00
|
|
|
</metal:fill>
|
2009-10-18 07:52:27 -05:00
|
|
|
</html>
|
2011-09-18 08:00:05 -05:00
|
|
|
</tal:main>
|