Skip to content

Commit

Permalink
MINOR: Include the title attribute on tree and readonly fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajshort authored and chillu committed Jun 13, 2012
1 parent d9c7bb8 commit 9e4b526
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions forms/TreeMultiselectField.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ function Field($properties = array()) {
'class' => 'TreeDropdownField multiple' . ($this->extraClass() ? " {$this->extraClass()}" : '') . ($this->showSearch ? " searchable" : ''), 'class' => 'TreeDropdownField multiple' . ($this->extraClass() ? " {$this->extraClass()}" : '') . ($this->showSearch ? " searchable" : ''),
'data-url-tree' => $this->form ? $this->Link('tree') : "", 'data-url-tree' => $this->form ? $this->Link('tree') : "",
'data-title' => $title, 'data-title' => $title,
'title' => $this->getDescription()
), ),
$this->createTag ( $this->createTag (
'input', 'input',
Expand Down
6 changes: 5 additions & 1 deletion templates/forms/FormField.ss
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,9 @@
<% if isReadonly %> <% if isReadonly %>
<span id="$ID"<% if extraClass %> class="$extraClass"<% end_if %>>$Value</span> <span id="$ID"
<% if extraClass %>class="$extraClass"<% end_if %>
<% if $Description %>title="$Description"<% end_if %>>
$Value
</span>
<% else %> <% else %>
<input $AttributesHTML> <input $AttributesHTML>
<% end_if %> <% end_if %>
7 changes: 6 additions & 1 deletion templates/forms/TreeDropdownField.ss
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,8 @@
<div id="TreeDropdownField_$ID" class="TreeDropdownField single<% if extraClass %> $extraClass<% end_if %><% if ShowSearch %> searchable<% end_if %>" data-url-tree="$Link(tree)" data-title="$Title"<% if Metadata %> data-metadata="$Metadata"<% end_if %>> <div id="TreeDropdownField_$ID"
class="TreeDropdownField single<% if extraClass %> $extraClass<% end_if %><% if ShowSearch %> searchable<% end_if %>"
data-url-tree="$Link(tree)"
data-title="$Title"
<% if Description %>title="$Description"<% end_if %>
<% if Metadata %>data-metadata="$Metadata"<% end_if %>>
<input id="$ID" type="hidden" name="$Name" value="$Value" /> <input id="$ID" type="hidden" name="$Name" value="$Value" />
</div> </div>

0 comments on commit 9e4b526

Please sign in to comment.