From 1a1b8913092a8512f0bb00c2c58b39e9942a92fa Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Thu, 30 May 2024 16:49:05 -0700 Subject: [PATCH] Remove unused Login Livewire component --- app/Http/Livewire/LoginForm.php | 75 ------------- resources/views/livewire/login-form.blade.php | 106 ------------------ 2 files changed, 181 deletions(-) delete mode 100644 app/Http/Livewire/LoginForm.php delete mode 100644 resources/views/livewire/login-form.blade.php diff --git a/app/Http/Livewire/LoginForm.php b/app/Http/Livewire/LoginForm.php deleted file mode 100644 index 8c8dd603b1..0000000000 --- a/app/Http/Livewire/LoginForm.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @version v6.0 - * @return Array - */ - public function rules() - { - return [ - 'username' => 'required|string|max:255', - 'password' => 'required', - ]; - } - - /** - * Perform the validation - * - * @author A. Gianotto - * @version v6.0 - */ - public function updated($fields) - { - - if (is_null($fields) || empty($fields)) { - $this->can_submit = false; - } - - $whatever = $this->validateOnly($fields); - - $errors = $this->getErrorBag(); - - $this->can_submit = $this->username !== "" && $this->password !== "" && !$errors->has('username') && !$errors->has('password') ; // wait, what? - - Log::info("Oy - can we submit yet?!".$this->can_submit); - } - - /** - * Actually do the login thing - * - * @todo fix missing LDAP stuff maybe? Not sure if it - * makes sense to even do this via LiveWire, since - * our login system is pretty complicated. - * - * @author A. Gianotto - * @version v6.0 - */ - public function submitForm() - { - - //$this->can_submit = true; - - if (auth()->attempt($this->validate())) { - return redirect()->intended('/'); - } else { - return session()->flash('error', trans('auth/message.account_not_found')); - } - - } - - -} diff --git a/resources/views/livewire/login-form.blade.php b/resources/views/livewire/login-form.blade.php deleted file mode 100644 index 264361c133..0000000000 --- a/resources/views/livewire/login-form.blade.php +++ /dev/null @@ -1,106 +0,0 @@ -
-
- - - - - - -
-
- -
- - - -
- -
-
-
- -
\ No newline at end of file