elofgren: USABILITY: Make Page URL input field wider as part of fix for http://support.silverstripe.com/gsoc/ticket/35

(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42034 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-16 02:00:59 +00:00
parent ffa33aef74
commit c35c83bad7
2 changed files with 8 additions and 3 deletions

View File

@ -991,7 +991,10 @@ class SiteTree extends DataObject {
"[^A-Za-z0-9-]+",
"-",
"URLs can only be made up of letters, digits and hyphens.",
""
"",
"",
"",
50
),
new LabelField("/")
),

View File

@ -50,10 +50,12 @@ class UniqueTextField extends TextField {
}
*/
$fieldSize = $this->maxLength ? min( $this->maxLength, 30 ) : 30;
if($this->maxLength){
return /*implode("", $restrictedInputs).*/"<input class=\"".$this->class."\" type=\"text\" id=\"" . $this->id() . "\" name=\"{$this->name}\" value=\"" . $this->attrValue() . "\" maxlength=\"$this->maxLength\" /><input type=\"hidden\" name=\"restricted-messages[".$this->id()."]\" id=\"".$this->id()."-restricted-message\" value=\"{$this->restrictedMessage}\" />";
return /*implode("", $restrictedInputs).*/"<input class=\"".$this->class."\" type=\"text\" id=\"" . $this->id() . "\" name=\"{$this->name}\" value=\"" . $this->attrValue() . "\" maxlength=\"$this->maxLength\" size=\"$fieldSize\" /><input type=\"hidden\" name=\"restricted-messages[".$this->id()."]\" id=\"".$this->id()."-restricted-message\" value=\"{$this->restrictedMessage}\" />";
}else{
return /*implode("", $restrictedInputs).*/"<input class=\"".$this->class."\" type=\"text\" id=\"" . $this->id() . "\" name=\"{$this->name}\" value=\"" . $this->attrValue() . "\" /><input type=\"hidden\" name=\"restricted-messages[".$this->id()."]\" id=\"".$this->id()."-restricted-message\" value=\"{$this->restrictedMessage}\" />";
return /*implode("", $restrictedInputs).*/"<input class=\"".$this->class."\" type=\"text\" id=\"" . $this->id() . "\" name=\"{$this->name}\" value=\"" . $this->attrValue() . "\" size=\"30\" /><input type=\"hidden\" name=\"restricted-messages[".$this->id()."]\" id=\"".$this->id()."-restricted-message\" value=\"{$this->restrictedMessage}\" />";
}
}
}