New templates must have a unique widget alias

This commit is contained in:
Samuel Georges 2019-09-30 20:17:02 +10:00
parent c627e8a0dd
commit c23d671f91
1 changed files with 1 additions and 1 deletions

View File

@ -661,7 +661,7 @@ class Index extends Controller
$widgetConfig = $this->makeConfig($formConfigs[$type]);
$widgetConfig->model = $template;
$widgetConfig->alias = $alias ?: 'form'.studly_case($type).md5($template->getFileName());
$widgetConfig->alias = $alias ?: 'form'.studly_case($type).md5($template->exists ? $template->getFileName() : uniqid());
return $this->makeWidget('Backend\Widgets\Form', $widgetConfig);
}