This commit is contained in:
parent
e1b80ae096
commit
ac2a24187d
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="PublishConfigData" autoUpload="On explicit save action" serverName="Development">
|
<component name="PublishConfigData" serverName="Development">
|
||||||
<serverData>
|
<serverData>
|
||||||
<paths name="Development">
|
<paths name="Development">
|
||||||
<serverdata>
|
<serverdata>
|
||||||
@ -10,6 +10,5 @@
|
|||||||
</serverdata>
|
</serverdata>
|
||||||
</paths>
|
</paths>
|
||||||
</serverData>
|
</serverData>
|
||||||
<option name="myAutoUpload" value="ON_EXPLICIT_SAVE" />
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -6,6 +6,8 @@ use App\Facade\Theme;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Password;
|
||||||
|
|
||||||
class ChangePasswordController extends Controller
|
class ChangePasswordController extends Controller
|
||||||
{
|
{
|
||||||
@ -28,8 +30,46 @@ class ChangePasswordController extends Controller
|
|||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function processChangePassword(Request $request)
|
||||||
|
{
|
||||||
|
$this->validate($request, ['password' => 'required|confirmed|min:6']);
|
||||||
|
|
||||||
|
// Here we will attempt to reset the user's password. If it is successful we
|
||||||
|
// will update the password on an actual user model and persist it to the
|
||||||
|
// database. Otherwise we will parse the error and return the response.
|
||||||
|
$response = $this->broker()->reset(
|
||||||
|
$this->credentials($request), function ($user, $password) {
|
||||||
|
$this->resetPassword($user, $password);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// If the password was successfully reset, we will redirect the user back to
|
||||||
|
// the application's home authenticated view. If there is an error we can
|
||||||
|
// redirect them back to where they came from with their error message.
|
||||||
|
return $response == Password::PASSWORD_RESET
|
||||||
|
? $this->sendResetResponse($response)
|
||||||
|
: $this->sendResetFailedResponse($request, $response);
|
||||||
|
}
|
||||||
|
|
||||||
public function showChangePasswordForm(Request $request)
|
public function showChangePasswordForm(Request $request)
|
||||||
{
|
{
|
||||||
return Theme::render('auth.passwords.change_password');
|
return Theme::render('auth.passwords.change_password');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function credentials(Request $request)
|
||||||
|
{
|
||||||
|
$data = $request->only('password', 'password_confirmation', 'token');
|
||||||
|
$data['email'] = Auth::user()->email;
|
||||||
|
|
||||||
|
// Create a token for the password broker to validate
|
||||||
|
$data['token'] = $this->broker()->createToken($this->getUser());
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function sendResetResponse($response)
|
||||||
|
{
|
||||||
|
return redirect($this->redirectPath())
|
||||||
|
->with('status', trans('passwords.changed'));
|
||||||
|
}
|
||||||
}
|
}
|
@ -13,6 +13,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
'changed' => 'Your password has been changed.',
|
||||||
'password' => 'Passwords must be at least six characters and match the confirmation.',
|
'password' => 'Passwords must be at least six characters and match the confirmation.',
|
||||||
'reset' => 'Your password has been reset!',
|
'reset' => 'Your password has been reset!',
|
||||||
'sent' => 'We have sent your password reset link to your e-mail address.',
|
'sent' => 'We have sent your password reset link to your e-mail address.',
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
|
|
||||||
@if (count($existing_groups) > 0)
|
@if (count($existing_groups) > 0)
|
||||||
<div class="panel-group" id="groups-accordion" role="tablist" aria-multiselectable="true">
|
<div id="groups-accordion" role="tablist" aria-multiselectable="true">
|
||||||
@foreach ($existing_groups as $group)
|
@foreach ($existing_groups as $group)
|
||||||
@include(Theme::viewName('partials.album_permissions'), [
|
@include(Theme::viewName('partials.album_permissions'), [
|
||||||
'key_id' => 'group_' . $group->id,
|
'key_id' => 'group_' . $group->id,
|
||||||
@ -59,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="row">
|
<div class="row mt-3">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<select class="form-control" name="group_id" style="margin-bottom: 2px;"@if (count($add_new_groups) == 0) disabled="disabled"@endif>
|
<select class="form-control" name="group_id" style="margin-bottom: 2px;"@if (count($add_new_groups) == 0) disabled="disabled"@endif>
|
||||||
@foreach ($add_new_groups as $group)
|
@foreach ($add_new_groups as $group)
|
||||||
@ -84,7 +84,7 @@
|
|||||||
<form action="{{ route('albums.set_user_permissions', ['id' => $album->id]) }}" method="post">
|
<form action="{{ route('albums.set_user_permissions', ['id' => $album->id]) }}" method="post">
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
|
|
||||||
<div class="panel-group" id="users-accordion" role="tablist" aria-multiselectable="true">
|
<div id="users-accordion" role="tablist" aria-multiselectable="true">
|
||||||
{{-- Anonymous users --}}
|
{{-- Anonymous users --}}
|
||||||
@include(Theme::viewName('partials.album_permissions'), [
|
@include(Theme::viewName('partials.album_permissions'), [
|
||||||
'key_id' => 'anonymous',
|
'key_id' => 'anonymous',
|
||||||
@ -107,7 +107,7 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row mt-3">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<input class="form-control" name="user_name" id="user-search-textbox" size="20" style="margin-bottom: 2px;" />
|
<input class="form-control" name="user_name" id="user-search-textbox" size="20" style="margin-bottom: 2px;" />
|
||||||
<input type="hidden" name="user_id" id="user-id-field" />
|
<input type="hidden" name="user_id" id="user-id-field" />
|
||||||
@ -248,16 +248,6 @@
|
|||||||
$('.nav-tabs a[href="#upload-tab"]').tab('show');
|
$('.nav-tabs a[href="#upload-tab"]').tab('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
{{-- Photo editing tasks - the buttons beneath the photos in partials/single_photo_admin --}}
|
|
||||||
/*$('a.change-album').click(editViewModel.changeAlbum);
|
|
||||||
$('a.delete-photo').click(editViewModel.delete);
|
|
||||||
$('a.flip-photo-both').click(editViewModel.flipBoth);
|
|
||||||
$('a.flip-photo-horizontal').click(editViewModel.flipHorizontal);
|
|
||||||
$('a.flip-photo-vertical').click(editViewModel.flipVertical);
|
|
||||||
$('a.regenerate-thumbnails').click(editViewModel.regenerateThumbnails);
|
|
||||||
$('a.rotate-photo-left').click(editViewModel.rotateLeft);
|
|
||||||
$('a.rotate-photo-right').click(editViewModel.rotateRight);*/
|
|
||||||
|
|
||||||
{{-- Photo uploads using AJAX --}}
|
{{-- Photo uploads using AJAX --}}
|
||||||
if (window.FormData)
|
if (window.FormData)
|
||||||
{
|
{
|
||||||
|
@ -14,9 +14,13 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<form role="form" method="POST" action="{{ url('/password/change') }}">
|
<form role="form" method="POST" action="{{ route('auth.processChangePassword') }}">
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
|
|
||||||
|
@if ($errors->has('email'))
|
||||||
|
<div class="alert alert-danger">{{ $errors->first('email') }}</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="form-group row{{ $errors->has('password') ? ' has-danger' : '' }}">
|
<div class="form-group row{{ $errors->has('password') ? ' has-danger' : '' }}">
|
||||||
<label for="password" class="col-md-4 col-form-label text-md-right">@lang('forms.password_label')</label>
|
<label for="password" class="col-md-4 col-form-label text-md-right">@lang('forms.password_label')</label>
|
||||||
|
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
@extends('themes.base.layout')
|
@extends('themes.base.layout')
|
||||||
@section('title', $album->name)
|
@section('title', $album->name)
|
||||||
|
|
||||||
@section('breadcrumb')
|
@section('content')
|
||||||
<div class="breadcrumb">
|
<div class="container-fluid">
|
||||||
<div class="container">
|
<div class="row">
|
||||||
<ol class="breadcrumb">
|
<div class="col">
|
||||||
<li><a href="{{ route('home') }}">Gallery</a></li>
|
<ol class="breadcrumb">
|
||||||
<li class="active">{{ $album->name }}</li>
|
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
||||||
</ol>
|
<li class="breadcrumb-item active">{{ $album->name }}</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('content')
|
<div class="container-fluid album-container">
|
||||||
<div class="container album-container">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
@include(\App\Facade\Theme::viewName('partials.album_view_selector'))
|
@include(\App\Facade\Theme::viewName('partials.album_view_selector'))
|
||||||
</div>
|
</div>
|
||||||
@ -28,19 +28,22 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@foreach ($photos as $photo)
|
@foreach ($photos as $photo)
|
||||||
<div class="col-xs-12 col-sm-4 photo">
|
<div class="col-sm-6 col-md-4 col-lg-3 photo">
|
||||||
<div class="panel panel-default">
|
<div class="card">
|
||||||
<div class="panel-body" style="padding: 4px;">
|
<img src="{{ $photo->thumbnailUrl('preview') }}" alt="" class="card-img-top"/>
|
||||||
<a href="{{ $photo->url() }}"><img src="{{ $photo->thumbnailUrl('preview') }}" alt="" class="img-responsive img-rounded"/></a>
|
<div class="card-block">
|
||||||
|
<h4 class="card-title"><a href="{{ $photo->url() }}">{{ $photo->name }}</a></h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<small class="text-muted"><i class="fa fa-fw fa-calendar"></i> {{ date('Y-m-d H:i', $photo->taken_at) }}</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-footer"><b><a href="{{ $photo->url() }}">{{ $photo->name }}</a></b></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin-top: 15px;">
|
<div class="row" style="margin-top: 15px;">
|
||||||
<div class="col-xs-12 text-center">
|
<div class="col text-center">
|
||||||
{{ $photos->links() }}
|
{{ $photos->links() }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,20 +2,14 @@
|
|||||||
@section('title', $album->name)
|
@section('title', $album->name)
|
||||||
|
|
||||||
@section('breadcrumb')
|
@section('breadcrumb')
|
||||||
<div class="breadcrumb">
|
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
||||||
<div class="container">
|
<li class="breadcrumb-item active">{{ $album->name }}</li>
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
|
||||||
<li class="active">{{ $album->name }}</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container album-container">
|
<div class="container album-container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-8 col-sm-offset-2 text-center">
|
<div class="col-md-8 offset-md-2 text-center">
|
||||||
<h1>@lang('gallery.album_no_results_heading')</h1>
|
<h1>@lang('gallery.album_no_results_heading')</h1>
|
||||||
<p style="line-height: 1.6em;">@lang('gallery.album_no_results_text', ['admin_link' => sprintf('<a href="%s">%s</a>', route('admin'), trans('admin.title'))])</p>
|
<p style="line-height: 1.6em;">@lang('gallery.album_no_results_text', ['admin_link' => sprintf('<a href="%s">%s</a>', route('admin'), trans('admin.title'))])</p>
|
||||||
<p style="margin-bottom: 30px; line-height: 1.6em;">@lang('gallery.album_no_results_text_2')</p>
|
<p style="margin-bottom: 30px; line-height: 1.6em;">@lang('gallery.album_no_results_text_2')</p>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
@if (count($albums) > 0)
|
@if (count($albums) > 0)
|
||||||
<div class="row album-photo-cards">
|
<div class="row album-photo-cards">
|
||||||
@foreach ($albums as $album)
|
@foreach ($albums as $album)
|
||||||
<div class="col-md-3">
|
<div class="col-sm-6 col-md-4 col-lg-3">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<img class="card-img-top" src="{{ $album->thumbnailUrl('preview') }}"/>
|
<img class="card-img-top" src="{{ $album->thumbnailUrl('preview') }}"/>
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<div class="panel panel-default">
|
<div class="card">
|
||||||
<div class="panel-heading" role="tab" id="heading-{{ $key_id }}">
|
<div class="card-header" role="tab" id="heading-{{ $key_id }}">
|
||||||
<h4 class="panel-title">
|
<h5 class="mb-0">
|
||||||
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#{{ $parent_id }}" href="#collapse-{{ $key_id }}" aria-expanded="true" aria-controls="collapse-{{ $key_id }}">{{ $title }}</a>
|
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#{{ $parent_id }}" href="#collapse-{{ $key_id }}" aria-expanded="true" aria-controls="collapse-{{ $key_id }}">{{ $title }}</a>
|
||||||
</h4>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div id="collapse-{{ $key_id }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-{{ $key_id }}">
|
<div id="collapse-{{ $key_id }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-{{ $key_id }}">
|
||||||
<div class="panel-body">
|
<div class="card-block">
|
||||||
<p style="margin-bottom: 20px;"><a class="select-all" href="#">Select All</a> · <a class="select-none" href="">Select None</a></p>
|
<p style="margin-bottom: 20px;"><a class="select-all" href="#">Select All</a> · <a class="select-none" href="">Select None</a></p>
|
||||||
|
|
||||||
@foreach ($all_permissions as $permission)
|
@foreach ($all_permissions as $permission)
|
||||||
|
@ -65,6 +65,7 @@ Route::group(['prefix' => 'install'], function () {
|
|||||||
Route::get('/', 'Gallery\DefaultController@index')->name('home');
|
Route::get('/', 'Gallery\DefaultController@index')->name('home');
|
||||||
Route::get('/activate/{token}', 'Auth\ActivateController@activate')->name('auth.activate');
|
Route::get('/activate/{token}', 'Auth\ActivateController@activate')->name('auth.activate');
|
||||||
Route::get('/password/change', 'Auth\ChangePasswordController@showChangePasswordForm')->name('auth.changePassword');
|
Route::get('/password/change', 'Auth\ChangePasswordController@showChangePasswordForm')->name('auth.changePassword');
|
||||||
|
Route::post('/password/change', 'Auth\ChangePasswordController@processChangePassword')->name('auth.processChangePassword');
|
||||||
Route::get('{albumUrlAlias}', 'Gallery\AlbumController@index')->name('viewAlbum');
|
Route::get('{albumUrlAlias}', 'Gallery\AlbumController@index')->name('viewAlbum');
|
||||||
Route::get('{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@show')->name('viewPhoto');
|
Route::get('{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@show')->name('viewPhoto');
|
||||||
Route::get('photo/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@download')->name('downloadPhoto');
|
Route::get('photo/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@download')->name('downloadPhoto');
|
Loading…
Reference in New Issue
Block a user