snipe-it/resources/views/settings/general.blade.php
snipe 87464e6ec0
Merge branch 'develop' into integrations/2020-04-15-v5-merge
# Conflicts:
#	README.md
#	app/Http/Controllers/AccessoriesController.php
#	app/Http/Controllers/Api/AssetsController.php
#	app/Http/Controllers/Api/LicensesController.php
#	app/Http/Controllers/Api/LocationsController.php
#	app/Http/Controllers/Api/SettingsController.php
#	app/Http/Controllers/Api/UsersController.php
#	app/Http/Controllers/AssetModelsController.php
#	app/Http/Controllers/Assets/AssetsController.php
#	app/Http/Controllers/Auth/ForgotPasswordController.php
#	app/Http/Controllers/CategoriesController.php
#	app/Http/Controllers/CompaniesController.php
#	app/Http/Controllers/ComponentsController.php
#	app/Http/Controllers/ConsumablesController.php
#	app/Http/Controllers/CustomFieldsetsController.php
#	app/Http/Controllers/DepartmentsController.php
#	app/Http/Controllers/LicensesController.php
#	app/Http/Controllers/LocationsController.php
#	app/Http/Controllers/ManufacturersController.php
#	app/Http/Controllers/SettingsController.php
#	app/Http/Controllers/SuppliersController.php
#	app/Http/Controllers/UsersController.php
#	app/Http/Requests/AssetRequest.php
#	app/Http/Requests/ImageUploadRequest.php
#	app/Models/LicenseSeat.php
#	app/Models/Location.php
#	app/Models/Setting.php
#	composer.json
#	composer.lock
#	config/database.php
#	config/version.php
#	npm-shrinkwrap.json
#	package.json
#	public/css/AdminLTE.css
#	public/css/AdminLTE.css.map
#	public/css/overrides.css
#	public/css/overrides.css.map
#	public/css/skins/skin-blue-light.css
#	public/css/skins/skin-blue.css
#	public/css/skins/skin-green-dark.min.css
#	public/js/app.js
#	public/js/bootstrap-table.js
#	public/js/bootstrap/js/bootstrap.js
#	public/js/bootstrap/js/bootstrap.min.js
#	public/js/build/all.js
#	public/js/build/vue.js
#	public/js/build/vue.js.map
#	public/js/demo.js
#	public/js/ekko-lightbox.js
#	public/js/ekko-lightbox.min.js
#	public/js/extensions/export/bootstrap-table-export.js
#	public/js/extensions/multiple-sort/bootstrap-table-multiple-sort.js
#	public/js/extensions/multiple-sort/bootstrap-table-multiple-sort.min.js
#	public/js/extensions/toolbar/bootstrap-table-toolbar.min.js
#	public/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js
#	public/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js
#	public/js/plugins/timepicker/bootstrap-timepicker.js
#	public/js/plugins/timepicker/bootstrap-timepicker.min.js
#	public/js/vue.js
#	public/mix-manifest.json
#	resources/assets/js/bootstrap-js.js
#	resources/assets/js/bootstrap.min.js
#	resources/assets/js/ekko-lightbox.js
#	resources/assets/js/ekko-lightbox.min.js
#	resources/assets/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js
#	resources/assets/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js
#	resources/assets/js/plugins/chartjs/Chart.js
#	resources/assets/js/plugins/timepicker/bootstrap-timepicker.js
#	resources/assets/js/plugins/timepicker/bootstrap-timepicker.min.js
#	resources/assets/less/AdminLTE.less
#	resources/assets/less/overrides.less
#	resources/assets/less/skins/_all-skins.less
#	resources/assets/less/skins/skin-black.less
#	resources/assets/less/skins/skin-blue.less
#	resources/assets/less/skins/skin-green.less
#	resources/assets/less/skins/skin-purple.less
#	resources/assets/less/skins/skin-red.less
#	resources/assets/less/skins/skin-yellow.less
#	resources/assets/less/variables.less
#	resources/js/components/importer/importer-file.vue
#	resources/lang/en/auth/message.php
#	resources/lang/en/passwords.php
#	resources/lang/es-CO/general.php
#	resources/lang/es-ES/general.php
#	resources/lang/es-VE/general.php
#	resources/less/skins/skin-black-dark.less
#	resources/less/skins/skin-blue-dark.less
#	resources/less/skins/skin-contrast.less
#	resources/less/skins/skin-green-dark.less
#	resources/less/skins/skin-orange-dark.less
#	resources/less/skins/skin-orange.less
#	resources/less/skins/skin-purple-dark.less
#	resources/less/skins/skin-red-dark.less
#	resources/less/skins/skin-yellow-dark.less
#	resources/views/accessories/checkin.blade.php
#	resources/views/accessories/checkout.blade.php
#	resources/views/accessories/edit.blade.php
#	resources/views/account/profile.blade.php
#	resources/views/account/view-assets.blade.php
#	resources/views/asset_maintenances/edit.blade.php
#	resources/views/auth/passwords/email.blade.php
#	resources/views/auth/passwords/reset.blade.php
#	resources/views/categories/edit.blade.php
#	resources/views/companies/edit.blade.php
#	resources/views/components/checkin.blade.php
#	resources/views/components/checkout.blade.php
#	resources/views/components/edit.blade.php
#	resources/views/consumables/checkout.blade.php
#	resources/views/consumables/edit.blade.php
#	resources/views/custom_fields/fields/edit.blade.php
#	resources/views/custom_fields/fieldsets/edit.blade.php
#	resources/views/dashboard.blade.php
#	resources/views/departments/edit.blade.php
#	resources/views/groups/edit.blade.php
#	resources/views/hardware/audit.blade.php
#	resources/views/hardware/bulk-checkout.blade.php
#	resources/views/hardware/bulk.blade.php
#	resources/views/hardware/checkin.blade.php
#	resources/views/hardware/checkout.blade.php
#	resources/views/hardware/edit.blade.php
#	resources/views/hardware/index.blade.php
#	resources/views/hardware/quickscan.blade.php
#	resources/views/hardware/view.blade.php
#	resources/views/importer/import.blade.php
#	resources/views/layouts/basic.blade.php
#	resources/views/layouts/default.blade.php
#	resources/views/layouts/edit-form.blade.php
#	resources/views/licenses/checkin.blade.php
#	resources/views/licenses/checkout.blade.php
#	resources/views/licenses/edit.blade.php
#	resources/views/locations/edit.blade.php
#	resources/views/manufacturers/edit.blade.php
#	resources/views/modals/upload-file.blade.php
#	resources/views/models/bulk-edit.blade.php
#	resources/views/models/custom_fields_form.blade.php
#	resources/views/models/edit.blade.php
#	resources/views/partials/bootstrap-table.blade.php
#	resources/views/partials/forms/edit/address.blade.php
#	resources/views/partials/forms/edit/asset-select.blade.php
#	resources/views/partials/forms/edit/category-select.blade.php
#	resources/views/partials/forms/edit/category.blade.php
#	resources/views/partials/forms/edit/company-select.blade.php
#	resources/views/partials/forms/edit/company.blade.php
#	resources/views/partials/forms/edit/department-select.blade.php
#	resources/views/partials/forms/edit/depreciation.blade.php
#	resources/views/partials/forms/edit/email.blade.php
#	resources/views/partials/forms/edit/image-upload.blade.php
#	resources/views/partials/forms/edit/item_number.blade.php
#	resources/views/partials/forms/edit/location-profile-select.blade.php
#	resources/views/partials/forms/edit/location-select.blade.php
#	resources/views/partials/forms/edit/location.blade.php
#	resources/views/partials/forms/edit/maintenance_type.blade.php
#	resources/views/partials/forms/edit/manufacturer-select.blade.php
#	resources/views/partials/forms/edit/manufacturer.blade.php
#	resources/views/partials/forms/edit/minimum_quantity.blade.php
#	resources/views/partials/forms/edit/model-select.blade.php
#	resources/views/partials/forms/edit/model_number.blade.php
#	resources/views/partials/forms/edit/name.blade.php
#	resources/views/partials/forms/edit/notes.blade.php
#	resources/views/partials/forms/edit/order_number.blade.php
#	resources/views/partials/forms/edit/phone.blade.php
#	resources/views/partials/forms/edit/purchase_cost.blade.php
#	resources/views/partials/forms/edit/purchase_date.blade.php
#	resources/views/partials/forms/edit/quantity.blade.php
#	resources/views/partials/forms/edit/serial.blade.php
#	resources/views/partials/forms/edit/status.blade.php
#	resources/views/partials/forms/edit/submit.blade.php
#	resources/views/partials/forms/edit/supplier-select.blade.php
#	resources/views/partials/forms/edit/supplier.blade.php
#	resources/views/partials/forms/edit/user-select.blade.php
#	resources/views/reports/custom.blade.php
#	resources/views/settings/alerts.blade.php
#	resources/views/settings/asset_tags.blade.php
#	resources/views/settings/barcodes.blade.php
#	resources/views/settings/branding.blade.php
#	resources/views/settings/general.blade.php
#	resources/views/settings/labels.blade.php
#	resources/views/settings/ldap.blade.php
#	resources/views/settings/localization.blade.php
#	resources/views/settings/security.blade.php
#	resources/views/setup/user.blade.php
#	resources/views/suppliers/edit.blade.php
#	resources/views/users/bulk-edit.blade.php
#	resources/views/users/edit.blade.php
#	resources/views/users/ldap.blade.php
#	resources/views/users/print.blade.php
#	resources/views/users/view.blade.php
#	routes/api.php
#	routes/web/hardware.php
#	webpack.mix.js
2020-04-20 23:20:34 -07:00

