diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 0140e45..68d859e 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -224,6 +224,7 @@ class HomeController extends Controller $options->put('options',collect($request->post('options'))->sum()); $options->put('msgs_pkt',$request->post('msgs_pkt')); + $options->put('pkt_passwds',$request->post('pkt_passwds') === "1"); $o->servers = $servers; $o->options = $options; diff --git a/app/Http/Requests/SystemSessionRequest.php b/app/Http/Requests/SystemSessionRequest.php index 34fed19..1ee6d16 100644 --- a/app/Http/Requests/SystemSessionRequest.php +++ b/app/Http/Requests/SystemSessionRequest.php @@ -27,7 +27,7 @@ class SystemSessionRequest extends FormRequest return [ 'zone_id' => 'required|exists:zones,id', 'sespass' => 'required|string|min:4', - 'pktpass' => 'required|string|min:4|max:8', + 'pktpass' => [$this->route('o')->pkt_passwds ? 'required' : 'nullable','string','min:4','max:8'], 'ticpass' => 'required|string|min:4', 'fixpass' => 'required|string|min:4', ]; diff --git a/app/Models/Setup.php b/app/Models/Setup.php index 6343a0a..1ac420e 100644 --- a/app/Models/Setup.php +++ b/app/Models/Setup.php @@ -75,6 +75,9 @@ class Setup extends Model case 'msgs_pkt': return Arr::get($this->options,$key,self::MAX_MSGS_PKT); + case 'pkt_passwds': + return Arr::get($this->options,$key,TRUE); + default: return parent::__get($key); } diff --git a/app/Models/System.php b/app/Models/System.php index 9a98568..615670b 100644 --- a/app/Models/System.php +++ b/app/Models/System.php @@ -190,6 +190,11 @@ class System extends Model return $val ?: Setup::findOrFail(config('app.id'))->batch_files; } + public function getPktPasswdsAttribute(?int $val): bool + { + return $val ?: Setup::findOrFail(config('app.id'))->pkt_passwds; + } + public function getIsOwnedAttribute(): bool { return $this->users->count(); diff --git a/resources/views/setup.blade.php b/resources/views/setup.blade.php index 6e64156..6506374 100644 --- a/resources/views/setup.blade.php +++ b/resources/views/setup.blade.php @@ -156,8 +156,6 @@ optionGet(Binkp::F_NOREL,'binkp_options'))) checked @endif> - -

* Recommended Defaults

@@ -238,19 +236,34 @@
-

Echomail Settings

+
+
+

Other Settings

-
-
- -
-
- +
+
+ +
+
+ +
+
+ +
+ pkt_passwds)) checked @endif> + +
+
+
+

* Recommended Defaults

+
+
+
Cancel diff --git a/resources/views/system/widget/form-session.blade.php b/resources/views/system/widget/form-session.blade.php index 39ba6e9..527e2ee 100644 --- a/resources/views/system/widget/form-session.blade.php +++ b/resources/views/system/widget/form-session.blade.php @@ -45,7 +45,7 @@
- + pkt_passwds)> @error('pktpass') {{ $message }}