File: /var/www/ivs.kaunokolegija.lt/laravel/resources/views/auth/passwords/edit.blade.php
@extends('layouts.admin')
@section('content')
<style>
.login-with-google-btn {
transition: background-color .3s, box-shadow .3s;
padding: 12px 16px 12px 42px;
border: none;
border-radius: 3px;
box-shadow: 0 -1px 0 rgba(0, 0, 0, .04), 0 1px 1px rgba(0, 0, 0, .25);
color: #757575;
font-size: 14px;
font-weight: 500;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTcuNiA5LjJsLS4xLTEuOEg5djMuNGg0LjhDMTMuNiAxMiAxMyAxMyAxMiAxMy42djIuMmgzYTguOCA4LjggMCAwIDAgMi42LTYuNnoiIGZpbGw9IiM0Mjg1RjQiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik05IDE4YzIuNCAwIDQuNS0uOCA2LTIuMmwtMy0yLjJhNS40IDUuNCAwIDAgMS04LTIuOUgxVjEzYTkgOSAwIDAgMCA4IDV6IiBmaWxsPSIjMzRBODUzIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNNCAxMC43YTUuNCA1LjQgMCAwIDEgMC0zLjRWNUgxYTkgOSAwIDAgMCAwIDhsMy0yLjN6IiBmaWxsPSIjRkJCQzA1IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNOSAzLjZjMS4zIDAgMi41LjQgMy40IDEuM0wxNSAyLjNBOSA5IDAgMCAwIDEgNWwzIDIuNGE1LjQgNS40IDAgMCAxIDUtMy43eiIgZmlsbD0iI0VBNDMzNSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PHBhdGggZD0iTTAgMGgxOHYxOEgweiIvPjwvZz48L3N2Zz4=);
background-color: white;
background-repeat: no-repeat;
background-position: 12px 11px;
&:hover {
box-shadow: 0 -1px 0 rgba(0, 0, 0, .04), 0 2px 4px rgba(0, 0, 0, .25);
}
&:active {
background-color: #eeeeee;
}
&:focus {
outline: none;
box-shadow:
0 -1px 0 rgba(0, 0, 0, .04),
0 2px 4px rgba(0, 0, 0, .25),
0 0 0 3px #c8dafc;
}
&:disabled {
filter: grayscale(100%);
background-color: #ebebeb;
box-shadow: 0 -1px 0 rgba(0, 0, 0, .04), 0 1px 1px rgba(0, 0, 0, .25);
cursor: not-allowed;
}
}
</style>
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-header">
{{ trans('global.my_profile') }}
</div>
<div class="card-body">
<form method="POST" action="{{ route("profile.password.updateProfile") }}">
@csrf
<div class="form-group">
<label class="required" for="name">{{ trans('cruds.user.fields.name') }}</label>
<input class="form-control {{ $errors->has('name') ? 'is-invalid' : '' }}" type="text" name="name" id="name" value="{{ old('name', auth()->user()->name) }}" required>
@if($errors->has('name'))
<div class="invalid-feedback">
{{ $errors->first('name') }}
</div>
@endif
</div>
<div class="form-group">
<label class="required" for="title">{{ trans('cruds.user.fields.email') }}</label>
<input class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}" type="text" name="email" id="email" value="{{ old('email', auth()->user()->email) }}" required>
@if($errors->has('email'))
<div class="invalid-feedback">
{{ $errors->first('email') }}
</div>
@endif
</div>
<div class="form-group">
<button class="btn btn-success" type="submit">
{{ trans('global.save') }}
</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-header">
{{ trans('global.change_password') }}
</div>
<div class="card-body">
<form method="POST" action="{{ route("profile.password.update") }}">
@csrf
<div class="form-group">
<label class="required" for="password">{{ trans('global.new_password') }}</label>
<input class="form-control {{ $errors->has('password') ? 'is-invalid' : '' }}" type="password" name="password" id="password" required>
@if($errors->has('password'))
<span class="text-danger">{{ $errors->first('password') }}</span>
@endif
</div>
<div class="form-group">
<label class="required" for="password_confirmation">{{ trans('global.repeate_new_password') }}</label>
<input class="form-control {{ $errors->has('password_confirmation') ? 'is-invalid' : '' }}" type="password" name="password_confirmation" id="password_confirmation" required>
</div>
<div class="form-group">
<button class="btn btn-success" type="submit">
{{ trans('global.save') }}
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
{{-- <div class="col-md-6">
<div class="card">
<div class="card-header">
{{ trans('global.delete_account') }}
</div>
<div class="card-body">
<form method="POST" action="{{ route("profile.password.destroyProfile") }}" onsubmit="return prompt('{{ __('global.delete_account_warning') }}') == '{{ auth()->user()->email }}'">
@csrf
<div class="form-group">
<button class="btn btn-success" type="submit">
{{ trans('global.delete') }}
</button>
</div>
</form>
</div>
</div>
</div> --}}
<div class="col-md-6">
<div class="card">
<div class="card-header">
{{ trans('global.connect_to_google_account') }}
</div>
<div class="card-body">
@csrf
<div class="form-group">
<div class="pt-3"></div>
@if(auth()->user()->isGoogleTokenValid())
<p class="text-success">
<form action="{{ route('admin.google.disconnect') }}" method="POST" style="display: inline;">
@csrf
<button type="submit" class="login-with-google-btn text-danger">{{ trans('global.disconnect_google') }}</button>
</form>
</p>
@else
<a href="{{ route('admin.google.auth') }}" target="_blank" class="login-with-google-btn">
{{ trans('global.login_with_google') }}
</a>
@endif
</div>
</div>
</div>
</div>
</div>
@endsection