silverstripe-userforms/templates/FieldEditor.ss
Will Rossiter 3c1d81d014 ENHANCEMENT: added test coverage for UserDefinedForm.php and placeholders for other sections. API change: processNewFormFields removed
API change: refactored Form() into getFormFields(), getFormActions(), getRequiredFields()

ENHANCEMENT: added updateForm* extension hooks to allow customization of userforms
BUGFIX: gave custom scripts their own ID to enable it to be blocked.
2010-09-03 05:06:13 +00:00

30 lines
868 B
Scheme
Executable File

<% require css(userforms/css/FieldEditor.css) %>
<% require javascript(sapphire/thirdparty/jquery-ui/jquery-ui-1.8rc3.custom.js) %>
<% require javascript(userforms/javascript/UserForm.js) %>
<div class="FieldEditor <% if canEdit %><% else %>readonly<% end_if %>" id="Fields">
<div class="FieldListHold">
<ul class="FieldList" id="Fields_fields">
<% control Fields %>
$EditSegment
<% end_control %>
</ul>
</div>
<% if canEdit %>
<div class="MenuHolder">
<h2><% _t('ADD', 'Add') %></h2>
<select name="AddUserFormField" id="AddUserFormField">
<option value=""><% _t('SELECTAFIELD', 'Select a Field') %></option>
<% control CreatableFields %>
<option value="$ClassName">$Title</option>
<% end_control %>
</select>
<input type="submit" class="action" value="<% _t('ADD', 'Add') %>" />
</div>
<% end_if %>
</div>