413 lines
24 KiB
PHP

@extends('layouts/default')
{{-- Page title --}}
@section('title')
Update General Settings
@parent
@stop
@section('header_right')
<a href="{{ route('settings.index') }}" class="btn btn-primary"> {{ trans('general.back') }}</a>
@stop
{{-- Page content --}}
@section('content')
<style>
.checkbox label {
padding-right: 40px;
}
</style>
{{ Form::open(['method' => 'POST', 'files' => false, 'autocomplete' => 'off', 'class' => 'form-horizontal', 'role' => 'form' ]) }}
<!-- CSRF Token -->
{{csrf_field()}}
<div class="row">
<div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
<div class="panel box box-default">
<div class="box-header with-border">
<h2 class="box-title">
<i class="fa fa-wrench" aria-hidden="true"></i>
{{ trans('admin/settings/general.general_settings') }}
</h2>
</div>
<div class="box-body">
<div class="col-md-12">
<!-- Full Multiple Companies Support -->
<div class="form-group {{ $errors->has('full_multiple_companies_support') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('full_multiple_companies_support', trans('admin/settings/general.full_multiple_companies_support_text')) }}
</div>
<div class="col-md-9">
{{ Form::checkbox('full_multiple_companies_support', '1', Input::old('full_multiple_companies_support', $setting->full_multiple_companies_support),array('class' => 'minimal', 'aria-label'=>'full_multiple_companies_support')) }}
{{ trans('admin/settings/general.full_multiple_companies_support_text') }}
{!! $errors->first('full_multiple_companies_support', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">
{{ trans('admin/settings/general.full_multiple_companies_support_help_text') }}
</p>
</div>
</div>
<!-- /.form-group -->
<!-- Require signature for acceptance -->
<div class="form-group {{ $errors->has('require_accept_signature') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('require_accept_signature',
trans('admin/settings/general.require_accept_signature')) }}
</div>
<div class="col-md-9">
{{ Form::checkbox('require_accept_signature', '1', Request::old('require_accept_signature', $setting->require_accept_signature),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
{!! $errors->first('require_accept_signature', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">{{ trans('admin/settings/general.require_accept_signature_help_text') }}</p>
</div>
</div>
<!-- /.form-group -->
<!-- Email domain -->
<div class="form-group {{ $errors->has('email_domain') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('email_domain', trans('general.email_domain')) }}
</div>
<div class="col-md-9">
{{ Form::text('email_domain', Request::old('email_domain', $setting->email_domain), array('class' => 'form-control','placeholder' => 'example.com')) }}
<span class="help-block">{{ trans('general.email_domain_help') }}</span>
{!! $errors->first('email_domain', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
<!-- Email format -->
<div class="form-group {{ $errors->has('email_format') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('email_format', trans('general.email_format')) }}
</div>
<div class="col-md-9">
{!! Form::username_format('email_format', Input::old('email_format', $setting->email_format), 'select2') !!}
{!! $errors->first('email_format', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
<!-- Username format -->
<div class="form-group {{ $errors->has('username_format') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('username_format', trans('general.username_format')) }}
</div>
<div class="col-md-9">
{!! Form::username_format('username_format', Input::old('username_format', $setting->username_format), 'select2') !!}
{!! $errors->first('username_format', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">
{{ trans('admin/settings/general.username_format_help') }}
</p>
</div>
</div>
<!-- Load images in emails -->
<div class="form-group {{ $errors->has('show_images_in_email') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('show_images_in_email', trans('admin/settings/general.show_images_in_email')) }}
</div>
<div class="col-md-9">
{{ Form::checkbox('show_images_in_email', '1', Request::old('show_images_in_email', $setting->show_images_in_email),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
{!! $errors->first('show_images_in_email', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
<!-- unique serial -->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('unique_serial', trans('admin/settings/general.unique_serial')) }}
</div>
<div class="col-md-9">
{{ Form::checkbox('unique_serial', '1', Request::old('unique_serial', $setting->unique_serial),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
{!! $errors->first('unique_serial', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">
{{ trans('admin/settings/general.unique_serial_help_text') }}
</p>
</div>
</div>
<!-- Per Page -->
<div class="form-group {{ $errors->has('per_page') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('per_page', trans('admin/settings/general.per_page')) }}
</div>
<div class="col-md-9">
{{ Form::text('per_page', Input::old('per_page', $setting->per_page), array('class' => 'form-control','placeholder' => '5', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
{!! $errors->first('per_page', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
<!-- Thumb Size -->
<div class="form-group {{ $errors->has('thumbnail_max_h') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('thumbnail_max_h', trans('admin/settings/general.thumbnail_max_h')) }}
</div>
<div class="col-md-9">
{{ Form::text('thumbnail_max_h', Request::old('thumbnail_max_h', $setting->thumbnail_max_h), array('class' => 'form-control','placeholder' => '50', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
<p class="help-block">{{ trans('admin/settings/general.thumbnail_max_h_help') }}</p>
{!! $errors->first('thumbnail_max_h', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
<!-- Default EULA -->
<div class="form-group {{ $errors->has('default_eula_text') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('default_eula_text', trans('admin/settings/general.default_eula_text')) }}
</div>
<div class="col-md-9">
{{ Form::textarea('default_eula_text', Input::old('default_eula_text', $setting->default_eula_text), array('class' => 'form-control','placeholder' => 'Add your default EULA text')) }}
{!! $errors->first('default_eula_text', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">{{ trans('admin/settings/general.default_eula_help_text') }}</p>
<p class="help-block">{!! trans('admin/settings/general.eula_markdown') !!}</p>
</div>
</div>
<!-- login text -->
<div class="form-group {{ $errors->has('login_note') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('login_note', trans('admin/settings/general.login_note')) }}
</div>
<div class="col-md-9">
@if (config('app.lock_passwords'))
<textarea class="form-control disabled" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2" aria-label="login_note" readonly>{{ Input::old('login_note', $setting->login_note) }}</textarea>
{!! $errors->first('login_note', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
@else
<textarea class="form-control" name="login_note" aria-label="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2">{{ Input::old('login_note', $setting->login_note) }}</textarea>
{!! $errors->first('login_note', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@endif
<p class="help-block">{!! trans('admin/settings/general.login_note_help') !!}</p>
</div>
</div>
<!-- Mail test -->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('login_note', 'Test Mail') }}
</div>
<div class="col-md-9" id="mailtestrow">
<a class="btn btn-default btn-sm pull-left" id="mailtest" style="margin-right: 10px;">
Send Test</a>
<span id="mailtesticon"></span>
<span id="mailtestresult"></span>
<span id="mailteststatus"></span>
</div>
<div class="col-md-9 col-md-offset-3">
<div id="mailteststatus-error" class="text-danger"></div>
</div>
<div class="col-md-9 col-md-offset-3">
<p class="help-block">This will attempt to send a test mail to {{ config('mail.reply_to.address') }}.</p>
</div>
</div>
<!-- dashboard text -->
<div class="form-group {{ $errors->has('dashboard_message') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('dashboard_message', trans('admin/settings/general.dashboard_message')) }}
</div>
<div class="col-md-9">
@if (config('app.lock_passwords'))
<textarea class="form-control disabled" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2" aria-label="dashboard_message" readonly>{{ Input::old('dashboard_message', $setting->login_note) }}</textarea>
{!! $errors->first('dashboard_message', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
@else
<textarea class="form-control" aria-label="dashboard_message" name="dashboard_message" rows="2">{{ Input::old('login_note', $setting->dashboard_message) }}</textarea>
{!! $errors->first('dashboard_message', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@endif
<p class="help-block">
{{ trans('admin/settings/general.dashboard_message_help') }}
{!! trans('general.github_markdown') !!}</p>
</div>
</div>
<!-- Archived in List -->
<div class="form-group {{ $errors->has('show_archived_in_list') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('show_archived_in_list',
trans('admin/settings/general.show_archived_in_list')) }}
</div>
<div class="col-md-9">
{{ Form::checkbox('show_archived_in_list', '1', Request::old('show_archived_in_list', $setting->show_archived_in_list),array('class' => 'minimal')) }}
{{ trans('admin/settings/general.show_archived_in_list_text') }}
{!! $errors->first('show_archived_in_list', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
<!-- Show assets assigned to user's assets -->
<div class="form-group {{ $errors->has('show_assigned_assets') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('show_assigned_assets',
trans('admin/settings/general.show_assigned_assets')) }}
</div>
<div class="col-md-9">
{{ Form::checkbox('show_assigned_assets', '1', Request::old('show_assigned_assets', $setting->show_assigned_assets),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
<p class="help-block">{{ trans('admin/settings/general.show_assigned_assets_help') }}</p>
{!! $errors->first('show_assigned_assets', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
<!-- Model List prefs -->
<div class="form-group {{ $errors->has('show_in_model_list') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('show_in_model_list',
trans('admin/settings/general.show_in_model_list')) }}
</div>
<div class="col-md-9">
{{ Form::checkbox('show_in_model_list[]', 'image', Input::old('show_in_model_list', $snipeSettings->modellistCheckedValue('image')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.image') }} <br>
{{ Form::checkbox('show_in_model_list[]', 'category', Input::old('show_in_model_list', $snipeSettings->modellistCheckedValue('category')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.category') }} <br>
{{ Form::checkbox('show_in_model_list[]', 'manufacturer', Input::old('show_in_model_list', $snipeSettings->modellistCheckedValue('manufacturer')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.manufacturer') }} <br>
{{ Form::checkbox('show_in_model_list[]', 'model_number', Input::old('show_in_model_list', $snipeSettings->modellistCheckedValue('model_number')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.model_no') }}<br>
</div>
</div>
<!-- Depreciation method -->
<div class="form-group {{ $errors->has('depreciation_method') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('depreciation_method', trans('Depreciation method')) }}
</div>
<div class="col-md-9">
{{ Form::select('depreciation_method', array(
'default' => 'Linear (default)',
'half_1' => 'Half-year convention, always applied',
'half_2' => 'Half-year convention, applied with condition',
), Request::old('username_format', $setting->depreciation_method), ['class' =>'select2', 'style' => 'width: 80%']) }}
</div>
</div>
<!-- /.form-group -->
<!-- Privacy Policy Footer-->
<div class="form-group {{ $errors->has('privacy_policy_link') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('privacy_policy_link', trans('admin/settings/general.privacy_policy_link')) }}
</div>
<div class="col-md-9">
@if (config('app.lock_passwords'))
{{ Form::text('privacy_policy_link', Request::old('privacy_policy_link', $setting->privacy_policy_link), array('class' => 'form-control disabled', 'disabled' => 'disabled')) }}
@else
{{ Form::text('privacy_policy_link', Request::old('privacy_policy_link', $setting->privacy_policy_link), array('class' => 'form-control')) }}
@endif
<span class="help-block">{{ trans('admin/settings/general.privacy_policy_link_help') }}</span>
{!! $errors->first('privacy_policy_link', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
</div>
</div> <!--/.box-body-->
<div class="box-footer">
<div class="text-left col-md-6">
<a class="btn btn-link text-left" href="{{ route('settings.index') }}">{{ trans('button.cancel') }}</a>
</div>
<div class="text-right col-md-6">
<button type="submit" class="btn btn-primary"><i class="fa fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
</div>
</div>
</div>
</div> <!-- /box -->
</div> <!-- /.col-md-8-->
</div> <!-- /.row-->
{{ Form::close() }}
@stop
@section('moar_scripts')
<!-- bootstrap color picker -->
<script nonce="{{ csrf_token() }}">
//color picker with addon
$(".header-color").colorpicker();
// toggle the disabled state of asset id prefix
$('#auto_increment_assets').on('ifChecked', function(){
$('#auto_increment_prefix').prop('disabled', false).focus();
}).on('ifUnchecked', function(){
$('#auto_increment_prefix').prop('disabled', true);
});
// Test Mail
$("#mailtest").click(function(){
$("#mailtestrow").removeClass('text-success');
$("#mailtestrow").removeClass('text-danger');
$("#mailtesticon").html('');
$("#mailteststatus").html('');
$('#mailteststatus-error').html('');
$("#mailtesticon").html('<i class="fa fa-spinner spin"></i> Sending Test Email...');
$.ajax({
url: '{{ route('api.settings.mailtest') }}',
type: 'POST',
headers: {
"X-Requested-With": 'XMLHttpRequest',
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
},
data: {},
dataType: 'json',
success: function (data) {
console.dir(data);
$("#mailtesticon").html('');
$("#mailteststatus").html('');
$('#mailteststatus-error').html('');
$("#mailteststatus").removeClass('text-danger');
$("#mailteststatus").addClass('text-success');
if (data.message) {
$("#mailteststatus").html('<i class="fa fa-check text-success"></i> ' + data.message);
} else {
$("#mailteststatus").html('<i class="fa fa-check text-success"></i> Mail sent!');
}
},
error: function (data) {
$("#mailtesticon").html('');
$("#mailteststatus").html('');
$('#mailteststatus-error').html('');
$("#mailteststatus").removeClass('text-success');
$("#mailteststatus").addClass('text-danger');
$("#mailtesticon").html('<i class="fa fa-exclamation-triangle text-danger"></i>');
$('#mailteststatus').html('Mail could not be sent.');
if (data.responseJSON) {
$('#mailteststatus-error').html('Error: ' + data.responseJSON.messages);
} else {
console.dir(data);
}
}
});
});
</script>
@stop