mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-25 03:35:35 +00:00
Updated settings-save action to return to the same section
This commit is contained in:
parent
3991fbe726
commit
b4f2b73590
@ -5,8 +5,6 @@ use BookStack\Notifications\TestEmail;
|
||||
use BookStack\Uploads\ImageRepo;
|
||||
use BookStack\Uploads\ImageService;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Setting;
|
||||
|
||||
class SettingController extends Controller
|
||||
{
|
||||
@ -14,7 +12,6 @@ class SettingController extends Controller
|
||||
|
||||
/**
|
||||
* SettingController constructor.
|
||||
* @param $imageRepo
|
||||
*/
|
||||
public function __construct(ImageRepo $imageRepo)
|
||||
{
|
||||
@ -22,10 +19,8 @@ class SettingController extends Controller
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display a listing of the settings.
|
||||
* @return Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
@ -43,8 +38,6 @@ class SettingController extends Controller
|
||||
|
||||
/**
|
||||
* Update the specified settings in storage.
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
*/
|
||||
public function update(Request $request)
|
||||
{
|
||||
@ -78,12 +71,11 @@ class SettingController extends Controller
|
||||
}
|
||||
|
||||
$this->showSuccessNotification(trans('settings.settings_save_success'));
|
||||
return redirect('/settings');
|
||||
return redirect('/settings#' . $request->get('section', ''));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the page for application maintenance.
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function showMaintenance()
|
||||
{
|
||||
@ -98,9 +90,6 @@ class SettingController extends Controller
|
||||
|
||||
/**
|
||||
* Action to clean-up images in the system.
|
||||
* @param Request $request
|
||||
* @param ImageService $imageService
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
*/
|
||||
public function cleanupImages(Request $request, ImageService $imageService)
|
||||
{
|
||||
@ -127,11 +116,8 @@ class SettingController extends Controller
|
||||
|
||||
/**
|
||||
* Action to send a test e-mail to the current user.
|
||||
* @param Request $request
|
||||
* @param User $user
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
*/
|
||||
public function sendTestEmail(Request $request)
|
||||
public function sendTestEmail()
|
||||
{
|
||||
$this->checkPermission('settings-manage');
|
||||
|
||||
|
@ -15,9 +15,10 @@
|
||||
</div>
|
||||
|
||||
<div class="card content-wrap auto-height">
|
||||
<h2 class="list-heading">{{ trans('settings.app_features_security') }}</h2>
|
||||
<h2 id="features" class="list-heading">{{ trans('settings.app_features_security') }}</h2>
|
||||
<form action="{{ url("/settings") }}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="section" value="features">
|
||||
|
||||
<div class="setting-list">
|
||||
|
||||
@ -79,9 +80,10 @@
|
||||
</div>
|
||||
|
||||
<div class="card content-wrap auto-height">
|
||||
<h2 class="list-heading">{{ trans('settings.app_customization') }}</h2>
|
||||
<h2 id="customization" class="list-heading">{{ trans('settings.app_customization') }}</h2>
|
||||
<form action="{{ url("/settings") }}" method="POST" enctype="multipart/form-data">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="section" value="customization">
|
||||
|
||||
<div class="setting-list">
|
||||
|
||||
@ -202,9 +204,10 @@
|
||||
</div>
|
||||
|
||||
<div class="card content-wrap auto-height">
|
||||
<h2 class="list-heading">{{ trans('settings.reg_settings') }}</h2>
|
||||
<h2 id="registration" class="list-heading">{{ trans('settings.reg_settings') }}</h2>
|
||||
<form action="{{ url("/settings") }}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="section" value="registration">
|
||||
|
||||
<div class="setting-list">
|
||||
<div class="grid half gap-xl">
|
||||
|
Loading…
Reference in New Issue
Block a user