Merge pull request #1195 from krisawzm/themedata-repeater-patch

Fixes #1194
This commit is contained in:
Samuel Georges 2015-06-14 11:00:58 +10:00
commit f9bb79eacc

View File

@ -74,6 +74,15 @@ class ThemeData extends Model
public function afterFetch()
{
/*
* Repeater form fields store arrays and must be jsonable.
*/
foreach ($this->getFormFields() as $id => $field) {
if (isset($field['type']) && $field['type'] == 'repeater') {
$this->jsonable[] = $id;
}
}
/*
* Fill this model with the jsonable attributes kept in 'data'.
*/