Merge pull request #3613 from devansh-webkul/translation_issue_on_high_size_image

Fixed translation issue on uploading high size image #3570
This commit is contained in:
Jitendra Singh 2020-08-05 11:06:24 +05:30 committed by GitHub
commit 14485e28ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 4 deletions

View File

@ -29,9 +29,17 @@ class ConfigurationForm extends FormRequest
if (request()->has('general.design.admin_logo.logo_image')
&& ! request()->input('general.design.admin_logo.logo_image.delete')
) {
$this->rules = [
'general.design.admin_logo.logo_image' => 'required|mimes:jpeg,bmp,png,jpg',
];
$this->rules = array_merge($this->rules, [
'general.design.admin_logo.logo_image' => 'required|mimes:jpeg,bmp,png,jpg|max:5000',
]);
}
if (request()->has('general.design.admin_logo.favicon')
&& ! request()->input('general.design.admin_logo.favicon.delete')
) {
$this->rules = array_merge($this->rules, [
'general.design.admin_logo.favicon' => 'required|mimes:jpeg,bmp,png,jpg|max:5000',
]);
}
return $this->rules;
@ -48,4 +56,15 @@ class ConfigurationForm extends FormRequest
'general.design.admin_logo.logo_image.mimes' => 'Invalid file format. Use only jpeg, bmp, png, jpg.',
];
}
}
/**
* Set the attribute name.
*/
public function attributes()
{
return [
'general.design.admin_logo.logo_image' => 'Logo Image',
'general.design.admin_logo.favicon' => 'Favicon Image'
];
}
}