snipe-it/resources/views/settings/localization.blade.php
snipe 296de34e8a
WIP: Upgrade develop to Laravel 6.6.1 (#7637)
I'm going ahead and merging this, since the upgrade doesn't break Flysystem any worse than the current develop is broken, so far as I can tell. 


* Upgraded framework to Laravel 6

### TO DO:

- Fix password restriction rules- the old library isn’t compatible with Laravel 6 :(
- Figure out why in-app API calls are returning “Unauthorized”

* More updates from Input:: to Request:: helper

* Switch to Request:: from Input

* Added passport config

* Fixed goofy password minimum in seeder

* Added laravel/helpers

* Changed ($item)  to ($item->id) in forms

I have no idea why this is necessary

* Changed ($item) to ($item->id) in forms

* Updated API middleware to auth:api

* Updated with added laravel auth.php values

* FIxed *&!^$%^&$^%!!!! ajax issue

* Switch to Request::get from Input::get

* Switched to Request facade

* Added password security minimums back in

The package we were using has not been updated to Laravel v6, so I created custom validators instead

* Added language strings for error messages for password rules

* Fixed `($item)` issue in formActions for partials
2019-12-10 19:32:50 -08:00

104 lines
4.1 KiB
PHP

@extends('layouts/default')
{{-- Page title --}}
@section('title')
Update Localization 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;
}
</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">
<h4 class="box-title">
<i class="fa fa-globe"></i> Localization
</h4>
</div>
<div class="box-body">
<div class="col-md-11 col-md-offset-1">
<!-- Language -->
<div class="form-group {{ $errors->has('site_name') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('site_name', trans('admin/settings/general.default_language')) }}
</div>
<div class="col-md-9">
{!! Form::locales('locale', Request::old('locale', $setting->locale), 'select2') !!}
{!! $errors->first('locale', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
<!-- Date format -->
<div class="form-group {{ $errors->has('time_display_format') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('time_display_format', trans('general.time_and_date_display')) }}
</div>
<div class="col-md-9">
{!! Form::date_display_format('date_display_format', Request::old('date_display_format', $setting->date_display_format), 'select2') !!}
{!! Form::time_display_format('time_display_format', Request::old('time_display_format', $setting->time_display_format), 'select2') !!}
{!! $errors->first('time_display_format', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
<!-- Currency -->
<div class="form-group {{ $errors->has('default_currency') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('default_currency', trans('admin/settings/general.default_currency')) }}
</div>
<div class="col-md-9">
{{ Form::text('default_currency', Request::old('default_currency', $setting->default_currency), array('class' => 'form-control','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
{!! $errors->first('default_currency', '<span class="alert-msg">: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-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
</div>
</div>
</div> <!-- /box -->
</div> <!-- /.col-md-8-->
</div> <!-- /.row-->
{{Form::close()}}
@stop