mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Fixed default level in HeaderField - was duplicating defaults already present in two other places (see r66639)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@66646 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
be6e67a20f
commit
29c2757841
@ -19,12 +19,12 @@ class HeaderField extends DatalessField {
|
|||||||
if(!isset($args[1]) || is_numeric($args[1])) {
|
if(!isset($args[1]) || is_numeric($args[1])) {
|
||||||
$title = (isset($args[0])) ? $args[0] : null;
|
$title = (isset($args[0])) ? $args[0] : null;
|
||||||
$name = $title; // this means i18nized fields won't be easily accessible through fieldByName()
|
$name = $title; // this means i18nized fields won't be easily accessible through fieldByName()
|
||||||
$headingLevel = (isset($args[1])) ? $args[1] : 2;
|
$headingLevel = (isset($args[1])) ? $args[1] : null;
|
||||||
$allowHTML = (isset($args[2])) ? $args[2] : null;
|
$allowHTML = (isset($args[2])) ? $args[2] : null;
|
||||||
$form = (isset($args[3])) ? $args[3] : null;
|
$form = (isset($args[3])) ? $args[3] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->headingLevel = $headingLevel;
|
if($headingLevel) $this->headingLevel = $headingLevel;
|
||||||
$this->allowHTML = $allowHTML;
|
$this->allowHTML = $allowHTML;
|
||||||
|
|
||||||
parent::__construct($name, $title, null, $form);
|
parent::__construct($name, $title, null, $form);
|
||||||
|
Loading…
Reference in New Issue
Block a user