2009-04-23 22:52:08 +00:00
|
|
|
<!-- JS Relys on EditableFormField as a class - and the 3 ids in this order - do not change -->
|
2010-07-07 09:17:37 +00:00
|
|
|
<li class="$ClassName EditableFormField" id="$Name.ATT EditableItem_$Pos $Name">
|
2009-04-21 05:10:39 +00:00
|
|
|
<div class="fieldInfo">
|
2010-09-03 05:06:13 +00:00
|
|
|
<% if canEdit %>
|
2013-11-06 14:23:47 +01:00
|
|
|
<img class="fieldHandler" src="$ModulePath(framework)/images/drag.gif" alt="<% _t('EditableFormField.DRAG', 'Drag to rearrange order of fields') %>" />
|
2010-09-03 05:06:13 +00:00
|
|
|
<% else %>
|
2013-11-06 14:23:47 +01:00
|
|
|
<img class="fieldHandler" src="$ModulePath(framework)/images/drag_readonly.gif" alt="<% _t('EditableFormField.LOCKED', 'These fields cannot be modified') %>" />
|
2008-09-29 03:18:23 +00:00
|
|
|
<% end_if %>
|
2009-04-21 05:10:39 +00:00
|
|
|
|
2009-04-20 03:07:57 +00:00
|
|
|
<img class="icon" src="$Icon" alt="$ClassName" title="$singular_name" />
|
2009-04-21 05:10:39 +00:00
|
|
|
|
2008-09-29 03:18:23 +00:00
|
|
|
$TitleField
|
2009-04-21 05:10:39 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="fieldActions">
|
2009-04-17 02:26:40 +00:00
|
|
|
<% if showExtraOptions %>
|
2013-11-06 14:23:47 +01:00
|
|
|
<a class="moreOptions" href="#" title="<% _t('EditableFormField.SHOWOPTIONS', 'Show Options') %>"><% _t('EditableFormField.SHOWOPTIONS','Show Options') %></a>
|
2009-04-17 02:26:40 +00:00
|
|
|
<% end_if %>
|
|
|
|
|
2009-05-14 21:40:03 +00:00
|
|
|
<% if canDelete %>
|
2013-11-06 14:23:47 +01:00
|
|
|
<a class="delete" href="#" title="<% _t('EditableFormField.DELETE', 'Delete') %>"><% _t('EditableFormField.DELETE', 'Delete') %></a>
|
2009-06-08 04:42:17 +00:00
|
|
|
<% end_if %>
|
2009-04-21 05:10:39 +00:00
|
|
|
</div>
|
2009-04-17 02:26:40 +00:00
|
|
|
|
|
|
|
<% if showExtraOptions %>
|
2009-09-15 04:58:00 +00:00
|
|
|
<div class="extraOptions hidden" id="$Name.ATT-extraOptions">
|
2009-05-06 03:34:40 +00:00
|
|
|
<% if HasAddableOptions %>
|
|
|
|
<fieldset class="fieldOptionsGroup">
|
2013-11-06 14:23:47 +01:00
|
|
|
<legend><% _t('EditableFormField.OPTIONS', 'Options') %></legend>
|
2009-09-15 04:58:00 +00:00
|
|
|
<ul class="editableOptions" id="$FieldName.ATT-list">
|
2009-04-17 02:26:40 +00:00
|
|
|
|
2009-05-14 21:40:03 +00:00
|
|
|
<% if canEdit %>
|
2013-03-21 10:51:35 +01:00
|
|
|
<% loop Options %>
|
2009-05-06 03:34:40 +00:00
|
|
|
$EditSegment
|
2013-03-21 10:51:35 +01:00
|
|
|
<% end_loop %>
|
2009-05-06 03:34:40 +00:00
|
|
|
<% if HasAddableOptions %>
|
|
|
|
<li class="{$ClassName}Option">
|
2013-11-06 14:23:47 +01:00
|
|
|
<a href="#" rel="$ID" class="addableOption" title="<% _t('EditableFormField.ADD', 'Add option to field') %>">
|
|
|
|
<% _t('EditableFormField.ADDLabel', 'Add option') %>
|
2009-05-06 03:34:40 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end_if %>
|
2009-05-21 23:31:46 +00:00
|
|
|
<% else %>
|
2013-03-21 10:51:35 +01:00
|
|
|
<% loop Options %>
|
2009-05-21 23:31:46 +00:00
|
|
|
$ReadonlyOption
|
2013-03-21 10:51:35 +01:00
|
|
|
<% end_loop %>
|
2009-05-06 03:34:40 +00:00
|
|
|
<% end_if %>
|
|
|
|
</ul>
|
|
|
|
</fieldset>
|
|
|
|
<% end_if %>
|
2009-04-23 22:52:08 +00:00
|
|
|
|
2009-05-06 03:34:40 +00:00
|
|
|
<% if FieldConfiguration %>
|
|
|
|
<fieldset class="fieldOptionsGroup">
|
2013-11-06 14:23:47 +01:00
|
|
|
<legend><% _t('EditableFormField.FIELDCONFIGURATION', 'Field Configuration') %></legend>
|
2013-03-21 10:51:35 +01:00
|
|
|
<% loop FieldConfiguration %>
|
2009-05-06 03:34:40 +00:00
|
|
|
$FieldHolder
|
2013-03-21 10:51:35 +01:00
|
|
|
<% end_loop %>
|
2009-05-06 03:34:40 +00:00
|
|
|
</fieldset>
|
|
|
|
<% end_if %>
|
2009-04-23 22:52:08 +00:00
|
|
|
|
2009-05-06 03:34:40 +00:00
|
|
|
<% if FieldValidationOptions %>
|
|
|
|
<fieldset class="fieldOptionsGroup">
|
2013-11-06 14:23:47 +01:00
|
|
|
<legend><% _t('EditableFormField.VALIDATION', 'Validation') %></legend>
|
2013-03-21 10:51:35 +01:00
|
|
|
<% loop FieldValidationOptions %>
|
2009-05-06 03:34:40 +00:00
|
|
|
$FieldHolder
|
2013-03-21 10:51:35 +01:00
|
|
|
<% end_loop %>
|
2009-05-06 03:34:40 +00:00
|
|
|
</fieldset>
|
|
|
|
<% end_if %>
|
2009-06-25 05:07:00 +00:00
|
|
|
|
|
|
|
<fieldset class="customRules fieldOptionsGroup">
|
2013-11-06 14:23:47 +01:00
|
|
|
<legend><% _t('EditableFormField.CUSTOMRULES', 'Custom Rules') %></legend>
|
2009-06-25 05:07:00 +00:00
|
|
|
<ul id="{$FieldName}-customRules">
|
2009-05-06 03:34:40 +00:00
|
|
|
<li>
|
2013-11-06 14:23:47 +01:00
|
|
|
<a href="#" class="addCondition" title="<% _t('EditableFormField.ADD', 'Add') %>"><% _t('EditableFormField.ADDRULE', 'Add Rule') %></a>
|
2009-05-06 03:34:40 +00:00
|
|
|
</li>
|
2009-12-06 22:41:47 +00:00
|
|
|
<li class="addCustomRule">
|
2009-06-25 05:07:00 +00:00
|
|
|
<select name="{$FieldName}[CustomSettings][ShowOnLoad]">
|
2013-11-06 14:23:47 +01:00
|
|
|
<option value="Show" <% if ShowOnLoad %>selected="selected"<% end_if %>><% _t('EditableFormField.SHOW', 'Show') %></option>
|
|
|
|
<option value="Hide" <% if ShowOnLoad %><% else %>selected="selected"<% end_if %>><% _t('EditableFormField.HIDE', 'Hide') %></option>
|
2009-05-06 03:34:40 +00:00
|
|
|
</select>
|
|
|
|
|
2013-11-06 14:23:47 +01:00
|
|
|
<label class="left"><% _t('EditableFormField.FIELDONDEFAULT', 'Field On Default') %></label>
|
2009-05-06 03:34:40 +00:00
|
|
|
</li>
|
|
|
|
<li class="hidden">
|
2009-05-21 23:31:46 +00:00
|
|
|
<select class="displayOption customRuleField" name="{$FieldName}[CustomRules][Display]">
|
2013-11-06 14:23:47 +01:00
|
|
|
<option value="Show"><% _t('EditableFormField.SHOWTHISFIELD', 'Show This Field') %></option>
|
|
|
|
<option value="Hide"><% _t('EditableFormField.HIDETHISFIELD', 'Hide This Field') %></option>
|
2009-05-06 03:34:40 +00:00
|
|
|
</select>
|
|
|
|
|
2013-11-06 14:23:47 +01:00
|
|
|
<label><% _t('EditableFormField.WHEN', 'When') %></label>
|
2009-05-21 23:31:46 +00:00
|
|
|
<select class="fieldOption customRuleField" name="{$FieldName}[CustomRules][ConditionField]">
|
2009-06-25 06:55:42 +00:00
|
|
|
<option></option>
|
2013-03-21 10:51:35 +01:00
|
|
|
<% loop Parent %>
|
2009-06-25 06:55:42 +00:00
|
|
|
<% if Fields %>
|
2013-03-21 10:51:35 +01:00
|
|
|
<% loop Fields %>
|
2009-06-25 06:55:42 +00:00
|
|
|
<option value="$Name"><% if Title %>$Title<% else %>$Name<% end_if %></option>
|
2013-03-21 10:51:35 +01:00
|
|
|
<% end_loop %>
|
2009-06-25 06:55:42 +00:00
|
|
|
<% end_if %>
|
2013-03-21 10:51:35 +01:00
|
|
|
<% end_loop %>
|
2009-05-06 03:34:40 +00:00
|
|
|
</select>
|
|
|
|
|
2013-11-06 14:23:47 +01:00
|
|
|
<label><% _t('EditableFormField.IS', 'Is') %></label>
|
2009-05-21 23:31:46 +00:00
|
|
|
<select class="conditionOption customRuleField" name="{$FieldName}[CustomRules][ConditionOption]">
|
2009-05-06 03:34:40 +00:00
|
|
|
<option value=""></option>
|
2013-11-06 14:23:47 +01:00
|
|
|
<option value="IsBlank"><% _t('EditableFormField.BLANK', 'Blank') %></option>
|
|
|
|
<option value="IsNotBlank"><% _t('EditableFormField.NOTBLANK', 'Not Blank') %></option>
|
|
|
|
<option value="HasValue"><% _t('EditableFormField.VALUE', 'Value') %></option>
|
|
|
|
<option value="ValueNot"><% _t('EditableFormField.NOTVALUE', 'Not Value') %></option>
|
|
|
|
<option value="ValueLessThan"><% _t('EditableFormField.LESSTHAN', 'Value Less Than') %></option>
|
|
|
|
<option value="ValueLessThanEqual"><% _t('EditableFormField.LESSTHANEQUAL', 'Value Less Than Or Equal') %></option>
|
|
|
|
<option value="ValueGreaterThan"><% _t('EditableFormField.GREATERTHAN', 'Value Greater Than') %></option>
|
|
|
|
<option value="ValueGreaterThanEqual"><% _t('EditableFormField.GREATERTHANEQUAL', 'Value Greater Than Or Equal') %></option>
|
2009-05-06 03:34:40 +00:00
|
|
|
</select>
|
|
|
|
|
2009-05-21 23:31:46 +00:00
|
|
|
<input type="text" class="ruleValue hidden customRuleField" name="{$FieldName}[CustomRules][Value]" />
|
2009-05-06 03:34:40 +00:00
|
|
|
|
2013-11-06 14:23:47 +01:00
|
|
|
<a href="#" class="deleteCondition" title="<% _t('EditableFormField.DELETE', 'Delete') %>"><img src="cms/images/delete.gif" alt="<% _t('EditableFormField.DELETE', 'Delete') %>" /></a>
|
2009-05-06 03:34:40 +00:00
|
|
|
</li>
|
2011-03-06 15:47:01 +13:00
|
|
|
<% if CustomRules %>
|
2013-03-21 10:51:35 +01:00
|
|
|
<% loop CustomRules %>
|
2011-03-06 15:47:01 +13:00
|
|
|
<li>
|
|
|
|
<% include CustomRule %>
|
|
|
|
</li>
|
2013-03-21 10:51:35 +01:00
|
|
|
<% end_loop %>
|
2011-03-06 15:47:01 +13:00
|
|
|
<% end_if %>
|
2009-04-23 22:52:08 +00:00
|
|
|
</ul>
|
2009-05-06 03:34:40 +00:00
|
|
|
</fieldset>
|
2008-09-29 03:18:23 +00:00
|
|
|
</div>
|
2009-04-17 02:26:40 +00:00
|
|
|
<% end_if %>
|
|
|
|
|
2009-04-18 02:49:46 +00:00
|
|
|
<!-- Hidden option Fields -->
|
2012-07-17 16:09:31 +12:00
|
|
|
<input type="hidden" class="typeHidden" name="{$FieldName}[Type]" value="$ClassName" />
|
2009-06-25 06:55:42 +00:00
|
|
|
<input type="hidden" class="sortHidden" name="{$FieldName}[Sort]" value="$Sort" />
|
2012-07-17 16:09:31 +12:00
|
|
|
</li>
|