Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

API FormField->setDescription() visible in default template

Renders into <span class="description"> instead of "title" attribute
  • Loading branch information...
commit 6f9d01f621eab063fd8021c782b48913a6070978 1 parent 255b4c4
@chillu chillu authored
View
4 docs/en/changelogs/3.1.0.md
@@ -60,10 +60,10 @@ you'll need to adjust your code.
including `Email_BounceHandler` and `Email_BounceRecord` classes,
as well as the `Member->Bounced` property.
* Deprecated global email methods `htmlEmail()` and `plaintextEmail`, as well as various email helper methods like `encodeMultipart()`. Use the `Email` API, or the `Mailer` class where applicable.
- * Removed non-functional `$inlineImages` option for sending emails
+ * Removed non-functional `$inlineImages` option for sending emails
* Removed support for keyed arrays in `SelectionGroup`, use new `SelectionGroup_Item` object
to populate the list instead (see [API docs](api:SelectionGroup)).
- * Removed `Form->Name()`: Use getName()
+ * `FormField->setDescription()` now renders in a `<span class="description">` by default, rather than a `title` attribute * Removed `Form->Name()`: Use getName()
* Removed `FormField->setContainerFieldSet()`: Use setContainerFieldList()
* Removed `FormField->rootFieldSet()`: Use rootFieldList()
* Removed `Group::map()`: Use DataList::("Group")->map()
View
1  forms/FormField.php
@@ -356,7 +356,6 @@ public function getAttributes() {
'class' => $this->extraClass(),
'id' => $this->ID(),
'disabled' => $this->isDisabled(),
- 'title' => $this->getDescription(),
);
return array_merge($attrs, $this->attributes);
View
2  templates/forms/CheckboxSetField.ss
@@ -1,4 +1,4 @@
-<ul id="$ID" class="$extraClass"<% if Description %> title="$Description"<% end_if %>>
+<ul id="$ID" class="$extraClass">
<% if Options.Count %>
<% loop Options %>
<li class="$Class">
View
4 templates/forms/FormField.ss
@@ -1,7 +1,5 @@
<% if isReadonly %>
- <span id="$ID"
- <% if extraClass %>class="$extraClass"<% end_if %>
- <% if $Description %>title="$Description"<% end_if %>>
+ <span id="$ID"<% if extraClass %> class="$extraClass"<% end_if %>>
$Value
</span>
<% else %>
View
1  templates/forms/FormField_holder.ss
@@ -5,4 +5,5 @@
</div>
<% if RightTitle %><label class="right" for="$ID">$RightTitle</label><% end_if %>
<% if Message %><span class="message $MessageType">$Message</span><% end_if %>
+ <% if Description %><span class="description">$Description</span><% end_if %>
</div>
View
2  templates/forms/OptionsetField.ss
@@ -1,4 +1,4 @@
-<ul id="$ID" class="$extraClass"<% if Description %> title="$Description"<% end_if %>>
+<ul id="$ID" class="$extraClass">
<% loop Options %>
<li class="$Class">
<input id="$ID" class="radio" name="$Name" type="radio" value="$Value"<% if isChecked %> checked<% end_if %><% if isDisabled %> disabled<% end_if %> />
Please sign in to comment.
Something went wrong with that request. Please try again.