mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge branch '4.0'
This commit is contained in:
commit
54e6e9aeb5
@ -59,7 +59,8 @@ class EditableFormHeading extends EditableFormField
|
||||
|
||||
public function getFormField()
|
||||
{
|
||||
$labelField = new HeaderField($this->Name, $this->EscapedTitle, $this->Level);
|
||||
$labelField = HeaderField::create($this->EscapedTitle)
|
||||
->setHeadingLevel($this->Level);
|
||||
$labelField->addExtraClass('FormHeading');
|
||||
$labelField->setAttribute('data-id', $this->Name);
|
||||
$this->doUpdateFormField($labelField);
|
||||
|
@ -162,7 +162,8 @@ class EditableOption extends DataObject
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function onBeforeWrite() {
|
||||
protected function onBeforeWrite()
|
||||
{
|
||||
if (!$this->Sort) {
|
||||
$this->Sort = EditableOption::get()->max('Sort') + 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user