Update multiple option field's template

This commit is contained in:
David Craig 2015-08-21 09:51:19 +12:00
parent e4b1ddbd86
commit 952b9eafb0
3 changed files with 19 additions and 1 deletions

View File

@ -15,7 +15,7 @@ class EditableCheckboxGroupField extends EditableMultipleOptionField {
public function getFormField() { public function getFormField() {
$field = new UserFormsCheckboxSetField($this->Name, $this->EscapedTitle, $this->getOptionsMap()); $field = new UserFormsCheckboxSetField($this->Name, $this->EscapedTitle, $this->getOptionsMap());
$field->setTemplate('forms/UserFormsCheckboxSetField'); $field->setFieldHolderTemplate('UserFormsMultipleOptionField_holder');
// Set the default checked items // Set the default checked items
$defaultCheckedItems = $this->getDefaultOptions(); $defaultCheckedItems = $this->getDefaultOptions();

View File

@ -26,6 +26,7 @@ class EditableRadioField extends EditableMultipleOptionField {
public function getFormField() { public function getFormField() {
$field = OptionsetField::create($this->Name, $this->EscapedTitle, $this->getOptionsMap()); $field = OptionsetField::create($this->Name, $this->EscapedTitle, $this->getOptionsMap());
$field->setFieldHolderTemplate('UserFormsMultipleOptionField_holder');
// Set default item // Set default item
$defaultOption = $this->getDefaultOptions()->first(); $defaultOption = $this->getDefaultOptions()->first();

View File

@ -0,0 +1,17 @@
<fieldset id="$Name" class="field<% if $extraClass %> $extraClass<% end_if %>">
<% if $Title %><legend class="left">$Title</legend><% end_if %>
<div class="middleColumn">
$Field
</div>
<% if $RightTitle %>
<aside class="right" role="complementary">
<p>$RightTitle</p>
</aside>
<% end_if %>
<% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
<% if $Description %><span class="description">$Description</span><% end_if %>
</fieldset>