e7fbdaaa66
BLUE-3: Validation is now performed on the file path selected. Tweaks to the storage locations form to display validation errors against the correct fields.
66 lines
2.7 KiB
PHP
66 lines
2.7 KiB
PHP
@extends('themes.base.layout')
|
|
@section('title', trans('admin.edit_storage', ['storage_name' => $storage->name]))
|
|
|
|
@section('breadcrumb')
|
|
<div class="breadcrumb">
|
|
<div class="container">
|
|
<ol class="breadcrumb">
|
|
<li><a href="{{ route('home') }}">@lang('navigation.breadcrumb.home')</a></li>
|
|
<li><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
|
|
<li><a href="{{ route('storage.index') }}">@lang('navigation.breadcrumb.storage')</a></li>
|
|
<li class="active">@lang('navigation.breadcrumb.edit_storage')</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('content')
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<h1>@yield('title')</h1>
|
|
<p>@lang('admin.edit_storage_intro', ['storage_name' => $storage->name])</p>
|
|
<hr/>
|
|
|
|
{!! Form::model($storage, ['route' => ['storage.update', $storage->id], 'method' => 'PUT']) !!}
|
|
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
|
|
{!! Form::label('name', trans('forms.name_label'), ['class' => 'control-label']) !!}
|
|
{!! Form::text('name', old('name'), ['class' => 'form-control']) !!}
|
|
|
|
@if ($errors->has('name'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('name') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" name="is_default"@if ($storage->is_default) checked="checked"@endif>
|
|
<strong>@lang('forms.default_storage_label')</strong>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" name="is_active"@if ($storage->is_active) checked="checked"@endif>
|
|
<strong>@lang('forms.storage_active_label')</strong>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<a href="{{ route('storage.index') }}" class="btn btn-default">@lang('forms.cancel_action')</a>
|
|
{!! Form::submit(trans('forms.save_action'), ['class' => 'btn btn-success']) !!}
|
|
</div>
|
|
{!! Form::close() !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
<script type="text/javascript">
|
|
var viewModel = new StorageLocationsViewModel();
|
|
ko.applyBindings(viewModel);
|
|
</script>
|
|
@endpush |