2017-09-10 21:12:57 +01:00
|
|
|
@extends(Theme::viewName('layout'))
|
2016-09-24 09:34:08 +01:00
|
|
|
@section('title', trans('admin.create_storage'))
|
|
|
|
|
|
|
|
@section('breadcrumb')
|
2017-03-23 05:55:14 +00:00
|
|
|
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
|
|
|
<li class="breadcrumb-item"><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
|
|
|
|
<li class="breadcrumb-item"><a href="{{ route('storage.index') }}">@lang('navigation.breadcrumb.storage')</a></li>
|
|
|
|
<li class="breadcrumb-item active">@lang('navigation.breadcrumb.create_storage')</li>
|
2016-09-24 09:34:08 +01:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
2017-03-23 05:55:14 +00:00
|
|
|
<div class="col">
|
2016-09-24 09:34:08 +01:00
|
|
|
<h1>@lang('admin.create_storage')</h1>
|
|
|
|
<p>@lang('admin.create_storage_intro')</p>
|
|
|
|
<hr/>
|
|
|
|
|
2017-03-23 05:55:14 +00:00
|
|
|
<form action="{{ route('storage.store') }}" method="post" id="storage-options">
|
|
|
|
{{ csrf_field() }}
|
2016-10-28 04:54:38 +01:00
|
|
|
|
2017-08-31 17:20:58 +01:00
|
|
|
<div class="form-group">
|
2017-03-23 05:55:14 +00:00
|
|
|
<label class="form-control-label" for="storage-name">@lang('forms.name_label')</label>
|
2019-07-20 18:06:21 +01:00
|
|
|
<input type="text" class="form-control{{ $errors->has('name') ? ' is-invalid' : '' }}" id="storage-name" name="name" value="{{ old('name', $storage->name) }}">
|
2016-10-28 04:54:38 +01:00
|
|
|
|
2017-03-23 05:55:14 +00:00
|
|
|
@if ($errors->has('name'))
|
2017-08-31 17:20:58 +01:00
|
|
|
<div class="invalid-feedback">
|
2017-03-23 05:55:14 +00:00
|
|
|
<strong>{{ $errors->first('name') }}</strong>
|
2016-10-28 04:54:38 +01:00
|
|
|
</div>
|
2017-03-23 05:55:14 +00:00
|
|
|
@endif
|
|
|
|
</div>
|
2016-10-28 04:54:38 +01:00
|
|
|
|
2017-03-23 05:55:14 +00:00
|
|
|
<div class="form-group">
|
2017-08-31 17:20:58 +01:00
|
|
|
<div class="form-group">
|
2017-03-23 05:55:14 +00:00
|
|
|
<label class="form-control-label" for="storage-source">@lang('forms.storage_driver_label')</label>
|
2017-08-31 17:20:58 +01:00
|
|
|
<select id="storage-source" name="source" class="form-control{{ $errors->has('source') ? ' is-invalid' : '' }}" v-model="storage_driver">
|
2017-03-23 05:55:14 +00:00
|
|
|
@foreach ($album_sources as $key => $value)
|
|
|
|
<option value="{{ $key }}"{{ old('source') == $key ? ' selected="selected"' : '' }}>{{ $value }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
|
|
|
|
@if ($errors->has('source'))
|
2017-08-31 17:20:58 +01:00
|
|
|
<div class="invalid-feedback">
|
2017-03-23 05:55:14 +00:00
|
|
|
<strong>{{ $errors->first('source') }}</strong>
|
2016-10-28 04:54:38 +01:00
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2017-03-23 05:55:14 +00:00
|
|
|
</div>
|
2016-10-28 12:59:36 +01:00
|
|
|
|
2017-03-23 05:55:14 +00:00
|
|
|
<div v-if="storage_driver == 'LocalFilesystemSource'">
|
|
|
|
@include(Theme::viewName('partials.admin_storages_filesystem_options'))
|
|
|
|
</div>
|
2016-10-28 12:59:36 +01:00
|
|
|
|
2017-03-23 05:55:14 +00:00
|
|
|
<div v-if="storage_driver == 'OpenStackSource'">
|
2016-11-05 09:41:07 +00:00
|
|
|
@include(Theme::viewName('partials.admin_storages_openstack_options'))
|
2016-11-03 13:33:35 +00:00
|
|
|
</div>
|
|
|
|
|
2017-03-23 05:55:14 +00:00
|
|
|
<div v-if="storage_driver == 'AmazonS3Source'">
|
2016-11-03 13:33:35 +00:00
|
|
|
@include(Theme::viewName('partials.admin_storages_amazon_s3_options'))
|
|
|
|
</div>
|
2016-11-05 09:41:07 +00:00
|
|
|
|
2017-03-23 05:55:14 +00:00
|
|
|
<div v-if="storage_driver == 'RackspaceSource'">
|
2016-11-05 09:41:07 +00:00
|
|
|
@include(Theme::viewName('partials.admin_storages_rackspace_options'))
|
|
|
|
</div>
|
2017-03-23 05:55:14 +00:00
|
|
|
|
2018-07-12 23:46:59 +01:00
|
|
|
<div class="form-check">
|
2019-07-20 18:06:21 +01:00
|
|
|
<input type="checkbox" class="form-check-input" id="is-default" name="is_default"@if (old('is_default', $storage->is_default)) checked="checked"@endif>
|
2018-07-12 23:46:59 +01:00
|
|
|
<label class="form-check-label" for="is-default">@lang('forms.default_storage_label')</label>
|
|
|
|
</div>
|
2017-03-23 05:55:14 +00:00
|
|
|
|
|
|
|
<div class="text-right">
|
|
|
|
<a href="{{ route('storage.index') }}" class="btn btn-link">@lang('forms.cancel_action')</a>
|
|
|
|
<button type="submit" class="btn btn-success"><i class="fa fa-fw fa-check"></i> @lang('forms.create_action')</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
2016-09-24 09:34:08 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@push('scripts')
|
|
|
|
<script type="text/javascript">
|
2017-03-23 05:55:14 +00:00
|
|
|
$(document).ready(function()
|
|
|
|
{
|
|
|
|
var viewModel = new StorageLocationViewModel();
|
|
|
|
var app = new Vue(viewModel);
|
|
|
|
|
|
|
|
@if (strlen(old('source')) > 0)
|
|
|
|
app.storage_driver = '{{ old('source') }}';
|
|
|
|
@endif
|
|
|
|
});
|
2016-09-24 09:34:08 +01:00
|
|
|
</script>
|
|
|
|
@endpush
|