Slightly different fix to #580. Closes #580

This commit is contained in:
Sam Georges 2014-09-06 22:02:56 +10:00
parent 810f545ce8
commit f3c6260c3e
2 changed files with 4 additions and 3 deletions

View File

@ -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()]);
}

View File

@ -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;