mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 15:06:06 +00:00
field manager: reset to detault
This commit is contained in:
@@ -107,5 +107,18 @@ class FieldManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function postActionResetToDefault($params, $data)
|
||||
{
|
||||
if (empty($data['scope']) || empty($data['name'])) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$this->getContainer()->get('fieldManager')->resetToDefault($data['name'], $data['scope']);
|
||||
|
||||
$this->getContainer()->get('dataManager')->rebuildMetadata();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user