mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
converting spaces as intentation to tabs
This commit is contained in:
parent
d53a66353b
commit
3434cb2cec
@ -554,7 +554,7 @@ EOS;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only add customScript if $default or $rules is defined
|
// Only add customScript if $default or $rules is defined
|
||||||
if($default || $rules) {
|
if($default || $rules) {
|
||||||
Requirements::customScript(<<<JS
|
Requirements::customScript(<<<JS
|
||||||
(function($) {
|
(function($) {
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
@ -41,9 +41,9 @@ class EditableFileField extends EditableFormField {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$fields->addFieldToTab("Root.Main", new LiteralField("FileUploadWarning",
|
$fields->addFieldToTab("Root.Main", new LiteralField("FileUploadWarning",
|
||||||
"<p class=\"message notice\">" . _t("UserDefinedForm.FileUploadWarning",
|
"<p class=\"message notice\">" . _t("UserDefinedForm.FileUploadWarning",
|
||||||
"Files uploaded through this field could be publicly accessible if the exact URL is known")
|
"Files uploaded through this field could be publicly accessible if the exact URL is known")
|
||||||
. "</p>"), "Type");
|
. "</p>"), "Type");
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
@ -558,7 +558,7 @@ class EditableFormField extends DataObject {
|
|||||||
TextField::create('CustomErrorMessage', _t('EditableFormField.CUSTOMERROR','Custom Error Message'))
|
TextField::create('CustomErrorMessage', _t('EditableFormField.CUSTOMERROR','Custom Error Message'))
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->extend('updateFieldValidationOptions', $fields);
|
$this->extend('updateFieldValidationOptions', $fields);
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
@ -88,6 +88,6 @@ class EditableFormHeading extends EditableFormField {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getLevel() {
|
public function getLevel() {
|
||||||
return $this->getField('Level') ?: 3;
|
return $this->getField('Level') ?: 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ class EditableTextField extends EditableFormField {
|
|||||||
'MinLength' => 'Int',
|
'MinLength' => 'Int',
|
||||||
'MaxLength' => 'Int',
|
'MaxLength' => 'Int',
|
||||||
'Rows' => 'Int(1)',
|
'Rows' => 'Int(1)',
|
||||||
'Placeholder' => 'Varchar(255)'
|
'Placeholder' => 'Varchar(255)'
|
||||||
);
|
);
|
||||||
|
|
||||||
private static $defaults = array(
|
private static $defaults = array(
|
||||||
@ -37,13 +37,13 @@ class EditableTextField extends EditableFormField {
|
|||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
|
||||||
$fields->addFieldToTab(
|
$fields->addFieldToTab(
|
||||||
'Root.Main',
|
'Root.Main',
|
||||||
TextField::create(
|
TextField::create(
|
||||||
'Placeholder',
|
'Placeholder',
|
||||||
_t('EditableTextField.PLACEHOLDER', 'Placeholder')
|
_t('EditableTextField.PLACEHOLDER', 'Placeholder')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
return parent::getCMSFields();
|
return parent::getCMSFields();
|
||||||
@ -105,8 +105,8 @@ class EditableTextField extends EditableFormField {
|
|||||||
$field->setAttribute('data-rule-maxlength', $this->MaxLength);
|
$field->setAttribute('data-rule-maxlength', $this->MaxLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->Placeholder) {
|
if($this->Placeholder) {
|
||||||
$field->setAttribute('placeholder', $this->Placeholder);
|
$field->setAttribute('placeholder', $this->Placeholder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user