ENHANCEMENT: changed <p class="Actions"> to <div class="Actions">

ENHANCEMENT: Better linebreaks, markup formatting

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43560 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-10-18 01:07:35 +00:00
parent eeb79fde9c
commit 3bb267bd83
4 changed files with 18 additions and 13 deletions

View File

@ -28,7 +28,7 @@ form input.maxlength {
width: auto;
}
form p.actions{
form .actions{
float : right;
}

View File

@ -227,7 +227,7 @@ class FormField extends ViewableData {
if($this->value) $val = $this->dontEscape ? ($this->reserveNL?Convert::raw2xml($this->value):$this->value) : Convert::raw2xml($this->value);
else $val = '<i>(none)</i>';
$valforInput = $this->value ? Convert::raw2att($val) : "";
return "<span class=\"readonly\" id=\"" . $this->id() . "\">$val</span><input type=\"hidden\" name=\"".$this->name."\" value=\"".$valforInput."\" />";
return "<span class=\"readonly\" id=\"" . $this->id() . "\">$val</span>\n<input type=\"hidden\" name=\"".$this->name."\" value=\"".$valforInput."\" />";
}
/**
* Returns a "Field Holder" for this field - used by templates.
@ -266,11 +266,11 @@ HTML;
// set label
if($title = $this->RightTitle()){
$result .= "<label class=\"right\" for=\"" . $this->id() . "\">{$title}</label>";
$result .= "<label class=\"right\" for=\"" . $this->id() . "\">{$title}</label>\n";
} elseif($title = $this->LeftTitle()) {
$result .= "<label class=\"left\" for=\"" . $this->id() . "\">{$title}</label>";
$result .= "<label class=\"left\" for=\"" . $this->id() . "\">{$title}</label>\n";
} elseif($title = $this->Title()) {
$result .= "<label for=\"" . $this->id() . "\">{$title}</label>";
$result .= "<label for=\"" . $this->id() . "\">{$title}</label>\n";
}
$result .= $this->Field();

View File

@ -1 +1,8 @@
<div id="$Name" class="field $Type $extraClass"><% if Title %><label class="left" for="$id">$Title</label><% end_if %><span class="middleColumn">$Field</span><% if RightTitle %><label class="right" for="$id">$RightTitle</label><% end_if %><% if Message %><span class="message $MessageType">$Message</span><% end_if %></div>
<div id="$Name" class="field $Type $extraClass">
<% if Title %><label class="left" for="$id">$Title</label><% end_if %>
<span class="middleColumn">
$Field
</span>
<% if RightTitle %><label class="right" for="$id">$RightTitle</label><% end_if %>
<% if Message %><span class="message $MessageType">$Message</span><% end_if %>
</div>

View File

@ -13,13 +13,11 @@
<div class="clear"><!-- --></div>
</fieldset>
<% if Actions %>
<p class="Actions">
<% control Actions %>
$Field
<% end_control %>
</p>
<% end_if %>
<% if Actions %>
<div class="Actions">
<% control Actions %>$Field<% end_control %>
</div>
<% end_if %>
<% if IncludeFormTag %>
</form>
<% end_if %>