appy.gen: Refactoring due to De-Plonization.
This commit is contained in:
parent
d934f49a99
commit
c5a8968bd3
35 changed files with 237 additions and 480 deletions
|
@ -14,10 +14,7 @@
|
|||
onClick python: 'askConfirm(\'form\', \'%s\', "%s")' % (formId, labelConfirm)"/>
|
||||
</tal:confirm>
|
||||
<input type="submit" name="do" tal:condition="not: widget/confirm"
|
||||
tal:attributes="value label" onClick="javascript:;"/>
|
||||
<tal:comment replace="nothing">The previous onClick is simply used to prevent Plone
|
||||
from adding a CSS class that displays a popup when the user triggers the form multiple
|
||||
times.</tal:comment>
|
||||
tal:attributes="value label"/>
|
||||
</form>
|
||||
</metal:view>
|
||||
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
<label tal:attributes="for widgetName" tal:content="python: tool.translate(widget['labelId'])"></label><br>
|
||||
<tal:yes define="valueId python:'%s_yes' % name">
|
||||
<input type="radio" value="True" tal:attributes="name typedWidget; id valueId"/>
|
||||
<label tal:attributes="for valueId" i18n:translate="yes" i18n:domain="plone"></label>
|
||||
<label tal:attributes="for valueId">Yes</label>
|
||||
</tal:yes>
|
||||
<tal:no define="valueId python:'%s_no' % name">
|
||||
<input type="radio" value="False" tal:attributes="name typedWidget; id valueId"/>
|
||||
<label tal:attributes="for valueId" i18n:translate="no" i18n:domain="plone"></label>
|
||||
<label tal:attributes="for valueId">No</label>
|
||||
</tal:no>
|
||||
<tal:whatever define="valueId python:'%s_whatever' % name">
|
||||
<input type="radio" value="" tal:attributes="name typedWidget; id valueId" checked="checked"/>
|
||||
|
|
|
@ -24,14 +24,13 @@
|
|||
<metal:call use-macro="app/ui/widgets/file/macros/view"/><br/>
|
||||
</tal:showFile>
|
||||
<tal:editButtons condition="not: empty">
|
||||
<tal:comment replace="nothing">Keep the file untouched.</tal:comment>
|
||||
<tal:comment replace="nothing">Keep the file unchanged.</tal:comment>
|
||||
<input type="radio" value="nochange"
|
||||
tal:attributes="checked python:test(info['size']!=0, 'checked', None);
|
||||
name string:${name}_delete;
|
||||
id string:${name}_nochange;
|
||||
onclick string:document.getElementById('${name}_file').disabled=true;"/>
|
||||
<label tal:attributes="for string:${name}_nochange"
|
||||
i18n:translate="nochange_file" i18n:domain="plone">Keep the file unchanged</label>
|
||||
<label tal:attributes="for string:${name}_nochange">Keep the file unchanged</label>
|
||||
<br/>
|
||||
<tal:comment replace="nothing">Delete the file.</tal:comment>
|
||||
<tal:delete condition="not: widget/required">
|
||||
|
@ -39,8 +38,7 @@
|
|||
tal:attributes="name string:${name}_delete;
|
||||
id string:${name}_delete;
|
||||
onclick string:document.getElementById('${name}_file').disabled=true;"/>
|
||||
<label tal:attributes="for string:${name}_delete"
|
||||
i18n:translate="delete_file" i18n:domain="plone">Delete the file</label>
|
||||
<label tal:attributes="for string:${name}_delete">Delete the file</label>
|
||||
<br/>
|
||||
</tal:delete>
|
||||
<tal:comment replace="nothing">Replace with a new file.</tal:comment>
|
||||
|
@ -49,8 +47,7 @@
|
|||
name string:${name}_delete;
|
||||
id string:${name}_upload;
|
||||
onclick string:document.getElementById('${name}_file').disabled=false"/>
|
||||
<label tal:attributes="for string:${name}_upload;"
|
||||
i18n:translate="upload_file" i18n:domain="plone">Replace it with a new file</label>
|
||||
<label tal:attributes="for string:${name}_upload;">Replace it with a new file</label>
|
||||
<br/>
|
||||
</tal:editButtons>
|
||||
<tal:comment replace="nothing">The upload field.</tal:comment>
|
||||
|
|
|
@ -43,14 +43,13 @@
|
|||
<td tal:condition="python: obj.allows('Modify portal content') and not appyType['noForm']">
|
||||
<a tal:define="navInfo python:'ref.%s.%s:%s.%d.%d' % (contextObj.UID(), fieldName, appyType['pageName'], repeat['obj'].number()+startNumber, totalNumber);"
|
||||
tal:attributes="href python: obj.getUrl(mode='edit', page='main', nav=navInfo)">
|
||||
<img title="label_edit" i18n:domain="plone" i18n:attributes="title"
|
||||
tal:attributes="src string: $appUrl/ui/edit.gif"/>
|
||||
<img title="Edit" tal:attributes="src string: $appUrl/ui/edit.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<tal:comment replace="nothing">Delete the element</tal:comment>
|
||||
<td>
|
||||
<img tal:condition="python: not appyType['isBack'] and obj.allows('Delete objects') and obj.mayDelete()"
|
||||
title="Delete" i18n:domain="plone" i18n:attributes="title" style="cursor:pointer"
|
||||
title="Delete" style="cursor:pointer"
|
||||
tal:attributes="src string: $appUrl/ui/delete.png;
|
||||
onClick python:'onDeleteObject(\'%s\')' % obj.UID()"/>
|
||||
</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue