mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
MINOR Some code cleanup
This commit is contained in:
parent
d9ff70595f
commit
63469ced2f
@ -76,11 +76,9 @@ class FieldEditor extends FormField {
|
|||||||
|
|
||||||
if($fields) {
|
if($fields) {
|
||||||
foreach($fields as $field) {
|
foreach($fields as $field) {
|
||||||
if(!$this->canEdit()) {
|
if(!$this->canEdit() && is_a($field, 'FormField')) {
|
||||||
if(is_a($field, 'FormField')) {
|
$fields->remove($field);
|
||||||
$fields->remove($field);
|
$fields->push($field->performReadonlyTransformation());
|
||||||
$fields->push($field->performReadonlyTransformation());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -173,8 +171,7 @@ class FieldEditor extends FormField {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a field to the field editor. Called via a ajax get request
|
* Add a field to the field editor. Called via a ajax get request from the userdefinedform javascript
|
||||||
* from the userdefinedform javascript
|
|
||||||
*
|
*
|
||||||
* @return bool|html
|
* @return bool|html
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user