parent
810f545ce8
commit
f3c6260c3e
|
|
@ -7,6 +7,7 @@ use System\Models\File;
|
|||
use System\Classes\SystemException;
|
||||
use Backend\Classes\FormWidgetBase;
|
||||
use October\Rain\Support\ValidationException;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* File upload field
|
||||
|
|
@ -163,7 +164,7 @@ class FileUpload extends FormWidgetBase
|
|||
|
||||
throw new SystemException('Unable to find file, it may no longer exist');
|
||||
}
|
||||
catch (\Exception $ex) {
|
||||
catch (Exception $ex) {
|
||||
return json_encode(['error' => $ex->getMessage()]);
|
||||
}
|
||||
}
|
||||
|
|
@ -219,7 +220,7 @@ class FileUpload extends FormWidgetBase
|
|||
$result = $file;
|
||||
|
||||
}
|
||||
catch (\Exception $ex) {
|
||||
catch (Exception $ex) {
|
||||
$result = json_encode(['error' => $ex->getMessage()]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -549,7 +549,7 @@ class Form extends WidgetBase
|
|||
return $this->formWidgets[$field->columnName];
|
||||
|
||||
$widgetConfig = $this->makeConfig($field->config);
|
||||
$widgetConfig->alias = $this->alias . studly_case($field->columnName);
|
||||
$widgetConfig->alias = $this->alias . studly_case(Str::evalHtmlId($field->columnName));
|
||||
$widgetConfig->sessionKey = $this->getSessionKey();
|
||||
|
||||
$widgetName = $widgetConfig->widget;
|
||||
|
|
|
|||
Loading…
Reference in New Issue