all
This commit is contained in:
172
Productivite/Snipe-IT/resources/views/settings/alerts.blade.php
Normal file
172
Productivite/Snipe-IT/resources/views/settings/alerts.blade.php
Normal file
@ -0,0 +1,172 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.alert_title') }}
|
||||
@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="fas fa-bell"></i> {{ trans('admin/settings/general.alerts') }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<div class="col-md-11 col-md-offset-1">
|
||||
|
||||
<!-- Alerts Enabled -->
|
||||
<div class="form-group {{ $errors->has('alerts_enabled') ? 'error' : '' }}">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('alerts_enabled', '1', Request::old('alerts_enabled', $setting->alerts_enabled)) }}
|
||||
{{ trans('admin/settings/general.alerts_enabled') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Menu Alerts Enabled -->
|
||||
<div class="form-group {{ $errors->has('show_alerts_in_menu') ? 'error' : '' }}">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('show_alerts_in_menu', '1', Request::old('show_alerts_in_menu', $setting->show_alerts_in_menu)) }}
|
||||
{{ trans('admin/settings/general.show_alerts_in_menu') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Alert Email -->
|
||||
<div class="form-group {{ $errors->has('alert_email') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('alert_email', trans('admin/settings/general.alert_email')) }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::text('alert_email', old('alert_email', $setting->alert_email), array('class' => 'form-control','placeholder' => 'admin@yourcompany.com')) }}
|
||||
{!! $errors->first('alert_email', '<span class="alert-msg" aria-hidden="true">:message</span><br>') !!}
|
||||
|
||||
<p class="help-block">{{ trans('admin/settings/general.alert_email_help') }}</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Admin CC Email -->
|
||||
<div class="form-group {{ $errors->has('admin_cc_email') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('admin_cc_email', trans('admin/settings/general.admin_cc_email')) }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::text('admin_cc_email', old('admin_cc_email', $setting->admin_cc_email), array('class' => 'form-control','placeholder' => 'admin@yourcompany.com')) }}
|
||||
{!! $errors->first('admin_cc_email', '<span class="alert-msg" aria-hidden="true">:message</span><br>') !!}
|
||||
|
||||
<p class="help-block">{{ trans('admin/settings/general.admin_cc_email_help') }}</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Alert interval -->
|
||||
<div class="form-group {{ $errors->has('alert_interval') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('alert_interval', trans('admin/settings/general.alert_interval')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::text('alert_interval', old('alert_interval', $setting->alert_interval), array('class' => 'form-control','placeholder' => '30', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
|
||||
{!! $errors->first('alert_interval', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Alert threshold -->
|
||||
<div class="form-group {{ $errors->has('alert_threshold') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('alert_threshold', trans('admin/settings/general.alert_inv_threshold')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::text('alert_threshold', old('alert_threshold', $setting->alert_threshold), array('class' => 'form-control','placeholder' => '5', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
|
||||
{!! $errors->first('alert_threshold', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Alert interval -->
|
||||
<div class="form-group {{ $errors->has('audit_interval') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('audit_interval', trans('admin/settings/general.audit_interval')) }}
|
||||
</div>
|
||||
<div class="input-group col-md-2">
|
||||
{{ Form::text('audit_interval', Request::old('audit_interval', $setting->audit_interval), array('class' => 'form-control','placeholder' => '12', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
|
||||
<span class="input-group-addon">{{ trans('general.months') }}</span>
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
{!! $errors->first('audit_interval', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">{{ trans('admin/settings/general.audit_interval_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Alert threshold -->
|
||||
<div class="form-group {{ $errors->has('audit_warning_days') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('audit_warning_days', trans('admin/settings/general.audit_warning_days')) }}
|
||||
</div>
|
||||
<div class="input-group col-md-2">
|
||||
{{ Form::text('audit_warning_days', Request::old('audit_warning_days', $setting->audit_warning_days), array('class' => 'form-control','placeholder' => '14', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
|
||||
<span class="input-group-addon">{{ trans('general.days') }}</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
{!! $errors->first('audit_warning_days', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">{{ trans('admin/settings/general.audit_warning_days_help') }}</p>
|
||||
</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="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- /box -->
|
||||
</div> <!-- /.col-md-8-->
|
||||
</div> <!-- /.row-->
|
||||
|
||||
{{Form::close()}}
|
||||
|
||||
@stop
|
||||
|
32
Productivite/Snipe-IT/resources/views/settings/api.blade.php
Normal file
32
Productivite/Snipe-IT/resources/views/settings/api.blade.php
Normal file
@ -0,0 +1,32 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.oauth_title') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-default pull-right">{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
@if (!config('app.lock_passwords'))
|
||||
<div id="app">
|
||||
<passport-clients clients-url="{{ url('oauth/clients') }}"></passport-clients>
|
||||
<passport-authorized-clients clients-url="{{ url('oauth/clients') }}" tokens-url="{{ url('oauth/tokens') }}"></passport-authorized-clients>
|
||||
</div>
|
||||
@else
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
});
|
||||
</script>
|
||||
@endsection
|
@ -0,0 +1,111 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.asset_tag_title') }}
|
||||
@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="fas fa-list-ol"></i> {{ trans('general.asset_tags') }}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<div class="col-md-11 col-md-offset-1">
|
||||
|
||||
<!-- auto ids -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-5">
|
||||
<strong>{{ trans('admin/settings/general.auto_increment_assets') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('auto_increment_assets', '1', old('auto_increment_assets', $setting->auto_increment_assets),array('aria-label'=>'auto_increment_assets')) }}
|
||||
{{ trans('admin/settings/general.enabled') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-5">
|
||||
{{ Form::label('next_auto_tag_base', trans('admin/settings/general.next_auto_tag_base')) }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::text('next_auto_tag_base', old('next_auto_tag_base', $setting->next_auto_tag_base), array('class' => 'form-control', 'style'=>'width: 150px;', 'aria-label'=>'next_auto_tag_base')) }}
|
||||
{!! $errors->first('next_auto_tag_base', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- auto prefix -->
|
||||
<div class="form-group {{ $errors->has('auto_increment_prefix') ? 'error' : '' }}">
|
||||
<div class="col-md-5">
|
||||
{{ Form::label('auto_increment_prefix', trans('admin/settings/general.auto_increment_prefix')) }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
@if ($setting->auto_increment_assets == 1)
|
||||
{{ Form::text('auto_increment_prefix', old('auto_increment_prefix', $setting->auto_increment_prefix), array('class' => 'form-control', 'style'=>'width: 150px;', 'aria-label'=>'auto_increment_prefix')) }}
|
||||
{!! $errors->first('auto_increment_prefix', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@else
|
||||
{{ Form::text('auto_increment_prefix', old('auto_increment_prefix', $setting->auto_increment_prefix), array('class' => 'form-control', 'disabled'=>'disabled', 'style'=>'width: 150px;', 'aria-label'=>'auto_increment_prefix')) }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- auto zerofill -->
|
||||
<div class="form-group {{ $errors->has('zerofill_count') ? 'error' : '' }}">
|
||||
<div class="col-md-5">
|
||||
{{ Form::label('zerofill_count', trans('admin/settings/general.zerofill_count')) }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::text('zerofill_count', old('zerofill_count', $setting->zerofill_count), array('class' => 'form-control', 'style'=>'width: 150px;', 'aria-label'=>'zerofill_count')) }}
|
||||
{!! $errors->first('zerofill_count', '<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="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- /box -->
|
||||
</div> <!-- /.col-md-8-->
|
||||
</div> <!-- /.row-->
|
||||
|
||||
{{Form::close()}}
|
||||
|
||||
@stop
|
237
Productivite/Snipe-IT/resources/views/settings/backups.blade.php
Normal file
237
Productivite/Snipe-IT/resources/views/settings/backups.blade.php
Normal file
@ -0,0 +1,237 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.backups') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-default pull-right" style="margin-left: 5px;">
|
||||
{{ trans('general.back') }}
|
||||
</a>
|
||||
|
||||
<form method="POST" style="display: inline">
|
||||
{{ Form::hidden('_token', csrf_token()) }}
|
||||
<button class="btn btn-primary {{ (config('app.lock_passwords')) ? ' disabled': '' }}">{{ trans('admin/settings/general.generate_backup') }}</button>
|
||||
</form>
|
||||
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
<table
|
||||
data-cookie="true"
|
||||
data-cookie-id-table="system-backups"
|
||||
data-pagination="true"
|
||||
data-id-table="system-backups"
|
||||
data-search="true"
|
||||
data-side-pagination="client"
|
||||
data-sort-order="desc"
|
||||
data-sort-name="modified_display"
|
||||
id="system-backups"
|
||||
class="table table-striped snipe-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true">{{ trans('general.file_name') }}</th>
|
||||
<th data-sortable="true" data-field="modified_display" data-sort-name="modified_value">{{ trans('admin/settings/table.created') }}</th>
|
||||
<th data-field="modified_value" data-visible="false"></th>
|
||||
<th data-sortable="true">{{ trans('admin/settings/table.size') }}</th>
|
||||
<th>{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($files as $file)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('settings.backups.download', [$file['filename']]) }}">
|
||||
{{ $file['filename'] }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $file['modified_display'] }} </td>
|
||||
<td>{{ $file['modified_value'] }} </td>
|
||||
<td>{{ $file['filesize'] }}</td>
|
||||
<td>
|
||||
|
||||
@can('superadmin')
|
||||
@if (config('app.allow_backup_delete')=='true')
|
||||
<a data-html="false"
|
||||
class="btn delete-asset btn-danger btn-sm {{ (config('app.lock_passwords')) ? ' disabled': '' }}"
|
||||
data-toggle="modal" href="{{ route('settings.backups.destroy', $file['filename']) }}"
|
||||
data-content="{{ trans('admin/settings/message.backup.delete_confirm') }}"
|
||||
data-title="{{ trans('general.delete') }} {{ e($file['filename']) }}?"
|
||||
onClick="return false;">
|
||||
<i class="fas fa-trash icon-white" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{ trans('general.delete') }}</span>
|
||||
</a>
|
||||
@else
|
||||
<a href="#"
|
||||
class="btn delete-asset btn-danger btn-sm disabled">
|
||||
<i class="fas fa-trash icon-white" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{ trans('general.delete') }}</span>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<a data-html="true"
|
||||
href="{{ route('settings.backups.restore', $file['filename']) }}"
|
||||
class="btn btn-warning btn-sm restore-asset {{ (config('app.lock_passwords')) ? ' disabled': '' }}"
|
||||
data-toggle="modal"
|
||||
data-content="{{ trans('admin/settings/message.backup.restore_warning') }}"
|
||||
data-title="{{ trans('admin/settings/message.backup.restore_confirm', array('filename' => e($file['filename']))) }}"
|
||||
onClick="return false;">
|
||||
<i class="fas fa-retweet" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{ trans('general.restore') }}</span>
|
||||
</a>
|
||||
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end table-responsive div -->
|
||||
</div> <!-- end box-body div -->
|
||||
</div> <!-- end box div -->
|
||||
</div> <!-- end col-md div -->
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title">
|
||||
<i class="far fa-file-archive" aria-hidden="true"></i>
|
||||
{{ trans('admin/settings/general.backups_upload') }}
|
||||
</h2>
|
||||
<div class="box-tools pull-right">
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<p>
|
||||
{!! trans('admin/settings/general.backups_path', ['path'=> $path]) !!}
|
||||
</p>
|
||||
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="alert alert-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
|
||||
{{ Form::open([
|
||||
'method' => 'POST',
|
||||
'route' => 'settings.backups.upload',
|
||||
'files' => true,
|
||||
'class' => 'form-horizontal' ]) }}
|
||||
@csrf
|
||||
|
||||
|
||||
<div class="form-group {{ $errors->has((isset($fieldname) ? $fieldname : 'file')) ? 'has-error' : '' }}" style="margin-bottom: 0px;">
|
||||
<div class="col-md-8 col-xs-8">
|
||||
|
||||
|
||||
<!-- displayed on screen -->
|
||||
<label class="btn btn-default col-md-12 col-xs-12" aria-hidden="true">
|
||||
<i class="fas fa-paperclip" aria-hidden="true"></i>
|
||||
{{ trans('button.select_file') }}
|
||||
<input type="file" name="file" class="js-uploadFile" id="uploadFile" data-maxsize="{{ Helper::file_upload_max_size() }}" accept="application/zip" style="display:none;" aria-label="file" aria-hidden="true">
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-4 col-xs-4">
|
||||
<button class="btn btn-primary col-md-12 col-xs-12" id="uploadButton" disabled>{{ trans('button.upload') }} <span id="uploadIcon"></span></button>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
||||
<p class="label label-default col-md-12" style="font-size: 120%!important; margin-top: 10px; margin-bottom: 10px;" id="uploadFile-info"></p>
|
||||
<p class="help-block" style="margin-top: 10px;" id="uploadFile-status">{{ trans_choice('general.filetypes_accepted_help', 1, ['size' => Helper::file_upload_max_size_readable(), 'types' => '.zip']) }}</p>
|
||||
{!! $errors->first('file', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-warning">
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title">
|
||||
<i class="fas fa-exclamation-triangle text-orange" aria-hidden="true"></i> {{ trans('admin/settings/general.backups_restoring') }}</h2>
|
||||
<div class="box-tools pull-right">
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
|
||||
<p>
|
||||
{!! trans('admin/settings/general.backups_restore_warning', ['app_name' => config('app.name') ]) !!}
|
||||
</p>
|
||||
|
||||
<p class="text-danger" style="font-weight: bold; font-size: 120%;">
|
||||
{{ trans('admin/settings/general.backups_logged_out') }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ trans('admin/settings/general.backups_large') }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end col-md-12 form div -->
|
||||
</div> <!-- end form group div -->
|
||||
|
||||
</div> <!-- end col-md-3 div -->
|
||||
</div> <!-- end row div -->
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@include ('partials.bootstrap-table')
|
||||
|
||||
|
||||
<script>
|
||||
/*
|
||||
* This just disables the upload button via JS unless they have actually selected a file.
|
||||
*
|
||||
* Todo: - key off the javascript response for JS file upload info as well, so that if it fails that
|
||||
* check (file size and type) we should also leave it disabled.
|
||||
*/
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#uploadFile").on('change',function(event){
|
||||
|
||||
if ($('#uploadFile').val().length == 0) {
|
||||
$("#uploadButton").attr("disabled", true);
|
||||
$("#uploadIcon").html('');
|
||||
} else {
|
||||
$('#uploadButton').removeAttr('disabled');
|
||||
|
||||
$("#uploadButton").click(function(){
|
||||
$("#uploadIcon").html('<i class="fas fa-spinner spin"></i>');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
@ -0,0 +1,212 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.barcode_title') }}
|
||||
@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="fas fa-barcode" aria-hidden="true"></i> {{ trans('admin/settings/general.barcodes') }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<div class="col-md-11 col-md-offset-1">
|
||||
|
||||
@if ($is_gd_installed)
|
||||
<!-- qr code -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('qr_code', '1', old('qr_code', $setting->qr_code),array('aria-label'=>'qr_code')) }}
|
||||
{{ trans('admin/settings/general.display_qr') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- square barcode type -->
|
||||
<div class="form-group{{ $errors->has('barcode_type') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('barcode_type', trans('admin/settings/general.barcode_type')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{!! Form::barcode_types('barcode_type', old('barcode_type', $setting->barcode_type), 'select2 col-md-4') !!}
|
||||
{!! $errors->first('barcode_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- barcode -->
|
||||
<div class="form-group">
|
||||
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('alt_barcode_enabled', '1', old('alt_barcode_enabled', $setting->alt_barcode_enabled),array( 'aria-label'=>'alt_barcode_enabled')) }}
|
||||
{{ trans('admin/settings/general.display_alt_barcode') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- barcode type -->
|
||||
<div class="form-group{{ $errors->has('alt_barcode') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('alt_barcode', trans('admin/settings/general.alt_barcode_type')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{!! Form::alt_barcode_types('alt_barcode', old('alt_barcode', $setting->alt_barcode), 'select2 col-md-4') !!}
|
||||
{!! $errors->first('barcode_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<span class="help-block col-md-offset-3 col-md-12">
|
||||
{{ trans('admin/settings/general.php_gd_warning') }}
|
||||
<br>
|
||||
{{ trans('admin/settings/general.php_gd_info') }}
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<!-- qr text -->
|
||||
<div class="form-group {{ $errors->has('qr_text') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('qr_text', trans('admin/settings/general.qr_text')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if ($setting->qr_code == 1)
|
||||
{{ Form::text('qr_text', Request::old('qr_text', $setting->qr_text), array('class' => 'form-control','placeholder' => 'Property of Your Company',
|
||||
'rel' => 'txtTooltip',
|
||||
'title' =>'Extra text that you would like to display on your labels. ',
|
||||
'data-toggle' =>'tooltip',
|
||||
'data-placement'=>'top')) }}
|
||||
{!! $errors->first('qr_text', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@else
|
||||
{{ Form::text('qr_text', Request::old('qr_text', $setting->qr_text), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'Property of Your Company')) }}
|
||||
<p class="help-block">{{ trans('admin/settings/general.qr_help') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Nuke barcode cache -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('purge_barcodes', 'Purge Barcodes') }}
|
||||
</div>
|
||||
<div class="col-md-9" id="purgebarcodesrow">
|
||||
<a class="btn btn-default btn-sm pull-left" id="purgebarcodes" style="margin-right: 10px;">
|
||||
{{ trans('admin/settings/general.barcode_delete_cache') }}</a>
|
||||
<span id="purgebarcodesicon"></span>
|
||||
<span id="purgebarcodesresult"></span>
|
||||
<span id="purgebarcodesstatus"></span>
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<div id="purgebarcodesstatus-error" class="text-danger"></div>
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<p class="help-block">{{ trans('admin/settings/general.barcodes_help') }}</p>
|
||||
</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-success"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- /box -->
|
||||
</div> <!-- /.col-md-8-->
|
||||
</div> <!-- /.row-->
|
||||
|
||||
{{Form::close()}}
|
||||
|
||||
@stop
|
||||
|
||||
@push('js')
|
||||
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
// Delete barcodes
|
||||
$("#purgebarcodes").click(function(){
|
||||
$("#purgebarcodesrow").removeClass('text-success');
|
||||
$("#purgebarcodesrow").removeClass('text-danger');
|
||||
$("#purgebarcodesicon").html('');
|
||||
$("#purgebarcodesstatus").html('');
|
||||
$('#purgebarcodesstatus-error').html('');
|
||||
$("#purgebarcodesicon").html('<i class="fas fa-spinner spin"></i> {{ trans('admin/settings/general.barcodes_spinner') }}');
|
||||
$.ajax({
|
||||
url: '{{ route('api.settings.purgebarcodes') }}',
|
||||
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);
|
||||
$("#purgebarcodesicon").html('');
|
||||
$("#purgebarcodesstatus").html('');
|
||||
$('#purgebarcodesstatus-error').html('');
|
||||
$("#purgebarcodesstatus").removeClass('text-danger');
|
||||
$("#purgebarcodesstatus").addClass('text-success');
|
||||
if (data.message) {
|
||||
$("#purgebarcodesstatus").html('<i class="fas fa-check text-success"></i> ' + data.message);
|
||||
}
|
||||
},
|
||||
|
||||
error: function (data) {
|
||||
|
||||
$("#purgebarcodesicon").html('');
|
||||
$("#purgebarcodesstatus").html('');
|
||||
$('#purgebarcodesstatus-error').html('');
|
||||
$("#purgebarcodesstatus").removeClass('text-success');
|
||||
$("#purgebarcodesstatus").addClass('text-danger');
|
||||
$("#purgebarcodesicon").html('<i class="fas fa-exclamation-triangle text-danger"></i>');
|
||||
$('#purgebarcodesstatus').html('Files could not be deleted.');
|
||||
if (data.responseJSON) {
|
||||
$('#purgebarcodesstatus-error').html('Error: ' + data.responseJSON.messages);
|
||||
} else {
|
||||
console.dir(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@endpush
|
@ -0,0 +1,291 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.branding_title') }}
|
||||
@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' => true, 'autocomplete' => 'off', 'class' => 'form-horizontal', 'role' => 'form', 'id' => 'create-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="fas fa-copyright"></i> {{ trans('admin/settings/general.brand') }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<!-- Site name -->
|
||||
<div class="form-group {{ $errors->has('site_name') ? 'error' : '' }}">
|
||||
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('site_name', trans('admin/settings/general.site_name')) }}
|
||||
</div>
|
||||
<div class="col-md-7 required">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::text('site_name', Request::old('site_name', $setting->site_name), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'Snipe-IT Asset Management')) }}
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{{ Form::text('site_name',
|
||||
Request::old('site_name', $setting->site_name), array('class' => 'form-control','placeholder' => 'Snipe-IT Asset Management', 'data-validation' => 'required')) }}
|
||||
@endif
|
||||
{!! $errors->first('site_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Branding -->
|
||||
<div class="form-group {{ $errors->has('brand') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('brand', trans('admin/settings/general.web_brand')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{!! Form::select('brand', array('1'=>'Text','2'=>'Logo','3'=>'Logo + Text'), old('brand', $setting->brand), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
|
||||
{!! $errors->first('brand', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Logo -->
|
||||
@include('partials/forms/edit/uploadLogo', [
|
||||
"logoVariable" => "logo",
|
||||
"logoId" => "uploadLogo",
|
||||
"logoLabel" => trans('admin/settings/general.logo'),
|
||||
"logoClearVariable" => "clear_logo",
|
||||
"helpBlock" => trans('general.logo_size') . trans('general.image_filetypes_help', ['size' => Helper::file_upload_max_size_readable()]),
|
||||
])
|
||||
|
||||
<!-- Email Logo -->
|
||||
@include('partials/forms/edit/uploadLogo', [
|
||||
"logoVariable" => "email_logo",
|
||||
"logoId" => "uploadEmailLogo",
|
||||
"logoLabel" => trans('admin/settings/general.email_logo'),
|
||||
"logoClearVariable" => "clear_email_logo",
|
||||
"helpBlock" => trans('admin/settings/general.email_logo_size') . trans('general.image_filetypes_help', ['size' => Helper::file_upload_max_size_readable()]),
|
||||
])
|
||||
|
||||
<!-- Label Logo -->
|
||||
@include('partials/forms/edit/uploadLogo', [
|
||||
"logoVariable" => "label_logo",
|
||||
"logoId" => "uploadLabelLogo",
|
||||
"logoLabel" => trans('admin/settings/general.label_logo'),
|
||||
"logoClearVariable" => "clear_label_logo",
|
||||
"helpBlock" => trans('admin/settings/general.label_logo_size') . trans('general.image_filetypes_help', ['size' => Helper::file_upload_max_size_readable()]),
|
||||
])
|
||||
|
||||
<!-- Favicon -->
|
||||
@include('partials/forms/edit/uploadLogo', [
|
||||
"logoVariable" => "favicon",
|
||||
"logoId" => "uploadFavicon",
|
||||
"logoLabel" => trans('admin/settings/general.favicon'),
|
||||
"logoClearVariable" => "clear_favicon",
|
||||
"helpBlock" => trans('admin/settings/general.favicon_size') .' '. trans('admin/settings/general.favicon_format'),
|
||||
"allowedTypes" => "image/x-icon,image/gif,image/jpeg,image/png,image/svg,image/svg+xml,image/vnd.microsoft.icon",
|
||||
"maxSize" => 20000
|
||||
])
|
||||
|
||||
<!-- Include logo in print assets -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('admin/settings/general.logo_print_assets') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('logo_print_assets', '1', old('logo_print_assets', $setting->logo_print_assets),array('aria-label'=>'logo_print_assets')) }}
|
||||
{{ trans('admin/settings/general.logo_print_assets_help') }}
|
||||
</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- show urls in emails-->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('admin/settings/general.show_url_in_emails') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('show_url_in_emails', '1', old('show_url_in_emails', $setting->show_url_in_emails),array('aria-label'=>'show_url_in_emails')) }}
|
||||
{{ trans('general.yes') }}
|
||||
</label>
|
||||
<p class="help-block">{{ trans('admin/settings/general.show_url_in_emails_help_text') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Header color -->
|
||||
<div class="form-group {{ $errors->has('header_color') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('header_color', trans('admin/settings/general.header_color')) }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group header-color">
|
||||
{{ Form::text('header_color', old('header_color', $setting->header_color), array('class' => 'form-control', 'style' => 'width: 100px;','placeholder' => '#FF0000', 'aria-label'=>'header_color')) }}
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div><!-- /.input group -->
|
||||
{!! $errors->first('header_color', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Skin -->
|
||||
<div class="form-group {{ $errors->has('skin') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('skin', trans('general.skin')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{!! Form::skin('skin', old('skin', $setting->skin), 'select2') !!}
|
||||
{!! $errors->first('skin', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Allow User Skin -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('admin/settings/general.allow_user_skin') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('allow_user_skin', '1', old('allow_user_skin', $setting->allow_user_skin)) }}
|
||||
{{ trans('general.yes') }}
|
||||
</label>
|
||||
<p class="help-block">{{ trans('admin/settings/general.allow_user_skin_help_text') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Custom css -->
|
||||
<div class="form-group {{ $errors->has('custom_css') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('custom_css', trans('admin/settings/general.custom_css')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::textarea('custom_css', old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS','disabled'=>'disabled', 'aria-label'=>'custom_css')) }}
|
||||
{!! $errors->first('custom_css', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{{ Form::textarea('custom_css', old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS', 'aria-label'=>'custom_css')) }}
|
||||
{!! $errors->first('custom_css', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@endif
|
||||
<p class="help-block">{!! trans('admin/settings/general.custom_css_help') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Support Footer -->
|
||||
<div class="form-group {{ $errors->has('support_footer') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('support_footer', trans('admin/settings/general.support_footer')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{!! Form::select('support_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('support_footer', $setting->support_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{!! Form::select('support_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('support_footer', $setting->support_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
|
||||
@endif
|
||||
|
||||
|
||||
{!! $errors->first('support_footer', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Version Footer -->
|
||||
<div class="form-group {{ $errors->has('version_footer') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('version_footer', trans('admin/settings/general.version_footer')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{!! Form::select('version_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('version_footer', $setting->version_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{!! Form::select('version_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('version_footer', $setting->version_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
|
||||
@endif
|
||||
|
||||
<p class="help-block">{{ trans('admin/settings/general.version_footer_help') }}</p>
|
||||
{!! $errors->first('version_footer', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Additional footer -->
|
||||
<div class="form-group {{ $errors->has('footer_text') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('footer_text', trans('admin/settings/general.footer_text')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::textarea('footer_text', Request::old('footer_text', $setting->footer_text), array('class' => 'form-control', 'rows' => '4', 'placeholder' => 'Optional footer text','disabled'=>'disabled')) }}
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{{ Form::textarea('footer_text', Request::old('footer_text', $setting->footer_text), array('class' => 'form-control','rows' => '4','placeholder' => 'Optional footer text')) }}
|
||||
@endif
|
||||
<p class="help-block">{!! trans('admin/settings/general.footer_text_help') !!}</p>
|
||||
{!! $errors->first('footer_text', '<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="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</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);
|
||||
});
|
||||
</script>
|
||||
@stop
|
471
Productivite/Snipe-IT/resources/views/settings/general.blade.php
Normal file
471
Productivite/Snipe-IT/resources/views/settings/general.blade.php
Normal file
@ -0,0 +1,471 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.general_title') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-primary"> {{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{{ 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="fas 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">
|
||||
<strong>{{ trans('admin/settings/general.full_multiple_companies_support_text') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('full_multiple_companies_support', '1', old('full_multiple_companies_support', $setting->full_multiple_companies_support),array('aria-label'=>'full_multiple_companies_support')) }}
|
||||
{{ trans('admin/settings/general.full_multiple_companies_support_text') }}
|
||||
</label>
|
||||
{!! $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">
|
||||
<strong> {{ trans('admin/settings/general.require_accept_signature') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('require_accept_signature', '1', Request::old('require_accept_signature', $setting->require_accept_signature)) }}
|
||||
{{ trans('general.yes') }}
|
||||
</label>
|
||||
{!! $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', 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', 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">
|
||||
<strong>{{ trans('admin/settings/general.show_images_in_email') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('show_images_in_email', '1', old('show_images_in_email', $setting->show_images_in_email)) }}
|
||||
{{ trans('general.yes') }}
|
||||
{!! $errors->first('show_images_in_email', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Load gravatar -->
|
||||
<div class="form-group {{ $errors->has('load_remote') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('admin/settings/general.load_remote') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('load_remote', '1', old('load_remote', $setting->load_remote)) }}
|
||||
{{ trans('general.yes') }}
|
||||
{!! $errors->first('load_remote', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</label>
|
||||
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.load_remote_help_text') }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- unique serial -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('admin/settings/general.unique_serial') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ 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>') !!}
|
||||
</label>
|
||||
|
||||
<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', 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', 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>{{ old('login_note', $setting->login_note) }}</textarea>
|
||||
{!! $errors->first('login_note', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</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">{{ 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;">
|
||||
{{ trans('admin/settings/general.mail_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">
|
||||
<div class="help-block">
|
||||
<p>{{ trans('admin/settings/general.mail_test_help', array('replyto' => config('mail.reply_to.address'))) }}</p>
|
||||
</div>
|
||||
</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>{{ old('dashboard_message', $setting->login_note) }}</textarea>
|
||||
{!! $errors->first('dashboard_message', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
<textarea class="form-control" aria-label="dashboard_message" name="dashboard_message" rows="2">{{ 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">
|
||||
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('show_archived_in_list', '1', old('show_archived_in_list', $setting->show_archived_in_list),array('aria-label'=>'show_archived_in_list')) }}
|
||||
{{ trans('admin/settings/general.show_archived_in_list_text') }}
|
||||
</label>
|
||||
{!! $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">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('show_assigned_assets', '1', Request::old('show_assigned_assets', $setting->show_assigned_assets),array('class' => 'minimal')) }}
|
||||
{{ trans('general.yes') }}
|
||||
</label>
|
||||
<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">
|
||||
<strong>{{ trans('admin/settings/general.show_in_model_list') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('show_in_model_list[]', 'image', old('show_in_model_list', $snipeSettings->modellistCheckedValue('image')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.image') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('show_in_model_list[]', 'category', old('show_in_model_list', $snipeSettings->modellistCheckedValue('category')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.category') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('show_in_model_list[]', 'manufacturer', old('show_in_model_list', $snipeSettings->modellistCheckedValue('manufacturer')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.manufacturer') }} </label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('show_in_model_list[]', 'model_number', old('show_in_model_list', $snipeSettings->modellistCheckedValue('model_number')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.model_no') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- dash chart -->
|
||||
<div class="form-group {{ $errors->has('dash_chart_type') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('show_in_model_list',
|
||||
trans('general.pie_chart_type')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('dash_chart_type', array(
|
||||
'name' => 'Status Label Name',
|
||||
'type' => 'Status Label Type'), Request::old('dash_chart_type', $setting->dash_chart_type), ['class' =>'select2', 'style' => 'width: 80%']) }}
|
||||
</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>') !!}
|
||||
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
|
||||
</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="fas 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="fas fa-spinner spin"></i> {{ trans('admin/settings/message.mail.sending') }}');
|
||||
$.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="fas fa-check text-success"></i> ' + data.message);
|
||||
} else {
|
||||
$("#mailteststatus").html('<i class="fas fa-check text-success"></i> {{ trans('admin/settings/message.mail.success') }}');
|
||||
}
|
||||
},
|
||||
|
||||
error: function (data) {
|
||||
|
||||
$("#mailtesticon").html('');
|
||||
$("#mailteststatus").html('');
|
||||
$('#mailteststatus-error').html('');
|
||||
$("#mailteststatus").removeClass('text-success');
|
||||
$("#mailteststatus").addClass('text-danger');
|
||||
$("#mailtesticon").html('<i class="fas fa-exclamation-triangle text-danger"></i>');
|
||||
$('#mailteststatus').html('{{ trans('admin/settings/message.mail.error') }}');
|
||||
if (data.responseJSON) {
|
||||
if (data.responseJSON.messages) {
|
||||
$('#mailteststatus-error').html('Error: ' + data.responseJSON.messages);
|
||||
} else {
|
||||
$('#mailteststatus-error').html('{{ trans('admin/settings/message.mail.additional') }}');
|
||||
}
|
||||
} else {
|
||||
console.dir(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@stop
|
117
Productivite/Snipe-IT/resources/views/settings/google.blade.php
Normal file
117
Productivite/Snipe-IT/resources/views/settings/google.blade.php
Normal file
@ -0,0 +1,117 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.google_login') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-primary"> {{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
{{ 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-brands fa-google"></i> {{ trans('admin/settings/general.google_login') }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<!-- Google Redirect URL -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 text-right">
|
||||
<strong>Redirect URL</strong>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<p class="form-control-static" style="margin-top: -5px"><code>{{ config('app.url') }}/google/callback</code></p>
|
||||
<p class="help-block">{!! trans('admin/settings/general.google_callback_help') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Google login -->
|
||||
<div class="form-group {{ $errors->has('google') ? 'error' : '' }}">
|
||||
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<label class="form-control{{ (config('app.lock_passwords')===true) ? ' form-control--disabled': '' }}">
|
||||
<span class="sr-only">{{ trans('admin/settings/general.pwd_secure_uncommon') }}</span>
|
||||
{{ Form::checkbox('google_login', '1', old('google_login', $setting->google_login),array('aria-label'=>'google_login', (config('app.lock_passwords')===true) ? 'disabled': '')) }}
|
||||
{{ trans('admin/settings/general.enable_google_login') }}
|
||||
</label>
|
||||
<p class="help-block">{{ trans('admin/settings/general.enable_google_login_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Google Client ID -->
|
||||
<div class="form-group {{ $errors->has('google_client_id') ? 'error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('google_client_id', 'Client ID') }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('google_client_id', old('google_client_id', $setting->google_client_id), ['class' => 'form-control','placeholder' => trans('general.example') .'000000000000-XXXXXXXXXXX.apps.googleusercontent.com', (config('app.lock_passwords')===true) ? 'disabled': '']) }}
|
||||
{!! $errors->first('google_client_id', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Google Client Secret -->
|
||||
<div class="form-group {{ $errors->has('google_client_secret') ? 'error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('google_client_secret', 'Client Secret') }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::text('google_client_secret', 'XXXXXXXXXXXXXXXXXXXXXXX', ['class' => 'form-control', 'disabled']) }}
|
||||
@else
|
||||
{{ Form::text('google_client_secret', old('google_client_secret', $setting->google_client_secret), ['class' => 'form-control','placeholder' => trans('general.example') .'XXXXXXXXXXXX']) }}
|
||||
@endif
|
||||
|
||||
{!! $errors->first('google_client_secret', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</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-success"{{ (config('app.lock_passwords')===true) ? ' disabled': '' }}><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- /box -->
|
||||
</div> <!-- /.col-md-8-->
|
||||
</div> <!-- /.row-->
|
||||
|
||||
{{Form::close()}}
|
||||
|
||||
@stop
|
480
Productivite/Snipe-IT/resources/views/settings/index.blade.php
Normal file
480
Productivite/Snipe-IT/resources/views/settings/index.blade.php
Normal file
@ -0,0 +1,480 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('general.admin') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
|
||||
|
||||
|
||||
<!-- search filter box -->
|
||||
<div class="pull-right">
|
||||
|
||||
|
||||
<form onsubmit="return false;">
|
||||
<div class="btn-group">
|
||||
<input id="searchinput" name="search" type="search" class="search form-control" placeholder="{{ trans('admin/settings/general.filter_by_keyword') }}">
|
||||
<span id="searchclear" class="fas fa-times" aria-hidden="true"></span>
|
||||
<button type="submit" disabled style="display: none" aria-hidden="true"></button>
|
||||
</div>
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-primary pull-right" style="margin-left: 10px;">{{ trans('general.back') }}</a>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!--/ search filter box -->
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#searchinput {
|
||||
width: 200px;
|
||||
}
|
||||
#searchclear {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
height: 14px;
|
||||
margin: auto;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
color: #ccc;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<!-- search filter list -->
|
||||
<div class="list clearfix">
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.branding.index') }}" class="settings_button">
|
||||
<i class="fas fa-copyright fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.brand') }}</span>
|
||||
<span class="keywords" aria-hidden="true" style="display:none">{{ trans('admin/settings/general.brand_keywords') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.brand_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.general.index') }}" class="settings_button">
|
||||
<i class="fas fa-wrench fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name"> {{ trans('admin/settings/general.general_settings') }}</span>
|
||||
<span class="keywords" aria-hidden="true" style="display:none">{{ trans('admin/settings/general.general_settings_keywords') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.general_settings_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.security.index') }}" class="settings_button">
|
||||
<i class="fas fa-lock fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.security') }}</span>
|
||||
<span class="keywords" aria-hidden="true" style="display:none">{{ trans('admin/settings/general.security_keywords') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.security_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('groups.index') }}" class="settings_button">
|
||||
<i class="fas fa-user-friends fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('general.groups') }}</span>
|
||||
<span class="keywords" aria-hidden="true" style="display:none"> {{ trans('admin/settings/general.groups_keywords') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.groups_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.localization.index') }}" class="settings_button">
|
||||
<i class="fas fa-globe-americas fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.localization') }}</span>
|
||||
<span class="keywords" aria-hidden="true" style="display:none"> {{ trans('admin/settings/general.localization_keywords') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.localization_help') }}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.alerts.index') }}" class="settings_button">
|
||||
<i class="fas fa-bell fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.notifications') }}</span>
|
||||
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.notifications_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.slack.index') }}" class="settings_button">
|
||||
<i class="fa-solid fa-hashtag fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.integrations') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.webhook_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.asset_tags.index') }}" class="settings_button">
|
||||
<i class="fas fa-list-ol fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('general.asset_tags') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.asset_tags_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.barcodes.index') }}" class="settings_button">
|
||||
<i class="fas fa-barcode fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.barcodes') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{!! trans('admin/settings/general.barcodes_help_overview') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.labels.index') }}" class="settings_button">
|
||||
<i class="fas fa-tags fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.labels') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{!! trans('admin/settings/general.labels_help') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.ldap.index') }}" class="settings_button">
|
||||
<i class="fas fa-sitemap fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.ldap') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.ldap_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.google.index') }}" class="settings_button">
|
||||
<i class="fa-brands fa-google fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">Google</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.google_login') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.saml.index') }}" class="settings_button">
|
||||
<i class="fas fa-sign-in-alt fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.saml') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.saml_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.backups.index') }}" class="settings_button">
|
||||
<i class="fas fa-file-archive fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.backups') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{!! trans('admin/settings/general.backups_help') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.logins.index') }}" class="settings_button">
|
||||
<i class="fas fa-crosshairs fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.login') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.login_help') }} </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.oauth.index') }}" class="settings_button">
|
||||
<i class="fas fa-user-secret fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.oauth') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.oauth_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (config('app.debug')=== true)
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.phpinfo.index') }}" class="settings_button">
|
||||
<i class="fab fa-php fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.php_overview') }}</span>
|
||||
<span class="keywords" aria-hidden="true" style="display:none">{{ trans('admin/settings/general.php_overview_keywords') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.php_overview_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-danger">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.purge.index') }}" class="link-danger">
|
||||
<i class="fas fa-trash fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">{{ trans('admin/settings/general.purge') }}</span>
|
||||
<span class="keywords" aria-hidden="true" style="display:none">{{ trans('admin/settings/general.purge_keywords') }}</span>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="help-block">{{ trans('admin/settings/general.purge_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-header">
|
||||
<h2 class="box-title">{{ trans('admin/settings/general.system') }}</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="container row row-striped" style="width:97%">
|
||||
|
||||
<!-- row -->
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<strong>{{ trans('admin/settings/general.snipe_version') }}:</strong>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ config('version.app_version') }} build {{ config('version.build_version') }} ({{ config('version.hash_version') }})
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<strong>{{ trans('admin/settings/general.license') }}:</strong>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="https://www.gnu.org/licenses/agpl-3.0.en.html" rel="noopener">AGPL3</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- / row -->
|
||||
|
||||
<!-- row -->
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<strong>{{ trans('admin/settings/general.php') }}:</strong>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ phpversion() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<strong>{{ trans('admin/settings/general.laravel') }}:</strong>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ $snipeSettings->lar_ver() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- row -->
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<strong>{{ trans('admin/settings/general.timezone') }}:</strong>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ config('app.timezone') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<strong>{{ trans('admin/settings/general.database_driver') }}:</strong>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ config('database.default') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- row -->
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<strong>{{ trans('admin/settings/general.mail_from') }}:</strong>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ config('mail.from.name') }}
|
||||
<code><{{ config('mail.from.address') }}></code>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<strong>{{ trans('admin/settings/general.mail_reply_to') }}:</strong>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ config('mail.reply_to.name') }}
|
||||
<code><{{ config('mail.reply_to.address') }}></code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- row -->
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<strong>{{ trans('admin/settings/general.bs_table_storage') }}:</strong>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
{{ config('session.bs_table_storage') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--/ row -->
|
||||
</div>
|
||||
</div> <!-- /box-body-->
|
||||
</div> <!--/box-default-->
|
||||
</div><!--/col-md-8-->
|
||||
</div><!--/row-->
|
||||
|
||||
|
||||
|
||||
|
||||
@section('moar_scripts')
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
|
||||
|
||||
|
||||
var options = {
|
||||
valueNames: [ 'name', 'keywords', 'summary', 'help-block']
|
||||
};
|
||||
|
||||
var settingList = new List('setting-list', options);
|
||||
|
||||
$("#searchclear").click(function(){
|
||||
$("#searchinput").val('');
|
||||
settingList.search();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@stop
|
||||
|
||||
|
428
Productivite/Snipe-IT/resources/views/settings/labels.blade.php
Normal file
428
Productivite/Snipe-IT/resources/views/settings/labels.blade.php
Normal file
@ -0,0 +1,428 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.labels_title') }}
|
||||
@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(['id' => 'settingsForm', '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-10">
|
||||
|
||||
|
||||
<div class="panel box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title">
|
||||
<i class="fas fa-tags"></i> {{ trans('admin/settings/general.labels') }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<!-- New Label Engine -->
|
||||
<div class="form-group" {{ $errors->has('label2_enable') ? 'error' : '' }}">
|
||||
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
|
||||
<label class="form-control">
|
||||
<input type="checkbox" value="1" name="label2_enable"{{ ((old('label2_enable') == '1') || ($setting->label2_enable) == '1') ? ' checked="checked"' : '' }} aria-label="label2_enable">
|
||||
{{ Form::label('label2_enable', trans('admin/settings/general.label2_enable')) }}
|
||||
</label>
|
||||
|
||||
{!! $errors->first('label2_enable', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
|
||||
<p class="help-block">
|
||||
{!! trans('admin/settings/general.label2_enable_help') !!}
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@if ($setting->label2_enable)
|
||||
<!-- New Settings -->
|
||||
|
||||
<!-- Template -->
|
||||
<div class="form-group{{ $errors->has('label2_template') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
@include('partials.label2-preview')
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<table
|
||||
data-click-to-select="true"
|
||||
data-columns="{{ \App\Presenters\LabelPresenter::dataTableLayout() }}"
|
||||
data-cookie="true"
|
||||
data-cookie-id-table="label2TemplateTable"
|
||||
data-id-table="label2TemplateTable"
|
||||
data-pagination="true"
|
||||
data-search="true"
|
||||
data-select-item-name="label2_template"
|
||||
data-id-field="name"
|
||||
data-show-columns="true"
|
||||
data-show-fullscreen="true"
|
||||
data-show-refresh="true"
|
||||
data-side-pagination="server"
|
||||
data-sort-name="name"
|
||||
data-sort-order="asc"
|
||||
data-url="{{ route('api.labels.index') }}"
|
||||
id="label2TemplateTable"
|
||||
class="table table-striped snipe-table"
|
||||
></table>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
$('#label2TemplateTable').on('load-success.bs.table', (e) => {
|
||||
let form = document.getElementById('settingsForm');
|
||||
form.dispatchEvent(new Event('change'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Title -->
|
||||
<div class="form-group{{ $errors->has('label2_title') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('label2_title', trans('admin/settings/general.label2_title'), ['class'=>'control-label']) }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::text('label2_title', old('label2_title', $setting->label2_title), [ 'class'=>'form-control', 'placeholder'=>$setting->qr_text, 'aria-label'=>'label2_title' ]) }}
|
||||
{!! $errors->first('label2_title', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">{!! trans('admin/settings/general.label2_title_help') !!}</p>
|
||||
<p class="help-block">
|
||||
{!! trans('admin/settings/general.label2_title_help_phold') !!}.<br />
|
||||
{!! trans('admin/settings/general.help_asterisk_bold') !!}.<br />
|
||||
{!!
|
||||
trans('admin/settings/general.help_blank_to_use', [
|
||||
'setting_name' => trans('admin/settings/general.barcodes').' > '.trans('admin/settings/general.qr_text')
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Use Asset Logo -->
|
||||
<div class="form-group" {{ $errors->has('label2_asset_logo') ? 'error' : '' }}">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
|
||||
<label class="form-control">
|
||||
<input type="checkbox" value="1" name="label2_asset_logo"{{ ((old('label2_asset_logo') == '1') || ($setting->label2_asset_logo) == '1') ? ' checked="checked"' : '' }} aria-label="label2_asset_logo">
|
||||
{{ Form::label('label2_asset_logo', trans('admin/settings/general.label2_asset_logo')) }}
|
||||
</label>
|
||||
<p class="help-block">
|
||||
{!! trans('admin/settings/general.label2_asset_logo_help', ['setting_name' => trans('admin/settings/general.brand').' > '.trans('admin/settings/general.label_logo')]) !!}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 1D Barcode Type -->
|
||||
<div class="form-group{{ $errors->has('label2_1d_type') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('label2_1d_type', trans('admin/settings/general.label2_1d_type'), ['class'=>'control-label']) }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
@php
|
||||
$select1DValues = [
|
||||
'default' => trans('admin/settings/general.default').' [ '.$setting->alt_barcode.' ]',
|
||||
'none' => trans('admin/settings/general.none'),
|
||||
'C128' => 'C128',
|
||||
'C39' => 'C39',
|
||||
'EAN5' => 'EAN5',
|
||||
'EAN13' => 'EAN13',
|
||||
'UPCA' => 'UPCA',
|
||||
'UPCE' => 'UPCE'
|
||||
];
|
||||
@endphp
|
||||
{{ Form::select('label2_1d_type', $select1DValues, old('label2_1d_type', $setting->label2_1d_type), [ 'class'=>'select2 col-md-4', 'aria-label'=>'label2_1d_type' ]) }}
|
||||
{!! $errors->first('label2_1d_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.label2_1d_type_help') }}.
|
||||
{!!
|
||||
trans('admin/settings/general.help_default_will_use', [
|
||||
'default' => trans('admin/settings/general.default'),
|
||||
'setting_name' => trans('admin/settings/general.barcodes').' > '.trans('admin/settings/general.alt_barcode_type'),
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 2D Barcode Type -->
|
||||
<div class="form-group{{ $errors->has('label2_2d_type') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('label2_2d_type', trans('admin/settings/general.label2_2d_type'), ['class'=>'control-label']) }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
@php
|
||||
$select2DValues = [
|
||||
'default' => trans('admin/settings/general.default').' [ '.$setting->barcode_type.' ]',
|
||||
'none' => trans('admin/settings/general.none'),
|
||||
'QRCODE' => 'QRCODE',
|
||||
'DATAMATRIX' => 'DATAMATRIX',
|
||||
'PDF417' => 'PDF417',
|
||||
];
|
||||
@endphp
|
||||
{{ Form::select('label2_2d_type', $select2DValues, old('label2_2d_type', $setting->label2_2d_type), [ 'class'=>'select2 col-md-4', 'aria-label'=>'label2_2d_type' ]) }}
|
||||
{!! $errors->first('label2_2d_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.label2_2d_type_help', ['current' => $setting->barcode_type]) }}.
|
||||
{!!
|
||||
trans('admin/settings/general.help_default_will_use', [
|
||||
'default' => trans('admin/settings/general.default'),
|
||||
'setting_name' => trans('admin/settings/general.barcodes').' > '.trans('admin/settings/general.barcode_type'),
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 2D Barcode Target -->
|
||||
<div class="form-group{{ $errors->has('label2_2d_target') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('label2_2d_target', trans('admin/settings/general.label2_2d_target'), ['class'=>'control-label']) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('label2_2d_target', ['hardware_id'=>'/hardware/{id} ('.trans('admin/settings/general.default').')', 'ht_tag'=>'/ht/{asset_tag}'], old('label2_2d_target', $setting->label2_2d_target), [ 'class'=>'select2 col-md-4', 'aria-label'=>'label2_2d_target' ]) }}
|
||||
{!! $errors->first('label2_2d_target', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<p class="help-block">{{ trans('admin/settings/general.label2_2d_target_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Fields -->
|
||||
<div class="form-group {{ $errors->has('label2_fields') ? 'error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('label2_fields', trans('admin/settings/general.label2_fields')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@include('partials.label2-field-definitions', [ 'name' => 'label2_fields', 'value' => old('label2_fields', $setting->label2_fields), 'customFields' => $customFields ])
|
||||
{!! $errors->first('label2_fields', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">{{ trans('admin/settings/general.label2_fields_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('partials.bootstrap-table')
|
||||
|
||||
@else
|
||||
<!-- Hidden version of new settings -->
|
||||
{{ Form::hidden('label2_template', old('label2_template', $setting->label2_template)) }}
|
||||
{{ Form::hidden('label2_title', old('label2_title', $setting->label2_title)) }}
|
||||
{{ Form::hidden('label2_asset_logo', old('label2_asset_logo', $setting->label2_asset_logo)) }}
|
||||
{{ Form::hidden('label2_1d_type', old('label2_1d_type', $setting->label2_1d_type)) }}
|
||||
{{ Form::hidden('label2_2d_type', old('label2_2d_type', $setting->label2_2d_type)) }}
|
||||
{{ Form::hidden('label2_2d_target', old('label2_2d_target', $setting->label2_2d_target)) }}
|
||||
{{ Form::hidden('label2_fields', old('label2_fields', $setting->label2_fields)) }}
|
||||
@endif
|
||||
|
||||
@if ($setting->label2_enable && ($setting->label2_template != 'DefaultLabel'))
|
||||
<!-- Hidden version of legacy settings -->
|
||||
{{ Form::hidden('labels_per_page', old('labels_per_page', $setting->labels_per_page)) }}
|
||||
{{ Form::hidden('labels_fontsize', old('labels_fontsize', $setting->labels_fontsize)) }}
|
||||
{{ Form::hidden('labels_width', old('labels_width', $setting->labels_width)) }}
|
||||
{{ Form::hidden('labels_height', old('labels_height', $setting->labels_height)) }}
|
||||
{{ Form::hidden('labels_display_sgutter', old('labels_display_sgutter', $setting->labels_display_sgutter)) }}
|
||||
{{ Form::hidden('labels_display_bgutter', old('labels_display_bgutter', $setting->labels_display_bgutter)) }}
|
||||
{{ Form::hidden('labels_pmargin_top', old('labels_pmargin_top', $setting->labels_pmargin_top)) }}
|
||||
{{ Form::hidden('labels_pmargin_bottom', old('labels_pmargin_bottom', $setting->labels_pmargin_bottom)) }}
|
||||
{{ Form::hidden('labels_pmargin_left', old('labels_pmargin_left', $setting->labels_pmargin_left)) }}
|
||||
{{ Form::hidden('labels_pmargin_right', old('labels_pmargin_right', $setting->labels_pmargin_right)) }}
|
||||
{{ Form::hidden('labels_pagewidth', old('labels_pagewidth', $setting->labels_pagewidth)) }}
|
||||
{{ Form::hidden('labels_pageheight', old('labels_pageheight', $setting->labels_pageheight)) }}
|
||||
{{ Form::hidden('labels_display_name', old('labels_display_name', $setting->labels_display_name)) }}
|
||||
{{ Form::hidden('labels_display_serial', old('labels_display_serial', $setting->labels_display_serial)) }}
|
||||
{{ Form::hidden('labels_display_tag', old('labels_display_tag', $setting->labels_display_tag)) }}
|
||||
{{ Form::hidden('labels_display_model', old('labels_display_model', $setting->labels_display_model)) }}
|
||||
{{ Form::hidden('labels_display_company_name', old('labels_display_company_name', $setting->labels_display_company_name)) }}
|
||||
@else
|
||||
<!-- Legacy settings -->
|
||||
<div class="form-group{{ $errors->has('labels_per_page') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('labels_per_page', trans('admin/settings/general.labels_per_page'), ['class'=>'control-label']) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::text('labels_per_page', old('labels_per_page', $setting->labels_per_page), ['class' => 'form-control','style' => 'width: 100px;', 'aria-label'=>'labels_per_page']) }}
|
||||
{!! $errors->first('labels_per_page', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('labels_fontsize') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('labels_fontsize', trans('admin/settings/general.labels_fontsize'), ['class'=>'control-label']) }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_fontsize', old('labels_fontsize', $setting->labels_fontsize), ['class' => 'form-control', 'aria-label'=>'labels_fontsize']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.text_pt') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
{!! $errors->first('labels_fontsize', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('labels_width') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('labels_width', trans('admin/settings/general.label_dimensions'), ['class'=>'control-label']) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_width', old('labels_width', $setting->labels_width), ['class' => 'form-control', 'aria-label'=>'labels_width']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.width_w') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_height', old('labels_height', $setting->labels_height), ['class' => 'form-control', 'aria-label'=>'labels_height']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.height_h') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
{!! $errors->first('labels_width', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
{!! $errors->first('labels_height', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('labels_display_sgutter') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('labels_display_sgutter', trans('admin/settings/general.label_gutters')) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_display_sgutter', old('labels_display_sgutter', $setting->labels_display_sgutter), ['class' => 'form-control', 'aria-label'=>'labels_display_sgutter']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.horizontal') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_display_bgutter', old('labels_display_bgutter', $setting->labels_display_bgutter), ['class' => 'form-control', 'aria-label'=>'labels_display_bgutter']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.vertical') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
{!! $errors->first('labels_display_sgutter', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
{!! $errors->first('labels_display_bgutter', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('labels_pmargin_top') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('labels_pmargin_top', trans('admin/settings/general.page_padding')) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group" style="margin-bottom: 15px;">
|
||||
{{ Form::text('labels_pmargin_top', old('labels_pmargin_top', $setting->labels_pmargin_top), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_top']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.top') }}</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_pmargin_right', old('labels_pmargin_right', $setting->labels_pmargin_right), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_right']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.right') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-left: 10px; ">
|
||||
<div class="input-group" style="margin-bottom: 15px;">
|
||||
{{ Form::text('labels_pmargin_bottom', old('labels_pmargin_bottom', $setting->labels_pmargin_bottom), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_bottom']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.bottom') }}</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_pmargin_left', old('labels_pmargin_left', $setting->labels_pmargin_left), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_left']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.left') }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
{!! $errors->first('labels_width', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
{!! $errors->first('labels_height', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ (($errors->has('labels_pageheight')) || $errors->has('labels_pagewidth')) ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('labels_pagewidth', trans('admin/settings/general.page_dimensions'), ['class'=>'control-label']) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_pagewidth', old('labels_pagewidth', $setting->labels_pagewidth), ['class' => 'form-control', 'aria-label'=>'labels_pagewidth']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.width_w') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 form-group" style="margin-left: 10px">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_pageheight', old('labels_pageheight', $setting->labels_pageheight), ['class' => 'form-control', 'aria-label'=>'labels_pageheight']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.height_h') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
{!! $errors->first('labels_pagewidth', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
{!! $errors->first('labels_pageheight', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if(!$setting->label2_enable)
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 text-right">
|
||||
{{ Form::label('labels_display', trans('admin/settings/general.label_fields'), ['class' => 'control-label']) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('labels_display_name', '1', old('labels_display_name', $setting->labels_display_name),['class' => 'minimal', 'aria-label'=>'labels_display_name']) }}
|
||||
{{ trans('admin/hardware/form.name') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('labels_display_serial', '1', old('labels_display_serial', $setting->labels_display_serial),['class' => 'minimal', 'aria-label'=>'labels_display_serial']) }}
|
||||
{{ trans('admin/hardware/form.serial') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('labels_display_tag', '1', old('labels_display_tag', $setting->labels_display_tag),['class' => 'minimal', 'aria-label'=>'labels_display_tag']) }}
|
||||
{{ trans('admin/hardware/form.tag') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('labels_display_model', '1', old('labels_display_model', $setting->labels_display_model),['class' => 'minimal', 'aria-label'=>'labels_display_model']) }}
|
||||
{{ trans('admin/hardware/form.model') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('labels_display_company_name', '1', old('labels_display_company_name', $setting->labels_display_company_name),['class' => 'minimal', 'aria-label'=>'labels_display_company_name']) }}
|
||||
{{ trans('admin/companies/table.name') }}
|
||||
</label>
|
||||
</div> <!--/.col-md-9-->
|
||||
</div> <!--/.form-group-->
|
||||
@endif
|
||||
</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="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- /box -->
|
||||
</div> <!-- /.col-md-8-->
|
||||
</div> <!-- /.row-->
|
||||
|
||||
{{Form::close()}}
|
||||
|
||||
@stop
|
811
Productivite/Snipe-IT/resources/views/settings/ldap.blade.php
Normal file
811
Productivite/Snipe-IT/resources/views/settings/ldap.blade.php
Normal file
@ -0,0 +1,811 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
Update LDAP/AD Settings
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-default"> {{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
.checkbox label {
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
/*
|
||||
Don't make the password field *look* readonly - this is for usability, so admins don't think they can't edit this field.
|
||||
*/
|
||||
.form-control[readonly] {
|
||||
background-color: white;
|
||||
color: #555555;
|
||||
cursor:text;
|
||||
}
|
||||
</style>
|
||||
|
||||
@if ((!function_exists('ldap_connect')) || (!function_exists('ldap_set_option')) || (!function_exists('ldap_bind')))
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-danger">
|
||||
{{ trans('admin/settings/general.ldap_extension_warning') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
{{ Form::open(['method' => 'POST', 'files' => false, 'autocomplete' => 'off', 'class' => 'form-horizontal', 'role' => 'form']) }}
|
||||
<!-- CSRF Token -->
|
||||
{{csrf_field()}}
|
||||
|
||||
<input type="hidden" name="username" value="{{ Request::old('username', $user->username) }}">
|
||||
|
||||
<!-- this is a hack to prevent Chrome from trying to autocomplete fields -->
|
||||
<input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="display:none;" />
|
||||
<input type="password" name="password_fake" id="password_fake" value="" style="display:none;" />
|
||||
|
||||
<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="fas fa-sitemap"></i> {{ trans('admin/settings/general.ldap_ad') }}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<div class="col-md-11 col-md-offset-1">
|
||||
|
||||
<!-- Enable LDAP -->
|
||||
<div class="form-group {{ $errors->has('ldap_integration') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_enabled', trans('admin/settings/general.ldap_integration')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('ldap_enabled', '1', old('ldap_enabled', $setting->ldap_enabled), [((config('app.lock_passwords')===true)) ? 'disabled ': '', 'class' => 'form-control '. $setting->demoMode, $setting->demoMode]) }}
|
||||
{{ trans('admin/settings/general.ldap_enabled') }}
|
||||
</label>
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- AD Flag -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('is_ad', trans('admin/settings/general.ad')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('is_ad', '1', Request::old('is_ad', $setting->is_ad), [((config('app.lock_passwords')===true)) ? 'disabled ': '', 'class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
|
||||
{{ trans('admin/settings/general.is_ad') }}
|
||||
</label>
|
||||
{!! $errors->first('is_ad', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP Password Sync -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_pw_sync', trans('admin/settings/general.ldap_pw_sync')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('ldap_pw_sync', '1', Request::old('ldap_pw_sync', $setting->ldap_pw_sync), [((config('app.lock_passwords')===true)) ? 'disabled ': '', 'class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
|
||||
{{ trans('general.yes') }}
|
||||
</label>
|
||||
|
||||
<p class="help-block">{{ trans('admin/settings/general.ldap_pw_sync_help') }}</p>
|
||||
{!! $errors->first('ldap_pw_sync_help', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- AD Domain -->
|
||||
<div class="form-group {{ $errors->has('ad_domain') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ad_domain', trans('admin/settings/general.ad_domain')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ad_domain', Request::old('ad_domain', $setting->ad_domain), ['class' => 'form-control','placeholder' => trans('general.example') .'example.com', $setting->demoMode]) }}
|
||||
<p class="help-block">{{ trans('admin/settings/general.ad_domain_help') }}</p>
|
||||
{!! $errors->first('ad_domain', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- AD Domain -->
|
||||
|
||||
{{-- NOTICE - this was a feature for AdLdap2-based LDAP syncing, and is already handled in 'classic' LDAP, so we now hide the checkbox (but haven't deleted the field) <!-- AD Append Domain -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ad_append_domain', trans('admin/settings/general.ad_append_domain_label')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::checkbox('ad_append_domain', '1', Request::old('ad_append_domain', $setting->ad_append_domain),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
|
||||
{{ trans('admin/settings/general.ad_append_domain') }}
|
||||
<p class="help-block">{{ trans('admin/settings/general.ad_append_domain_help') }}</p>
|
||||
{!! $errors->first('ad_append_domain', '<span class="alert-msg">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
<!-- LDAP Client-Side TLS key -->
|
||||
<div class="form-group {{ $errors->has('ldap_client_tls_key') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_client_tls_key', trans('admin/settings/general.ldap_client_tls_key')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::textarea('ldap_client_tls_key', Request::old('ldap_client_tls_key', $setting->ldap_client_tls_key), ['class' => 'form-control','placeholder' => trans('general.example') .'-----BEGIN RSA PRIVATE KEY-----'."\r\n1234567890\r\n-----END RSA PRIVATE KEY-----
|
||||
", $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_client_tls_key', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- LDAP Client-Side TLS key -->
|
||||
|
||||
<!-- LDAP Client-Side TLS certificate -->
|
||||
<div class="form-group {{ $errors->has('ldap_client_tls_cert') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_client_tls_cert', trans('admin/settings/general.ldap_client_tls_cert')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::textarea('ldap_client_tls_cert', Request::old('ldap_client_tls_cert', $setting->ldap_client_tls_cert), ['class' => 'form-control','placeholder' => trans('general.example') .'-----BEGIN CERTIFICATE-----'."\r\n1234567890\r\n-----END CERTIFICATE-----", $setting->demoMode]) }}
|
||||
<p class="help-block">{{ trans('admin/settings/general.ldap_client_tls_cert_help') }}</p>
|
||||
{!! $errors->first('ldap_client_tls_cert', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- LDAP Client-Side TLS certificate -->
|
||||
|
||||
<!-- LDAP Server -->
|
||||
<div class="form-group {{ $errors->has('ldap_server') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_server', trans('admin/settings/general.ldap_server')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_server', Request::old('ldap_server', $setting->ldap_server), ['class' => 'form-control','placeholder' => trans('general.example') .'ldap://ldap.example.com', $setting->demoMode]) }}
|
||||
<p class="help-block">{{ trans('admin/settings/general.ldap_server_help') }}</p>
|
||||
{!! $errors->first('ldap_server', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- LDAP Server -->
|
||||
|
||||
<!-- Start TLS -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_tls', trans('admin/settings/general.ldap_tls')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('ldap_tls', '1', Request::old('ldap_tls', $setting->ldap_tls),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
|
||||
{{ trans('admin/settings/general.ldap_tls_help') }}
|
||||
</label>
|
||||
{!! $errors->first('ldap_tls', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Ignore LDAP Certificate -->
|
||||
<div class="form-group {{ $errors->has('ldap_server_cert_ignore') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_server_cert_ignore', trans('admin/settings/general.ldap_server_cert')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('ldap_server_cert_ignore', '1', Request::old('ldap_server_cert_ignore', $setting->ldap_server_cert_ignore),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
|
||||
{{ trans('admin/settings/general.ldap_server_cert_ignore') }}
|
||||
</label>
|
||||
{!! $errors->first('ldap_server_cert_ignore', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">{{ trans('admin/settings/general.ldap_server_cert_help') }}</p>
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP Username -->
|
||||
<div class="form-group {{ $errors->has('ldap_uname') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_uname', trans('admin/settings/general.ldap_uname')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_uname', Request::old('ldap_uname', $setting->ldap_uname), ['class' => 'form-control','autocomplete' => 'off', 'placeholder' => trans('general.example') .'binduser@example.com', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_uname', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP pword -->
|
||||
<div class="form-group {{ $errors->has('ldap_pword') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_pword', trans('admin/settings/general.ldap_pword')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::password('ldap_pword', ['class' => 'form-control', 'autocomplete' => 'off', 'onfocus' => "this.removeAttribute('readonly');", $setting->demoMode, ' readonly']) }}
|
||||
{!! $errors->first('ldap_pword', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP basedn -->
|
||||
<div class="form-group {{ $errors->has('ldap_basedn') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_basedn', trans('admin/settings/general.ldap_basedn')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_basedn', Request::old('ldap_basedn', $setting->ldap_basedn), ['class' => 'form-control', 'placeholder' => trans('general.example') .'cn=users/authorized,dc=example,dc=com', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_basedn', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP filter -->
|
||||
<div class="form-group {{ $errors->has('ldap_filter') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_filter', trans('admin/settings/general.ldap_filter')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_filter', Request::old('ldap_filter', $setting->ldap_filter), ['class' => 'form-control','placeholder' => trans('general.example') .'&(cn=*)', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_filter', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP username field-->
|
||||
<div class="form-group {{ $errors->has('ldap_username_field') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_username_field', trans('admin/settings/general.ldap_username_field')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_username_field', Request::old('ldap_username_field', $setting->ldap_username_field), ['class' => 'form-control','placeholder' => trans('general.example') .'samaccountname', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_username_field', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP Last Name Field -->
|
||||
<div class="form-group {{ $errors->has('ldap_lname_field') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_lname_field', trans('admin/settings/general.ldap_lname_field')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_lname_field', Request::old('ldap_lname_field', $setting->ldap_lname_field), ['class' => 'form-control','placeholder' => trans('general.example') .'sn', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_lname_field', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP First Name field -->
|
||||
<div class="form-group {{ $errors->has('ldap_fname_field') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_fname_field', trans('admin/settings/general.ldap_fname_field')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_fname_field', Request::old('ldap_fname_field', $setting->ldap_fname_field), ['class' => 'form-control', 'placeholder' => trans('general.example') .'givenname', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_fname_field', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP Auth Filter Query -->
|
||||
<div class="form-group {{ $errors->has('ldap_auth_filter_query') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_auth_filter_query', trans('admin/settings/general.ldap_auth_filter_query')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_auth_filter_query', Request::old('ldap_auth_filter_query', $setting->ldap_auth_filter_query), ['class' => 'form-control','placeholder' => trans('general.example') .'uid=', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_auth_filter_query', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Default LDAP Permissions Group Select -->
|
||||
|
||||
<div class="form-group{{ $errors->has('group') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_default_group', trans('admin/settings/general.ldap_default_group')) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
|
||||
@if ($groups->count())
|
||||
@if ((Config::get('app.lock_passwords') || (!Auth::user()->isSuperUser())))
|
||||
<ul>
|
||||
@foreach ($groups as $id => $group)
|
||||
{!! '<li>'.e($group).'</li>' !!}
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
|
||||
<span class="help-block">{{ trans('admin/users/general.group_memberships_helpblock') }}</span>
|
||||
@else
|
||||
<div class="controls">
|
||||
<select name="ldap_default_group" aria-label="ldap_default_group" id="ldap_default_group" class="form-control select2">
|
||||
<option value="">{{ trans('admin/settings/general.no_default_group') }}</option>
|
||||
@foreach ($groups as $id => $group)
|
||||
<option value="{{ $id }}" {{ $setting->ldap_default_group == $id ? 'selected' : '' }}>
|
||||
{{ $group }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span class="help-block">
|
||||
{{ trans('admin/settings/general.ldap_default_group_info') }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<p>No groups have been created yet. Visit <code>Admin Settings > Permission Groups</code> to add one.</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP active flag -->
|
||||
<div class="form-group {{ $errors->has('ldap_active_flag') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_active_flag', trans('admin/settings/general.ldap_active_flag')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_active_flag', Request::old('ldap_active_flag', $setting->ldap_active_flag), ['class' => 'form-control', $setting->demoMode]) }}
|
||||
|
||||
<p class="help-block">{!! trans('admin/settings/general.ldap_activated_flag_help') !!}</p>
|
||||
|
||||
{!! $errors->first('ldap_active_flag', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP emp number -->
|
||||
<div class="form-group {{ $errors->has('ldap_emp_num') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_emp_num', trans('admin/settings/general.ldap_emp_num')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_emp_num', Request::old('ldap_emp_num', $setting->ldap_emp_num), ['class' => 'form-control','placeholder' => trans('general.example') .'employeenumber/employeeid', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_emp_num', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<!-- LDAP department -->
|
||||
<div class="form-group {{ $errors->has('ldap_dept') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_dept', trans('admin/settings/general.ldap_dept')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_dept', Request::old('ldap_dept', $setting->ldap_dept), ['class' => 'form-control','placeholder' => trans('general.example') .'department', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_dept', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<!-- LDAP Manager -->
|
||||
<div class="form-group {{ $errors->has('ldap_dept') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_dept', trans('admin/settings/general.ldap_manager')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_manager', Request::old('ldap_manager', $setting->ldap_manager), ['class' => 'form-control','placeholder' => trans('general.example') .'manager', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_manager', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP email -->
|
||||
<div class="form-group {{ $errors->has('ldap_email') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_email', trans('admin/settings/general.ldap_email')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_email', Request::old('ldap_email', $setting->ldap_email), ['class' => 'form-control','placeholder' => trans('general.example') .'mail', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_email', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP Phone -->
|
||||
<div class="form-group {{ $errors->has('ldap_phone') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_phone', trans('admin/settings/general.ldap_phone')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_phone', Request::old('ldap_phone', $setting->ldap_phone_field), ['class' => 'form-control','placeholder' => trans('general.example') .'telephonenumber', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_phone', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP Job title -->
|
||||
<div class="form-group {{ $errors->has('ldap_jobtitle') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_jobtitle', trans('admin/settings/general.ldap_jobtitle')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_jobtitle', Request::old('ldap_jobtitle', $setting->ldap_jobtitle), ['class' => 'form-control','placeholder' => trans('general.example') .'title', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_jobtitle', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LDAP Country -->
|
||||
<div class="form-group {{ $errors->has('ldap_country') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_country', trans('admin/settings/general.ldap_country')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_country', Request::old('ldap_country', $setting->ldap_country), ['class' => 'form-control','placeholder' => trans('general.example') .'c', $setting->demoMode]) }}
|
||||
{!! $errors->first('ldap_country', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<!-- LDAP Location -->
|
||||
<div class="form-group {{ $errors->has('ldap_location') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_location', trans('admin/settings/general.ldap_location')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('ldap_location', Request::old('ldap_location', $setting->ldap_location), ['class' => 'form-control','placeholder' => trans('general.example') .'physicaldeliveryofficename', $setting->demoMode]) }}
|
||||
<p class="help-block">{!! trans('admin/settings/general.ldap_location_help') !!}</p>
|
||||
{!! $errors->first('ldap_location', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@if ($setting->ldap_enabled)
|
||||
|
||||
<!-- LDAP test -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('test_ldap_sync', 'Test LDAP Sync') }}
|
||||
</div>
|
||||
<div class="col-md-8" id="ldaptestrow">
|
||||
<a {{ $setting->demoMode }} class="btn btn-default btn-sm" id="ldaptest" style="margin-right: 10px;">{{ trans('admin/settings/general.ldap_test_sync') }}</a>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<br />
|
||||
<div id="ldapad_test_results" class="hidden well well-sm"></div>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<p class="help-block">{{ trans('admin/settings/general.ldap_login_sync_help') }}</p>
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- LDAP Login test -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('test_ldap_login', 'Test LDAP Login') }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="ldaptest_user" id="ldaptest_user" class="form-control" placeholder="LDAP username">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="password" name="ldaptest_password" id="ldaptest_password" class="form-control" placeholder="LDAP password" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<a class="btn btn-default btn-sm" id="ldaptestlogin" style="margin-right: 10px;">{{ trans('admin/settings/general.ldap_test') }}</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<span id="ldaptestloginicon"></span>
|
||||
<span id="ldaptestloginresult"></span>
|
||||
<span id="ldaptestloginstatus"></span>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<p class="help-block">{{ trans('admin/settings/general.ldap_login_test_help') }}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
<!-- LDAP Forgotten password -->
|
||||
<div class="form-group {{ $errors->has('custom_forgot_pass_url') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('custom_forgot_pass_url', trans('admin/settings/general.custom_forgot_pass_url')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('custom_forgot_pass_url', Request::old('custom_forgot_pass_url', $setting->custom_forgot_pass_url), ['class' => 'form-control','placeholder' => trans('general.example') .'https://my.ldapserver-forgotpass.com', $setting->demoMode]) }}
|
||||
<p class="help-block">{{ trans('admin/settings/general.custom_forgot_pass_url_help') }}</p>
|
||||
{!! $errors->first('custom_forgot_pass_url', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- LDAP Server -->
|
||||
|
||||
|
||||
</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="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- /box -->
|
||||
|
||||
</div> <!-- /.col-md-8-->
|
||||
</div> <!-- /.row-->
|
||||
|
||||
{{Form::close()}}
|
||||
|
||||
|
||||
@stop
|
||||
|
||||
@push('js')
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Check to see if is_ad is checked, if not disable the ad_domain field
|
||||
*/
|
||||
$(function() {
|
||||
if( $('#is_ad').prop('checked') === false) {
|
||||
$('#ad_domain').prop('disabled', 'disabled');
|
||||
} else {
|
||||
//$('#ldap_server').prop('disabled', 'disabled');
|
||||
}
|
||||
});
|
||||
|
||||
$("#is_ad").change(function() {
|
||||
$('#ad_domain').prop('disabled', 'disabled');
|
||||
|
||||
if (this.checked) {
|
||||
$('#ad_domain').toggleDisabled();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Toggle the server info based on the is_ad checkbox
|
||||
*/
|
||||
$('#is_ad').on('ifClicked', function(){
|
||||
$('#ad_domain').toggleDisabled();
|
||||
//$('#ldap_server').toggleDisabled();
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Test the LDAP connection settings
|
||||
*/
|
||||
$("#ldaptest").click(function () {
|
||||
$("#ldapad_test_results").removeClass('hidden text-success text-danger');
|
||||
$("#ldapad_test_results").html('');
|
||||
$("#ldapad_test_results").html('<i class="fas fa-spinner spin"></i> {{ trans('admin/settings/message.ldap.testing') }}');
|
||||
$.ajax({
|
||||
url: '{{ route('api.settings.ldaptest') }}',
|
||||
type: 'GET',
|
||||
headers: {
|
||||
"X-Requested-With": 'XMLHttpRequest',
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
|
||||
success: function (data) {
|
||||
$("#ldapad_test_results").html('');
|
||||
let html = buildLdapTestResults(data)
|
||||
$("#ldapad_test_results").html(
|
||||
html
|
||||
);
|
||||
},
|
||||
|
||||
error: function (data) {
|
||||
$("#ldapad_test_results").html('');
|
||||
$("#ldapad_test_results").addClass('text-danger');
|
||||
let errorIcon = '<i class="fas fa-exclamation-triangle text-danger"></i>' + ' ';
|
||||
if (data.status == 500) {
|
||||
$('#ldapad_test_results').html(errorIcon + '{{ trans('admin/settings/message.ldap.500') }}');
|
||||
} else if (data.status == 400) {
|
||||
let errorMessage = '';
|
||||
if( typeof data.responseJSON.user_sync !== 'undefined') {
|
||||
errorMessage = data.responseJSON.user_sync.message;
|
||||
}
|
||||
if( typeof data.responseJSON.message !== 'undefined') {
|
||||
errorMessage = data.responseJSON.message;
|
||||
}
|
||||
$('#ldapad_test_results').html(errorIcon + errorMessage);
|
||||
} else {
|
||||
$('#ldapad_test_results').html('{{ trans('admin/settings/message.ldap.error') }}');
|
||||
// $('#ldapad_test_results').html(errorIcon + data.responseText.message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Build the results html table
|
||||
*/
|
||||
function buildLdapTestResults(results) {
|
||||
let html = '<ul style="list-style: none;padding-left: 5px;">'
|
||||
html += '<li class="text-success"><i class="fas fa-check" aria-hidden="true"></i> ' + results.login.message + ' </li>'
|
||||
html += '<li class="text-success"><i class="fas fa-check" aria-hidden="true"></i> ' + results.bind.message + ' </li>'
|
||||
html += '</ul>'
|
||||
html += '<div style="overflow:auto;">'
|
||||
html += '<div>{{ trans('admin/settings/message.ldap.sync_success') }}</div>'
|
||||
html += '<table class="table table-bordered table-condensed" style=" table-layout:fixed; width:100%;background-color: #fff">'
|
||||
html += buildLdapResultsTableHeader()
|
||||
html += buildLdapResultsTableBody(results.user_sync.users)
|
||||
html += '</table>'
|
||||
html += '</div>'
|
||||
return html;
|
||||
}
|
||||
|
||||
function buildLdapResultsTableHeader(user)
|
||||
{
|
||||
var keys = [
|
||||
'{{ trans('admin/settings/general.employee_number') }}',
|
||||
'{{ trans('mail.username') }}',
|
||||
'{{ trans('general.first_name') }}',
|
||||
'{{ trans('general.last_name') }}',
|
||||
'{{ trans('general.email') }}'
|
||||
]
|
||||
let header = '<thead><tr>'
|
||||
for (var i in keys) {
|
||||
header += '<th>' + keys[i] + '</th>'
|
||||
}
|
||||
header += "</tr></thead>"
|
||||
return header;
|
||||
}
|
||||
|
||||
function buildLdapResultsTableBody(users)
|
||||
{
|
||||
let body = '<tbody>'
|
||||
for (var i in users) {
|
||||
body += '<tr><td>' + users[i].employee_number + '</td><td>' + users[i].username + '</td><td>' + users[i].firstname + '</td><td>' + users[i].lastname + '</td><td>' + users[i].email + '</td></tr>'
|
||||
}
|
||||
body += "</tbody>"
|
||||
return body;
|
||||
}
|
||||
|
||||
$("#ldaptestlogin").click(function(){
|
||||
$("#ldaptestloginrow").removeClass('text-success');
|
||||
$("#ldaptestloginrow").removeClass('text-danger');
|
||||
$("#ldaptestloginstatus").removeClass('text-danger');
|
||||
$("#ldaptestloginstatus").html('');
|
||||
$("#ldaptestloginicon").html('<i class="fas fa-spinner spin"></i> {{ trans('admin/settings/message.ldap.testing_authentication') }}');
|
||||
$.ajax({
|
||||
url: '{{ route('api.settings.ldaptestlogin') }}',
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"X-Requested-With": 'XMLHttpRequest',
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: {
|
||||
'ldaptest_user': $('#ldaptest_user').val(),
|
||||
'ldaptest_password': $('#ldaptest_password').val()
|
||||
},
|
||||
|
||||
dataType: 'json',
|
||||
|
||||
success: function (data) {
|
||||
$("#ldaptestloginicon").html('');
|
||||
$("#ldaptestloginrow").addClass('text-success');
|
||||
$("#ldaptestloginstatus").addClass('text-success');
|
||||
$("#ldaptestloginstatus").html('<i class="fas fa-check text-success"></i> {{ trans('admin/settings/message.ldap.authentication_success') }}');
|
||||
},
|
||||
|
||||
error: function (data) {
|
||||
|
||||
if (data.responseJSON) {
|
||||
var errors = data.responseJSON.message;
|
||||
} else {
|
||||
var errors;
|
||||
}
|
||||
|
||||
var error_text = '';
|
||||
|
||||
$("#ldaptestloginicon").html('');
|
||||
$("#ldaptestloginstatus").addClass('text-danger');
|
||||
$("#ldaptestloginicon").html('<i class="fas fa-exclamation-triangle text-danger"></i>');
|
||||
|
||||
if (data.status == 500) {
|
||||
$('#ldaptestloginstatus').html('{{ trans('admin/settings/message.ldap.500') }}');
|
||||
} else if (data.status == 400) {
|
||||
|
||||
if (typeof errors !='string') {
|
||||
|
||||
for (i = 0; i < errors.length; i++) {
|
||||
if (errors[i]) {
|
||||
error_text += '<li>Error: ' + errors[i];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
error_text = errors;
|
||||
}
|
||||
|
||||
$('#ldaptestloginstatus').html(error_text);
|
||||
|
||||
} else {
|
||||
$('#ldaptestloginstatus').html(data.responseText.message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
@ -0,0 +1,119 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.localization_title') }}
|
||||
@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="fas fa-globe-americas" aria-hidden="true"></i> {{ trans('admin/settings/general.localization') }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<!-- Language -->
|
||||
<div class="form-group {{ $errors->has('site_name') ? 'error' : '' }}">
|
||||
<div class="col-md-3 col-xs-12">
|
||||
{{ Form::label('site_name', trans('admin/settings/general.default_language')) }}
|
||||
</div>
|
||||
<div class="col-md-5 col-xs-12">
|
||||
{!! Form::locales('locale', Request::old('locale', $setting->locale), 'select2') !!}
|
||||
|
||||
{!! $errors->first('locale', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- name display format -->
|
||||
<div class="form-group {{ $errors->has('name_display_format') ? 'error' : '' }}">
|
||||
<div class="col-md-3 col-xs-12">
|
||||
{{ Form::label('name_display_format', trans('general.name_display_format')) }}
|
||||
</div>
|
||||
<div class="col-md-5 col-xs-12">
|
||||
{!! Form::name_display_format('name_display_format', Request::old('name_display_format', $setting->name_display_format), 'select2') !!}
|
||||
|
||||
{!! $errors->first('name_display_format', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Date format -->
|
||||
<div class="form-group {{ $errors->has('time_display_format') ? 'error' : '' }}">
|
||||
<div class="col-md-3 col-xs-12">
|
||||
{{ Form::label('time_display_format', trans('general.time_and_date_display')) }}
|
||||
</div>
|
||||
<div class="col-md-5 col-xs-12">
|
||||
{!! Form::date_display_format('date_display_format', Request::old('date_display_format', $setting->date_display_format), 'select2') !!}
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-12">
|
||||
{!! Form::time_display_format('time_display_format', Request::old('time_display_format', $setting->time_display_format), 'select2') !!}
|
||||
</div>
|
||||
|
||||
{!! $errors->first('time_display_format', '<div class="col-md-9 col-md-offset-3"><span class="alert-msg" aria-hidden="true">:message</span> </div>') !!}
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Currency -->
|
||||
<div class="form-group {{ $errors->has('default_currency') ? 'error' : '' }}">
|
||||
<div class="col-md-3 col-xs-12">
|
||||
{{ Form::label('default_currency', trans('admin/settings/general.default_currency')) }}
|
||||
</div>
|
||||
<div class="col-md-9 col-xs-12">
|
||||
{{ Form::text('default_currency', old('default_currency', $setting->default_currency), array('class' => 'form-control select2-container','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px; display: inline-block; ')) }}
|
||||
|
||||
{!! Form::digit_separator('digit_separator', old('digit_separator', $setting->digit_separator), 'select2') !!}
|
||||
|
||||
{!! $errors->first('default_currency', '<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="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- /box -->
|
||||
</div> <!-- /.col-md-8-->
|
||||
</div> <!-- /.row-->
|
||||
|
||||
{{Form::close()}}
|
||||
|
||||
@stop
|
||||
|
@ -0,0 +1,54 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
Attempted Logins
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<table
|
||||
data-cookie-id-table="loginReport"
|
||||
data-pagination="true"
|
||||
data-id-table="loginReport"
|
||||
data-search="false"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="desc"
|
||||
data-sort-name="created_at"
|
||||
id="loginReport"
|
||||
data-url="{{ route('api.settings.login_attempts') }}"
|
||||
data-mobile-responsive="true"
|
||||
class="table table-striped snipe-table"
|
||||
data-export-options='{
|
||||
"fileName": "login-report-{{ date('Y-m-d') }}"}'>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-sm-2" data-field="username" data-visible="true" data-sortable="true">{{ trans('mail.username') }}</th>
|
||||
<th class="col-sm-2" data-field="created_at" data-visible="true" data-sortable="true" data-formatter="dateDisplayFormatter">{{ trans('admin/settings/general.login_attempt') }}</th>
|
||||
<th class="col-sm-2" data-field="user_agent" data-visible="true" data-sortable="true">{{ trans('admin/settings/general.login_user_agent') }}</th>
|
||||
<th class="col-sm-2" data-field="remote_ip" data-visible="true" data-sortable="true">{{ trans('admin/settings/general.login_ip') }}</th>
|
||||
<th class="col-sm-2" data-field="successful" data-visible="true" data-formatter="trueFalseFormatter" data-sortable="true">{{ trans('admin/settings/general.login_success') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table')
|
||||
@stop
|
@ -0,0 +1,54 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.php_info') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-default"> {{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-header">
|
||||
<h2 class="box-title">{{ trans('admin/settings/general.php_info') }}</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<?php
|
||||
ob_start();
|
||||
phpinfo();
|
||||
|
||||
preg_match ('%<style type="text/css">(.*?)</style>.*?(<body>.*</body>)%s', ob_get_clean(), $matches);
|
||||
|
||||
# $matches [1]; # Style information
|
||||
# $matches [2]; # Body information
|
||||
|
||||
echo "<div class='phpinfodisplay'><style type='text/css'>\n",
|
||||
join( "\n",
|
||||
array_map(
|
||||
function ($i) {
|
||||
return ".phpinfodisplay " . preg_replace( "/,/", ",.phpinfodisplay ", $i );
|
||||
},
|
||||
preg_split( '/\n/', $matches[1] )
|
||||
)
|
||||
),
|
||||
"</style>\n",
|
||||
$matches[2],
|
||||
"\n</div>\n";
|
||||
?>
|
||||
</div>
|
||||
</div> <!-- /box-body-->
|
||||
</div> <!--/box-default-->
|
||||
|
||||
</div><!--/col-md-8-->
|
||||
</div><!--/row-->
|
||||
@stop
|
@ -0,0 +1,53 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.purge_deleted') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-default"> {{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="box box-solid box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title"><i class="fas fa-exclamation-triangle"></i> {{ trans('admin/settings/general.purge') }}</h2>
|
||||
</div>
|
||||
{{ Form::open(['method' => 'POST', 'files' => false, 'autocomplete' => 'off', 'class' => 'form-horizontal', 'role' => 'form' ]) }}
|
||||
<!-- CSRF Token -->
|
||||
{{csrf_field()}}
|
||||
<div class="box-body">
|
||||
<p>{{ trans('admin/settings/general.confirm_purge_help') }}</p>
|
||||
<div class="col-md-3{{ $errors->has('confirm_purge') ? 'error' : '' }}">
|
||||
{{ Form::label('confirm_purge', trans('admin/settings/general.confirm_purge')) }}
|
||||
</div>
|
||||
<div class="col-md-9{{ $errors->has('confirm_purge') ? 'error' : '' }}">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::text('confirm_purge', Request::old('confirm_purge'), array('class' => 'form-control', 'disabled'=>'true')) }}
|
||||
@else
|
||||
{{ Form::text('confirm_purge', Request::old('confirm_purge'), array('class' => 'form-control')) }}
|
||||
@endif
|
||||
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-danger" {{ (config('app.lock_passwords')===true) ? ' disabled' : '' }}>{{ trans('admin/settings/general.purge') }}</button>
|
||||
</div> <!--/box-footer-->
|
||||
{{ Form::close() }}
|
||||
</div> <!--/.box-solid-->
|
||||
</div><!-- /.col-md-8-->
|
||||
</div><!--/.row-->
|
||||
|
||||
{{Form::close()}}
|
||||
|
||||
@stop
|
@ -0,0 +1,25 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.purge') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
{!! nl2br($output) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
214
Productivite/Snipe-IT/resources/views/settings/saml.blade.php
Normal file
214
Productivite/Snipe-IT/resources/views/settings/saml.blade.php
Normal file
@ -0,0 +1,214 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.saml_title') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-default"> {{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
.checkbox label {
|
||||
padding-right: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
{{ Form::open(['method' => 'POST', 'files' => false, 'autocomplete' => 'false', 'class' => 'form-horizontal', 'role' => 'form']) }}
|
||||
<!-- CSRF Token -->
|
||||
{{csrf_field()}}
|
||||
|
||||
<!-- this is a hack to prevent Chrome from trying to autocomplete fields -->
|
||||
<input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="display:none;" />
|
||||
<input type="password" name="password_fake" id="password_fake" value="" style="display:none;" />
|
||||
|
||||
|
||||
|
||||
<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="fas fa-sign-in-alt"></i> {{ trans('admin/settings/general.saml') }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<!-- Enable SAML -->
|
||||
<div class="form-group{{ $errors->has('saml_integration') ? ' error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('admin/settings/general.saml_integration') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
|
||||
<label class="form-control{{ config('app.lock_passwords') === true ? ' form-control--disabled': '' }}">
|
||||
{{ Form::checkbox('saml_enabled', '1', old('saml_enabled', $setting->saml_enabled), ['class' => config('app.lock_passwords') === true ? 'disabled ': '', config('app.lock_passwords') === true ? 'disabled ': '', ]) }}
|
||||
{{ trans('admin/settings/general.saml_enabled') }}
|
||||
</label>
|
||||
|
||||
{!! $errors->first('saml_integration', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (config('app.lock_passwords') === true)
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@if ($setting->saml_enabled)
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<!-- SAML SP Details -->
|
||||
<!-- SAML SP Entity ID -->
|
||||
{{ Form::label('saml_sp_entitiyid', trans('admin/settings/general.saml_sp_entityid')) }}
|
||||
{{ Form::text('saml_sp_entitiyid', config('app.url'), ['class' => 'form-control', 'readonly']) }}
|
||||
<br>
|
||||
<!-- SAML SP ACS -->
|
||||
{{ Form::label('saml_sp_acs_url', trans('admin/settings/general.saml_sp_acs_url')) }}
|
||||
{{ Form::text('saml_sp_acs_url', route('saml.acs'), ['class' => 'form-control', 'readonly']) }}
|
||||
<br>
|
||||
<!-- SAML SP SLS -->
|
||||
{{ Form::label('saml_sp_sls_url', trans('admin/settings/general.saml_sp_sls_url')) }}
|
||||
{{ Form::text('saml_sp_sls_url', route('saml.sls'), ['class' => 'form-control', 'readonly']) }}
|
||||
<br>
|
||||
<!-- SAML SP Certificate -->
|
||||
@if (!empty($setting->saml_sp_x509cert))
|
||||
{{ Form::label('saml_sp_x509cert', trans('admin/settings/general.saml_sp_x509cert')) }}
|
||||
{{ Form::textarea('saml_sp_x509cert', $setting->saml_sp_x509cert, ['class' => 'form-control', 'wrap' => 'off', 'readonly']) }}
|
||||
<br>
|
||||
@endif
|
||||
<!-- SAML SP Metadata URL -->
|
||||
{{ Form::label('saml_sp_metadata_url', trans('admin/settings/general.saml_sp_metadata_url')) }}
|
||||
{{ Form::text('saml_sp_metadata_url', route('saml.metadata'), ['class' => 'form-control', 'readonly']) }}
|
||||
<br>
|
||||
<p class="help-block">
|
||||
<a href="{{ route('saml.metadata') }}" target="_blank" class="btn btn-default" style="margin-right: 5px;">{{ trans('admin/settings/general.saml_download') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
{!! $errors->first('saml_enabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- SAML IdP Metadata -->
|
||||
<div class="form-group {{ $errors->has('saml_idp_metadata') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('saml_idp_metadata', trans('admin/settings/general.saml_idp_metadata')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::textarea('saml_idp_metadata', old('saml_idp_metadata', $setting->saml_idp_metadata), ['class' => 'form-control','placeholder' => 'https://example.com/idp/metadata', 'wrap' => 'off', $setting->demoMode]) }}
|
||||
{!! $errors->first('saml_idp_metadata', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}<br>
|
||||
<button type="button" class="btn btn-default" id="saml_idp_metadata_upload_btn" {{ $setting->demoMode }}>{{ trans('button.select_file') }}</button>
|
||||
<input type="file" class="js-uploadFile" id="saml_idp_metadata_upload"
|
||||
data-maxsize="{{ Helper::file_upload_max_size() }}"
|
||||
accept="text/xml,application/xml" style="display:none; max-width: 90%" {{ $setting->demoMode }}>
|
||||
|
||||
<p class="help-block">{{ trans('admin/settings/general.saml_idp_metadata_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SAML Attribute Mapping Username -->
|
||||
<div class="form-group {{ $errors->has('saml_attr_mapping_username') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('saml_attr_mapping_username', trans('admin/settings/general.saml_attr_mapping_username')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::text('saml_attr_mapping_username', old('saml_attr_mapping_username', $setting->saml_attr_mapping_username), ['class' => 'form-control','placeholder' => '', $setting->demoMode]) }}
|
||||
<p class="help-block">{{ trans('admin/settings/general.saml_attr_mapping_username_help') }}</p>
|
||||
{!! $errors->first('saml_attr_mapping_username', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SAML Force Login -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('admin/settings/general.saml_forcelogin_label') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control{{ config('app.lock_passwords') === true ? ' form-control--disabled': '' }}">
|
||||
{{ Form::checkbox('saml_forcelogin', '1', old('saml_forcelogin', $setting->saml_forcelogin),['class' => $setting->demoMode, $setting->demoMode]) }}
|
||||
{{ trans('admin/settings/general.saml_forcelogin') }}
|
||||
</label>
|
||||
<p class="help-block">{{ trans('admin/settings/general.saml_forcelogin_help') }}</p>
|
||||
<p class="help-block">{{ route('login', ['nosaml']) }}</p>
|
||||
{!! $errors->first('saml_forcelogin', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SAML Single Log Out -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('admin/settings/general.saml_slo_label') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control{{ config('app.lock_passwords') === true ? ' form-control--disabled': '' }}">
|
||||
{{ Form::checkbox('saml_slo', '1', old('saml_slo', $setting->saml_slo),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
|
||||
{{ trans('admin/settings/general.saml_slo') }}
|
||||
</label>
|
||||
<p class="help-block">{{ trans('admin/settings/general.saml_slo_help') }}</p>
|
||||
{!! $errors->first('saml_slo', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SAML Custom Options -->
|
||||
<div class="form-group {{ $errors->has('saml_custom_settings') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('saml_custom_settings', trans('admin/settings/general.saml_custom_settings')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::textarea('saml_custom_settings', old('saml_custom_settings', $setting->saml_custom_settings), ['class' => 'form-control','placeholder' => 'example.option=false sp_x509cert=file:///... sp_private_key=file:///', 'wrap' => 'off', $setting->demoMode]) }}
|
||||
<p class="help-block">{{ trans('admin/settings/general.saml_custom_settings_help') }}</p>
|
||||
{!! $errors->first('saml_custom_settings', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</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"{{ config('app.lock_passwords') === true ? ' disabled': '' }}><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- /box -->
|
||||
|
||||
</div> <!-- /.col-md-8-->
|
||||
</div> <!-- /.row-->
|
||||
|
||||
{{Form::close()}}
|
||||
|
||||
|
||||
@stop
|
||||
|
||||
@push('js')
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
|
||||
$('#saml_idp_metadata_upload_btn').click(function() {
|
||||
$('#saml_idp_metadata_upload').click();
|
||||
});
|
||||
|
||||
$('#saml_idp_metadata_upload').on('change', function () {
|
||||
var fr = new FileReader();
|
||||
|
||||
fr.onload = function(e) {
|
||||
$('#saml_idp_metadata').text(e.target.result);
|
||||
}
|
||||
|
||||
fr.readAsText(this.files[0]);
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
@ -0,0 +1,188 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/settings/general.security_title') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-primary"> {{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
{{ 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="fas fa-lock" aria-hidden="true"></i> {{ trans('admin/settings/general.security') }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<div class="col-md-11 col-md-offset-1">
|
||||
|
||||
|
||||
<!-- Two Factor -->
|
||||
<div class="form-group {{ $errors->has('brand') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('two_factor_enabled', trans('admin/settings/general.two_factor_enabled_text')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
|
||||
{!! Form::two_factor_options('two_factor_enabled', Request::old('two_factor_enabled', $setting->two_factor_enabled), 'select2') !!}
|
||||
<p class="help-block">{{ trans('admin/settings/general.two_factor_enabled_warning') }}</p>
|
||||
|
||||
@if (config('app.lock_passwords'))
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
|
||||
{!! $errors->first('two_factor_enabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Min characters -->
|
||||
<div class="form-group {{ $errors->has('pwd_secure_min') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('pwd_secure_min', trans('admin/settings/general.pwd_secure_min')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::text('pwd_secure_min', Request::old('pwd_secure_min', $setting->pwd_secure_min), array('class' => 'form-control', 'style'=>'width: 50px;')) }}
|
||||
|
||||
{!! $errors->first('pwd_secure_min', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.pwd_secure_min_help') }}
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Common Passwords -->
|
||||
<div class="form-group {{ $errors->has('pwd_secure_complexity.*') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('pwd_secure_complexity', trans('admin/settings/general.pwd_secure_complexity')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
<span class="sr-only">{{ trans('admin/settings/general.pwd_secure_uncommon') }}</span>
|
||||
{{ Form::checkbox('pwd_secure_uncommon', '1', old('pwd_secure_uncommon', $setting->pwd_secure_uncommon),array( 'aria-label'=>'pwd_secure_uncommon')) }}
|
||||
{{ trans('admin/settings/general.pwd_secure_uncommon') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox("pwd_secure_complexity['disallow_same_pwd_as_user_fields']", 'disallow_same_pwd_as_user_fields', old('disallow_same_pwd_as_user_fields', strpos($setting->pwd_secure_complexity, 'disallow_same_pwd_as_user_fields')!==false), array('aria-label'=>'pwd_secure_complexity')) }}
|
||||
{{ trans('admin/settings/general.pwd_secure_complexity_disallow_same_pwd_as_user_fields') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox("pwd_secure_complexity['letters']", 'letters', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'letters')!==false), array('aria-label'=>'pwd_secure_complexity')) }}
|
||||
{{ trans('admin/settings/general.pwd_secure_complexity_letters') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox("pwd_secure_complexity['numbers']", 'numbers', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'numbers')!==false), array('aria-label'=>'pwd_secure_complexity')) }}
|
||||
{{ trans('admin/settings/general.pwd_secure_complexity_numbers') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox("pwd_secure_complexity['symbols']", 'symbols', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'symbols')!==false), array('aria-label'=>'pwd_secure_complexity')) }}
|
||||
{{ trans('admin/settings/general.pwd_secure_complexity_symbols') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox("pwd_secure_complexity['case_diff']", 'case_diff', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'case_diff')!==false), array('aria-label'=>'pwd_secure_complexity')) }}
|
||||
{{ trans('admin/settings/general.pwd_secure_complexity_case_diff') }}
|
||||
</label>
|
||||
|
||||
@if ($errors->has('pwd_secure_complexity.*'))
|
||||
<span class="alert-msg">{{ trans('validation.invalid_value_in_field') }}</span>
|
||||
@endif
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.pwd_secure_complexity_help') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
<hr>
|
||||
<!-- Remote User Authentication -->
|
||||
<div class="form-group {{ $errors->has('login_remote_user') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('admin/settings/general.login_remote_user_text') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<!-- Enable Remote User Login -->
|
||||
|
||||
@if (config('app.lock_passwords'))
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('login_remote_user_enabled', '1', old('login_remote_user_enabled', $setting->login_remote_user_enabled),array('aria-label'=>'login_remote_user')) }}
|
||||
{{ Form::label('login_remote_user_enabled', trans('admin/settings/general.login_remote_user_enabled_text')) }}
|
||||
</label>
|
||||
|
||||
{!! $errors->first('login_remote_user_enabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.login_remote_user_enabled_help') }}
|
||||
</p>
|
||||
<!-- Use custom remote user header name -->
|
||||
{{ Form::label('login_remote_user_header_name', trans('admin/settings/general.login_remote_user_header_name_text')) }}
|
||||
{{ Form::text('login_remote_user_header_name', Request::old('login_remote_user_header_name', $setting->login_remote_user_header_name),array('class' => 'form-control')) }}
|
||||
{!! $errors->first('login_remote_user_header_name', '<span class="alert-msg">:message</span>') !!}
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.login_remote_user_header_name_help') }}
|
||||
</p>
|
||||
<!-- Custom logout url to redirect to authentication provider -->
|
||||
{{ Form::label('login_remote_user_custom_logout_url', trans('admin/settings/general.login_remote_user_custom_logout_url_text')) }}
|
||||
{{ Form::text('login_remote_user_custom_logout_url', old('login_remote_user_custom_logout_url', $setting->login_remote_user_custom_logout_url),array('class' => 'form-control', 'aria-label'=>'login_remote_user_custom_logout_url')) }}
|
||||
|
||||
{!! $errors->first('login_remote_user_custom_logout_url', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.login_remote_user_custom_logout_url_help') }}
|
||||
</p>
|
||||
<!-- Disable other logins mechanism -->
|
||||
<label class="form-control">
|
||||
|
||||
{{ Form::checkbox('login_common_disabled', '1', old('login_common_disabled', $setting->login_common_disabled),array('aria-label'=>'login_common_disabled')) }}
|
||||
{{ trans('admin/settings/general.login_common_disabled_text') }}
|
||||
</label>
|
||||
{!! $errors->first('login_common_disabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.login_common_disabled_help') }}
|
||||
</p>
|
||||
@endif
|
||||
|
||||
</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-success"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- /box -->
|
||||
</div> <!-- /.col-md-8-->
|
||||
</div> <!-- /.row-->
|
||||
|
||||
{{Form::close()}}
|
||||
|
||||
@stop
|
@ -0,0 +1,9 @@
|
||||
@extends('layouts/default')
|
||||
@livewire('slack-settings-form')
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user