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
|
|
|
|
|
|
|
{!! Form::model($config, ['route' => 'admin.saveSettings', 'method' => 'POST']) !!}
|
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div>
|
|
|
|
{{-- Nav tabs --}}
|
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
2017-02-17 11:38:10 +00:00
|
|
|
@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')])
|
2016-10-06 15:27:51 +01:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
{{-- Tab panes --}}
|
|
|
|
<div class="tab-content">
|
|
|
|
{{-- General --}}
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="general-tab">
|
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::label('app_name', 'Gallery name:', ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::text('app_name', old('app_name'), ['class' => 'form-control']) !!}
|
|
|
|
</div>
|
2016-09-05 15:28:56 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="row">
|
2017-03-22 16:55:39 +00:00
|
|
|
<div class="col-sm-4">
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::label('date_format', 'Date format:', ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::select('date_format', $date_formats, old('date_format'), ['class' => 'form-control']) !!}
|
2016-09-05 15:28:56 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-10-06 15:27:51 +01:00
|
|
|
</div>
|
2016-09-05 15:36:46 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="row">
|
2017-03-22 16:55:39 +00:00
|
|
|
<div class="col-sm-4">
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::label('theme', 'Theme:', ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::select('theme', $theme_names, old('theme'), ['class' => 'form-control']) !!}
|
2016-09-05 15:36:46 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-09-05 15:28:56 +01:00
|
|
|
</div>
|
2016-09-05 21:43:58 +01:00
|
|
|
|
2016-10-06 15:27:51 +01: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>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="checkbox" style="margin-top: 20px;">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="remove_copyright" @if (UserConfig::get('remove_copyright'))checked="checked"@endif>
|
|
|
|
<strong>Remove "Powered by" notice from the public gallery</strong>
|
|
|
|
</label>
|
2016-09-06 12:23:14 +01:00
|
|
|
</div>
|
2016-10-06 15:27:51 +01:00
|
|
|
</fieldset>
|
2016-10-28 16:07:24 +01:00
|
|
|
|
|
|
|
<hr/>
|
|
|
|
<fieldset>
|
|
|
|
<legend>@lang('admin.visitor_analytics_heading')</legend>
|
|
|
|
<p>@lang('admin.visitor_analytics_p')</p>
|
|
|
|
<p>@lang('admin.visitor_analytics_p2')</p>
|
|
|
|
|
|
|
|
{!! Form::textarea('analytics_code', old('analytics_code'), ['class' => 'form-control', 'rows' => 10]) !!}
|
|
|
|
</fieldset>
|
2016-10-06 15:27:51 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{-- E-mail --}}
|
|
|
|
<div role="tabpanel" class="tab-pane" id="email-tab">
|
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::label('sender_name', 'Sender name:', ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::text('sender_name', old('sender_name'), ['class' => 'form-control']) !!}
|
|
|
|
</div>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::label('sender_address', 'Sender address:', ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::text('sender_address', old('sender_address'), ['class' => 'form-control']) !!}
|
|
|
|
</div>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<hr/>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<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
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::label('smtp_server', 'Hostname:', ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::text('smtp_server', old('smtp_server'), ['class' => 'form-control']) !!}
|
|
|
|
</div>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::label('smtp_port', 'Port:', ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::text('smtp_port', old('smtp_port'), ['class' => 'form-control']) !!}
|
|
|
|
</div>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::label('smtp_username', 'Username:', ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::text('smtp_username', old('smtp_username'), ['class' => 'form-control']) !!}
|
|
|
|
</div>
|
2016-09-06 13:26:02 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::label('smtp_password', 'Password:', ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::password('smtp_password', ['class' => 'form-control']) !!}
|
|
|
|
</div>
|
2016-09-06 13:26:02 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="smtp_encryption" @if (UserConfig::get('smtp_encryption'))checked="checked"@endif>
|
|
|
|
<strong>Requires encrypted connection</strong>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<button id="test-email-button" type="button" class="btn btn-primary">@lang('admin.settings_test_email_action')</button>
|
2016-09-06 13:26:02 +01:00
|
|
|
|
2016-10-06 15:27:51 +01: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-09-06 13:26:02 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="alert" id="test-email-result" style="display: none;">
|
|
|
|
<p><strong id="test-email-result-summary"></strong> <span id="test-email-result-message"></span></p>
|
2016-09-06 13:26:02 +01:00
|
|
|
</div>
|
2016-09-06 12:23:14 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-10-06 15:27:51 +01:00
|
|
|
</div>
|
2016-09-06 12:23:14 +01:00
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
{{-- Security --}}
|
|
|
|
<div role="tabpanel" class="tab-pane" id="security-tab">
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="allow_self_registration" @if (UserConfig::get('allow_self_registration'))checked="checked"@endif>
|
|
|
|
<strong>Allow self-registration</strong><br/>
|
|
|
|
With this option enabled, users can sign up for their own "visitor" accounts to comment on photos.
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="checkbox" style="margin-top: 20px;">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="require_email_verification" @if (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>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="checkbox" style="margin-top: 20px;">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="recaptcha_enabled_registration" @if (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>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<fieldset style="margin-top: 30px;">
|
|
|
|
<legend>@lang('admin.settings_recaptcha')</legend>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::label('recaptcha_site_key', 'Site key:', ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::text('recaptcha_site_key', old('recaptcha_site_key'), ['class' => 'form-control']) !!}
|
2016-09-05 21:43:58 +01:00
|
|
|
</div>
|
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::label('recaptcha_secret_key', 'Secret key:', ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::text('recaptcha_secret_key', old('recaptcha_secret_key'), ['class' => 'form-control']) !!}
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<fieldset style="margin-top: 20px;">
|
|
|
|
<legend>@lang('admin.settings_image_protection')</legend>
|
|
|
|
|
|
|
|
<div class="checkbox">
|
2016-09-05 21:43:58 +01:00
|
|
|
<label>
|
2016-10-06 15:27:51 +01:00
|
|
|
<input type="checkbox" name="restrict_original_download" @if (UserConfig::get('restrict_original_download'))checked="checked"@endif>
|
|
|
|
<strong>@lang('forms.settings_restrict_originals_download')</strong><br/>
|
|
|
|
@lang('forms.settings_restrict_originals_download_help')
|
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>
|
2016-10-06 15:27:51 +01:00
|
|
|
<input type="checkbox" name="hotlink_protection" @if (UserConfig::get('hotlink_protection'))checked="checked"@endif>
|
|
|
|
<strong>@lang('forms.settings_hotlink_protection')</strong><br/>
|
|
|
|
@lang('forms.settings_hotlink_protection_help')
|
2016-09-08 11:02:49 +01:00
|
|
|
</label>
|
|
|
|
</div>
|
2016-10-06 15:27:51 +01:00
|
|
|
</fieldset>
|
2016-09-05 15:28:56 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-10-06 15:27:51 +01:00
|
|
|
<div class="pull-right" style="margin-top: 15px;">
|
2017-03-22 16:55:39 +00:00
|
|
|
<a href="{{ route('admin') }}" class="btn btn-link">@lang('forms.cancel_action')</a>
|
2017-02-15 09:14:52 +00:00
|
|
|
<button type="submit" class="btn btn-success"><i class="fa fa-fw fa-check"></i> @lang('admin.settings_save_action')</button>
|
2016-09-05 15:28:56 +01:00
|
|
|
</div>
|
2016-10-06 15:27:51 +01:00
|
|
|
</div>
|
2016-09-05 15:28:56 +01:00
|
|
|
|
|
|
|
{!! Form::close() !!}
|
|
|
|
</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');
|
|
|
|
$('#test-email-result-summary').html('Successful');
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$('#test-email-result').addClass('alert-danger');
|
|
|
|
$('#test-email-result-summary').html('Failed');
|
|
|
|
}
|
|
|
|
|
|
|
|
$('#test-email-result-message').html(data.message);
|
|
|
|
$('#test-email-result').show();
|
|
|
|
$('#test-email-status').hide();
|
|
|
|
});
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@endpush
|