Custom fields
- added listing of custom fields in form editor - ability to delete a custom field - mades changes to the form editor in order to accomodate for the new custom fields system - fix form editor bugs - cleanup
This commit is contained in:
@ -16,6 +16,27 @@ class CustomField extends Model {
|
||||
));
|
||||
}
|
||||
|
||||
function asArray() {
|
||||
$model = parent::asArray();
|
||||
|
||||
$model['params'] = (
|
||||
is_serialized($this->params)
|
||||
? unserialize($this->params)
|
||||
: $this->params
|
||||
);
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
function save() {
|
||||
$this->set('params', (
|
||||
is_serialized($this->params)
|
||||
? $this->params
|
||||
: serialize($this->params)
|
||||
));
|
||||
return parent::save();
|
||||
}
|
||||
|
||||
function subscribers() {
|
||||
return $this->has_many_through(
|
||||
__NAMESPACE__ . '\Subscriber',
|
||||
|
Reference in New Issue
Block a user