Readonly work

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44437 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Romain Louis 2007-11-07 04:17:58 +00:00
parent 8a244ce72a
commit fc531da28b

View File

@ -177,7 +177,7 @@ class HtmlEditorField extends TextareaField {
class HtmlEditorField_readonly extends ReadonlyField {
function Field() {
$valforInput = $this->value ? Convert::raw2att($this->value) : "";
return "<span class=\"readonly typography\" id=\"" . $this->id() . "\">$this->value</span><input type=\"hidden\" name=\"".$this->name."\" value=\"".$valforInput."\" />";
return "<span class=\"readonly typography\" id=\"" . $this->id() . "\">" . ( $this->value && $this->value != '<p></p>' ? $this->value : '<i>(not set)</i>' ) . "</span><input type=\"hidden\" name=\"".$this->name."\" value=\"".$valforInput."\" />";
}
function Type() {
return 'htmleditorfield readonly';