mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 22:19:41 -08:00
Trying to get the login screen working
This commit is contained in:
parent
5458e44a40
commit
31933a56fa
|
@ -38,11 +38,14 @@ class LoginForm extends Component
|
||||||
$this->can_submit = false;
|
$this->can_submit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->validateOnly($fields);
|
$whatever = $this->validateOnly($fields);
|
||||||
|
//\Log::info(print_r($whatever,true));
|
||||||
|
|
||||||
$this->can_submit = true;
|
$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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,7 +61,7 @@ class LoginForm extends Component
|
||||||
public function submitForm()
|
public function submitForm()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->can_submit = true;
|
//$this->can_submit = true;
|
||||||
|
|
||||||
if (auth()->attempt($this->validate())) {
|
if (auth()->attempt($this->validate())) {
|
||||||
return redirect()->intended('/');
|
return redirect()->intended('/');
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<i class="fas fa-user" aria-hidden="true"></i>
|
<i class="fas fa-user" aria-hidden="true"></i>
|
||||||
{{ trans('admin/users/table.username') }}
|
{{ trans('admin/users/table.username') }}
|
||||||
</label>
|
</label>
|
||||||
<input class="form-control" placeholder="{{ trans('admin/users/table.username') }}" name="username" type="text" autocomplete="off" wire:model="username" wire:model.defer="username" wire:model.lazy="username">
|
<input class="form-control" placeholder="{{ trans('admin/users/table.username') }}" name="username" type="text" autocomplete="off" wire:model="username">
|
||||||
@error('username')
|
@error('username')
|
||||||
<span class="alert-msg">
|
<span class="alert-msg">
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
<i class="fas fa-key" aria-hidden="true"></i>
|
<i class="fas fa-key" aria-hidden="true"></i>
|
||||||
{{ trans('admin/users/table.password') }}
|
{{ trans('admin/users/table.password') }}
|
||||||
</label>
|
</label>
|
||||||
<input class="form-control" placeholder="{{ trans('admin/users/table.password') }}" name="password" type="password" wire:model="password" wire:model.lazy="password" wire:model.defer="password" autocomplete="off">
|
<input class="form-control" placeholder="{{ trans('admin/users/table.password') }}" name="password" type="password" wire:model="password" autocomplete="off">
|
||||||
@error('password')
|
@error('password')
|
||||||
<span class="alert-msg">
|
<span class="alert-msg">
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
|
|
Loading…
Reference in a new issue