2016-09-05 15:28:56 +01:00
|
|
|
@extends('themes.base.layout')
|
|
|
|
@section('title', trans('admin.settings_title'))
|
|
|
|
|
2016-09-09 15:06:34 +01:00
|
|
|
@section('breadcrumb')
|
2017-03-22 16:55:39 +00:00
|
|
|
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
|
|
|
<li class="breadcrumb-item"><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
|
|
|
|
<li class="breadcrumb-item active">@lang('navigation.breadcrumb.settings')</li>
|
2016-09-09 15:06:34 +01:00
|
|
|
@endsection
|
|
|
|
|
2016-09-05 15:28:56 +01:00
|
|
|
@section('content')
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
2017-03-22 16:55:39 +00:00
|
|
|
<div class="col">
|
2016-09-05 15:28:56 +01:00
|
|
|
<h1>@yield('title')</h1>
|
2017-02-13 10:36:53 +00:00
|
|
|
<p style="margin-bottom: 30px;">@lang('admin.settings_intro')</p>
|
2016-09-05 15:28:56 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<form action="{{ route('admin.saveSettings') }}" method="post">
|
|
|
|
{{ csrf_field() }}
|
|
|
|
<div>
|
|
|
|
{{-- Nav tabs --}}
|
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
|
|
@include(Theme::viewName('partials.tab'), ['active_tab' => 'general', 'tab_name' => 'general', 'tab_icon' => 'info-circle', 'tab_text' => trans('admin.settings_general_tab')])
|
|
|
|
@include(Theme::viewName('partials.tab'), ['active_tab' => 'general', 'tab_name' => 'email', 'tab_icon' => 'envelope', 'tab_text' => trans('admin.settings_email_tab')])
|
|
|
|
@include(Theme::viewName('partials.tab'), ['active_tab' => 'general', 'tab_name' => 'security', 'tab_icon' => 'lock', 'tab_text' => trans('admin.settings_security_tab')])
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{{-- Tab panes --}}
|
|
|
|
<div class="tab-content">
|
|
|
|
{{-- General --}}
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="general-tab">
|
|
|
|
<div class="form-group{{ $errors->has('app_name') ? ' has-danger' : '' }}">
|
|
|
|
<label class="form-control-label" for="gallery-name">Gallery name:</label>
|
|
|
|
<input type="text" class="form-control" id="gallery-name" name="app_name" value="{{ old('app_name', $config['app_name']) }}">
|
|
|
|
|
|
|
|
@if ($errors->has('app_name'))
|
|
|
|
<div class="form-control-feedback">
|
|
|
|
<strong>{{ $errors->first('app_name') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2016-09-05 15:28:56 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-4">
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" for="date-format">Date format:</label>
|
|
|
|
<select name="date_format" id="date-format" class="form-control">
|
|
|
|
@foreach ($date_formats as $key => $value)
|
|
|
|
<option value="{{ $key }}"{{ old('date_format', $config['date_format']) == $key ? ' selected="selected"' : '' }}>{{ $value }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
|
|
|
|
@if ($errors->has('date_format'))
|
|
|
|
<div class="form-control-feedback">
|
|
|
|
<strong>{{ $errors->first('date_format') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2016-09-05 15:28:56 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-09-05 15:36:46 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-4">
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" for="theme">Theme:</label>
|
|
|
|
<select name="theme" id="theme" class="form-control">
|
|
|
|
@foreach ($theme_names as $key => $value)
|
|
|
|
<option value="{{ $key }}"{{ old('theme', $config['theme']) == $key ? ' selected="selected"' : '' }}>{{ $value }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
|
|
|
|
@if ($errors->has('theme'))
|
|
|
|
<div class="form-control-feedback">
|
|
|
|
<strong>{{ $errors->first('theme') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2016-09-05 15:36:46 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-09-05 21:43:58 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<hr/>
|
|
|
|
<fieldset>
|
|
|
|
<legend>"Powered by" footer link</legend>
|
|
|
|
<p>To help spread the word about Blue Twilight, I'd really appreciate it if you left the "Powered by" notice in your gallery's footer.</p>
|
|
|
|
<p>This is not compulsory, however, and you may remove it by checking the box below.</p>
|
|
|
|
|
|
|
|
<div class="form-check" style="margin-top: 20px;">
|
|
|
|
<label class="form-check-label">
|
|
|
|
<input class="form-check-input" type="checkbox" name="remove_copyright" @if (old('remove_copyright', UserConfig::get('remove_copyright')))checked="checked"@endif>
|
|
|
|
<strong>Remove "Powered by" notice from the public gallery</strong>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<hr/>
|
|
|
|
<fieldset>
|
|
|
|
<legend>@lang('admin.visitor_analytics_heading')</legend>
|
|
|
|
<p>@lang('admin.visitor_analytics_p')</p>
|
|
|
|
<p>@lang('admin.visitor_analytics_p2')</p>
|
2016-10-28 16:07:24 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<textarea class="form-control" rows="10" name="analytics_code">{{ old('analytics_code', $config['analytics_code']) }}</textarea>
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
2016-10-28 16:07:24 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
{{-- E-mail --}}
|
|
|
|
<div role="tabpanel" class="tab-pane" id="email-tab">
|
|
|
|
<div class="form-group{{ $errors->has('sender_name') ? ' has-danger' : '' }}">
|
|
|
|
<label class="form-control-label" for="email-sender-name">Sender name:</label>
|
|
|
|
<input type="text" class="form-control" id="email-sender-name" name="sender_name" value="{{ old('sender_name', $config['sender_name']) }}">
|
|
|
|
|
|
|
|
@if ($errors->has('sender_name'))
|
|
|
|
<div class="form-control-feedback">
|
|
|
|
<strong>{{ $errors->first('sender_name') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2016-10-06 15:27:51 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div class="form-group{{ $errors->has('sender_address') ? ' has-danger' : '' }}">
|
|
|
|
<label class="form-control-label" for="email-sender-address">Sender address:</label>
|
|
|
|
<input type="text" class="form-control" id="email-sender-address" name="sender_address" value="{{ old('sender_address', $config['sender_address']) }}">
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
@if ($errors->has('sender_address'))
|
|
|
|
<div class="form-control-feedback">
|
|
|
|
<strong>{{ $errors->first('sender_address') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<fieldset style="margin-top: 20px;">
|
|
|
|
<legend>SMTP Server</legend>
|
|
|
|
<p style="margin-bottom: 15px;">Configure your SMTP server using the settings below. If your server does not require authentication, leave the Username and Password fields empty.</p>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div class="form-group{{ $errors->has('smtp_server') ? ' has-danger' : '' }}">
|
|
|
|
<label class="form-control-label" for="email-smtp-server">Hostname:</label>
|
|
|
|
<input type="text" class="form-control" id="email-smtp-server" name="smtp_server" value="{{ old('smtp_server', $config['smtp_server']) }}">
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
@if ($errors->has('smtp_server'))
|
|
|
|
<div class="form-control-feedback">
|
|
|
|
<strong>{{ $errors->first('smtp_server') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div class="form-group{{ $errors->has('smtp_port') ? ' has-danger' : '' }}">
|
|
|
|
<label class="form-control-label" for="email-smtp-port">Port:</label>
|
|
|
|
<input type="text" class="form-control" id="email-smtp-port" name="smtp_port" value="{{ old('smtp_port', $config['smtp_port']) }}">
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
@if ($errors->has('smtp_port'))
|
|
|
|
<div class="form-control-feedback">
|
|
|
|
<strong>{{ $errors->first('smtp_port') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2016-09-06 13:26:02 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div class="form-group{{ $errors->has('smtp_username') ? ' has-danger' : '' }}">
|
|
|
|
<label class="form-control-label" for="email-smtp-username">Username:</label>
|
|
|
|
<input type="text" class="form-control" id="email-smtp-username" name="smtp_username" value="{{ old('smtp_username', $config['smtp_username']) }}">
|
2016-09-06 13:26:02 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
@if ($errors->has('smtp_username'))
|
|
|
|
<div class="form-control-feedback">
|
|
|
|
<strong>{{ $errors->first('smtp_username') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2016-10-06 15:27:51 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div class="form-group{{ $errors->has('smtp_password') ? ' has-danger' : '' }}">
|
|
|
|
<label class="form-control-label" for="email-smtp-password">Password:</label>
|
|
|
|
<input type="text" class="form-control" id="email-smtp-password" name="smtp_password" value="{{ old('smtp_password', $config['smtp_password']) }}">
|
2016-09-06 13:26:02 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
@if ($errors->has('smtp_password'))
|
|
|
|
<div class="form-control-feedback">
|
|
|
|
<strong>{{ $errors->first('smtp_password') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
2016-10-06 15:27:51 +01:00
|
|
|
</div>
|
2016-09-06 13:26:02 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div class="form-check">
|
|
|
|
<label class="form-check-label">
|
|
|
|
<input class="form-check-input" type="checkbox" name="smtp_encryption" @if (UserConfig::get('smtp_encryption'))checked="checked"@endif>
|
|
|
|
<strong>Requires encrypted connection</strong>
|
|
|
|
</label>
|
2016-09-06 13:26:02 +01:00
|
|
|
</div>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div style="margin-top: 20px;">
|
|
|
|
<button id="test-email-button" type="button" class="btn btn-primary">@lang('admin.settings_test_email_action')</button>
|
2016-10-06 15:27:51 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div style="margin-top: 10px;">
|
|
|
|
<div class="alert alert-info" id="test-email-status" style="display: none;">
|
|
|
|
<img src="{{ asset('ripple.svg') }}"/> Testing e-mail settings...
|
|
|
|
</div>
|
2016-10-06 15:27:51 +01:00
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div class="alert" id="test-email-result" style="display: none;">
|
2017-04-10 20:48:47 +01:00
|
|
|
<i class="fa fa-fw fa-info-circle"></i>
|
|
|
|
<strong id="test-email-result-summary"></strong> <span id="test-email-result-message"></span>
|
2017-03-23 05:07:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
2016-10-06 15:27:51 +01:00
|
|
|
</div>
|
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
{{-- Security --}}
|
|
|
|
<div role="tabpanel" class="tab-pane" id="security-tab">
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="allow_self_registration" @if (old('allow_self_registration', UserConfig::get('allow_self_registration')))checked="checked"@endif>
|
2017-04-16 09:55:37 +01:00
|
|
|
<strong>@lang('admin.settings.security_allow_self_registration')</strong><br/>
|
|
|
|
@lang('admin.settings.security_allow_self_registration_description')
|
2017-03-23 05:07:38 +00:00
|
|
|
</label>
|
2016-10-06 15:27:51 +01:00
|
|
|
</div>
|
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div class="checkbox" style="margin-top: 20px;">
|
2016-09-05 21:43:58 +01:00
|
|
|
<label>
|
2017-03-23 05:07:38 +00:00
|
|
|
<input type="checkbox" name="require_email_verification" @if (old('require_email_verification', UserConfig::get('require_email_verification')))checked="checked"@endif>
|
|
|
|
<strong>Require e-mail verification for self-registered accounts</strong><br/>
|
|
|
|
<span class="text-danger">It is strongly recommended to enable this option.</span>
|
2016-09-05 21:43:58 +01:00
|
|
|
</label>
|
|
|
|
</div>
|
2016-09-08 11:02:49 +01:00
|
|
|
|
|
|
|
<div class="checkbox" style="margin-top: 20px;">
|
|
|
|
<label>
|
2017-03-23 05:07:38 +00:00
|
|
|
<input type="checkbox" name="recaptcha_enabled_registration" @if (old('recaptcha_enabled_registration', UserConfig::get('recaptcha_enabled_registration')))checked="checked"@endif>
|
|
|
|
<strong>Enable <a href="https://www.google.com/recaptcha" target="_blank">reCAPTCHA</a> for self-registrations</strong><br/>
|
|
|
|
<span class="text-danger">It is strongly recommended to enable this option.</span>
|
2016-09-08 11:02:49 +01:00
|
|
|
</label>
|
|
|
|
</div>
|
2017-03-23 05:07:38 +00:00
|
|
|
|
|
|
|
<fieldset style="margin-top: 30px;">
|
|
|
|
<legend>@lang('admin.settings_recaptcha')</legend>
|
|
|
|
|
|
|
|
<div class="form-group{{ $errors->has('recaptcha_site_key') ? ' has-danger' : '' }}">
|
|
|
|
<label class="form-control-label" for="recaptcha-site-key">Site key:</label>
|
|
|
|
<input type="text" class="form-control" id="recaptcha-site-key" name="recaptcha_site_key" value="{{ old('recaptcha_site_key', $config['recaptcha_site_key']) }}">
|
|
|
|
|
|
|
|
@if ($errors->has('recaptcha_site_key'))
|
|
|
|
<div class="form-control-feedback">
|
|
|
|
<strong>{{ $errors->first('recaptcha_site_key') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group{{ $errors->has('recaptcha_secret_key') ? ' has-danger' : '' }}">
|
|
|
|
<label class="form-control-label" for="recaptcha-secret-key">Secret key:</label>
|
|
|
|
<input type="text" class="form-control" id="recaptcha-secret-key" name="recaptcha_secret_key" value="{{ old('recaptcha_secret_key', $config['recaptcha_secret_key']) }}">
|
|
|
|
|
|
|
|
@if ($errors->has('recaptcha_secret_key'))
|
|
|
|
<div class="form-control-feedback">
|
|
|
|
<strong>{{ $errors->first('recaptcha_secret_key') }}</strong>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<fieldset style="margin-top: 20px;">
|
|
|
|
<legend>@lang('admin.settings_image_protection')</legend>
|
|
|
|
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="restrict_original_download" @if (old('restrict_original_download', UserConfig::get('restrict_original_download')))checked="checked"@endif>
|
|
|
|
<strong>@lang('forms.settings_restrict_originals_download')</strong><br/>
|
|
|
|
@lang('forms.settings_restrict_originals_download_help')
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="checkbox" style="margin-top: 20px;">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="hotlink_protection" @if (old('hotlink_protection', UserConfig::get('hotlink_protection')))checked="checked"@endif>
|
|
|
|
<strong>@lang('forms.settings_hotlink_protection')</strong><br/>
|
|
|
|
@lang('forms.settings_hotlink_protection_help')
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
2016-09-05 15:28:56 +01:00
|
|
|
</div>
|
|
|
|
|
2017-03-23 05:07:38 +00:00
|
|
|
<div class="pull-right" style="margin-top: 15px;">
|
|
|
|
<a href="{{ route('admin') }}" class="btn btn-link">@lang('forms.cancel_action')</a>
|
|
|
|
<button type="submit" class="btn btn-success"><i class="fa fa-fw fa-check"></i> @lang('admin.settings_save_action')</button>
|
|
|
|
</div>
|
2016-09-05 15:28:56 +01:00
|
|
|
</div>
|
2017-03-23 05:07:38 +00:00
|
|
|
</form>
|
2016-09-05 15:28:56 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-09-06 13:26:02 +01:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@push('scripts')
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#test-email-button').click(function() {
|
|
|
|
var data = $('form').serialize();
|
|
|
|
$('#test-email-status').show();
|
|
|
|
$.post('{{ route('admin.testMailSettings') }}', data, function(data)
|
|
|
|
{
|
|
|
|
$('#test-email-result').removeClass('alert-danger');
|
|
|
|
$('#test-email-result').removeClass('alert-success');
|
|
|
|
|
|
|
|
if (data.is_successful)
|
|
|
|
{
|
|
|
|
$('#test-email-result').addClass('alert-success');
|
2017-04-10 20:48:47 +01:00
|
|
|
$('#test-email-result-summary').html('@lang('admin.settings_test_email_summary_successful')');
|
2016-09-06 13:26:02 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$('#test-email-result').addClass('alert-danger');
|
2017-04-10 20:48:47 +01:00
|
|
|
$('#test-email-result-summary').html('@lang('admin.settings_test_email_summary_failed')');
|
2016-09-06 13:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$('#test-email-result-message').html(data.message);
|
|
|
|
$('#test-email-result').show();
|
|
|
|
$('#test-email-status').hide();
|
|
|
|
});
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@endpush
|