mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
ffa33aef74
commit
c35c83bad7
@ -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("/")
|
||||
),
|
||||
|
@ -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}\" />";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user