diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 989fe8c494..6a2add40ec 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -421,6 +421,7 @@ class SettingsController extends Controller // Only allow the site name and CSS to be changed if lock_passwords is false // Because public demos make people act like dicks if (! config('app.lock_passwords')) { + $request->validate(['site_name' => 'required']); $setting->site_name = $request->input('site_name'); $setting->custom_css = $request->input('custom_css'); } diff --git a/package-lock.json b/package-lock.json index 57963d4134..4eecbaf170 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "jquery-slimscroll": "^1.3.8", "jquery-ui": "^1.13.2", "jquery-ui-bundle": "^1.12.1", + "jquery-validation": "^1.20.0", "jquery.iframe-transport": "^1.0.0", "jspdf-autotable": "^3.7.1", "less": "^4.2.0", @@ -7087,6 +7088,14 @@ "version": "1.12.1", "license": "MIT" }, + "node_modules/jquery-validation": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/jquery-validation/-/jquery-validation-1.20.0.tgz", + "integrity": "sha512-c8tg4ltIIP6L7l0bZ79sRzOJYquyjS48kQZ6iv8MJ2r0OYztxtkWYKTReZyU2/zVFYiINB29i0Z/IRNNuJQN1g==", + "peerDependencies": { + "jquery": "^1.7 || ^2.0 || ^3.1" + } + }, "node_modules/jquery.iframe-transport": { "version": "1.0.0", "license": "MIT" diff --git a/package.json b/package.json index 8c841a2396..93080aae48 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "jquery-slimscroll": "^1.3.8", "jquery-ui": "^1.13.2", "jquery-ui-bundle": "^1.12.1", + "jquery-validation": "^1.20.0", "jquery.iframe-transport": "^1.0.0", "jspdf-autotable": "^3.7.1", "less": "^4.2.0", diff --git a/resources/views/depreciations/edit.blade.php b/resources/views/depreciations/edit.blade.php index 3d10a221d4..a3f5b339b1 100755 --- a/resources/views/depreciations/edit.blade.php +++ b/resources/views/depreciations/edit.blade.php @@ -17,7 +17,7 @@