blue-twilight/resources/views/themes/base/admin/edit_storage.blade.php

76 lines
3.5 KiB
PHP
Raw Normal View History

@extends('themes.base.layout')
@section('title', trans('admin.edit_storage', ['storage_name' => $storage->name]))
@section('breadcrumb')
<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.edit_storage')</li>
@endsection
@section('content')
<div class="container">
<div class="row">
<div class="col">
<h1>@yield('title')</h1>
<p>@lang('admin.edit_storage_intro', ['storage_name' => $storage->name])</p>
<hr/>
<form action="{{ route('storage.update', [$storage->id]) }}" method="post" id="storage-options">
{{ method_field('PUT') }}
{{ csrf_field() }}
<div class="form-group{{ $errors->has('name') ? ' has-danger' : '' }}">
<label class="form-control-label" for="storage-name">@lang('forms.name_label')</label>
<input type="text" class="form-control" id="storage-name" name="name" value="{{ old('name') }}">
@if ($errors->has('name'))
<div class="form-control-feedback">
<strong>{{ $errors->first('name') }}</strong>
</div>
@endif
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="is_default"@if ($storage->is_default) checked="checked"@endif>
@lang('forms.default_storage_label')
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="is_active"@if ($storage->is_active) checked="checked"@endif>
@lang('forms.storage_active_label')
</label>
</div>
@if ($storage->source == 'LocalFilesystemSource')
<hr/>
@include(Theme::viewName('partials.admin_storages_filesystem_options'))
@endif
@if ($storage->source == 'OpenStackSource')
<hr/>
@include(Theme::viewName('partials.admin_storages_openstack_options'))
@endif
@if ($storage->source == 'AmazonS3Source')
<hr/>
@include(Theme::viewName('partials.admin_storages_amazon_s3_options'))
@endif
@if ($storage->source == 'RackspaceSource')
<hr/>
@include(Theme::viewName('partials.admin_storages_rackspace_options'))
@endif
<div class="text-right">
<a href="{{ route('storage.index') }}" class="btn btn-default">@lang('forms.cancel_action')</a>
<button type="submit" class="btn btn-success"><i class="fa fa-fw fa-check"></i> @lang('forms.save_action')</button>
</div>
</form>
</div>
</div>
</div>
@endsection