tethys/resources/views/settings/page/edit.blade.php

168 lines
6.6 KiB
PHP
Raw Normal View History

2018-09-14 16:16:02 +00:00
@extends ('settings.layouts.app')
2018-09-06 15:58:54 +00:00
@section ('title', trans('labels.backend.pages.management') . ' | ' . trans('labels.backend.pages.edit'))
2018-09-14 16:16:02 +00:00
{{--
@section('page-header')
<h1>
{{ trans('labels.backend.pages.management') }}
<small>{{ trans('labels.backend.pages.edit') }}</small>
</h1>
@endsection
--}}
2018-11-13 16:21:58 +00:00
@section('content')
{!! Form::model($page, ['method' => 'PATCH', 'route' => ['settings.page.update', $page->id],
'class' => 'pure-form pure-form-aligned', 'enctype' => 'multipart/form-data']) !!}
2018-09-14 16:16:02 +00:00
<div class="box box-info">
<div class="header">
<h3 class="header-title">{{ trans('labels.backend.pages.edit') }}
</h3>
2018-11-13 16:21:58 +00:00
<div class="box-tools pull-right">
2018-09-14 16:16:02 +00:00
{{--
@include('backend.pages.partials.pages-header-buttons') --}}
</div>
</div>
<div class="box-body box-content">
2018-11-13 16:21:58 +00:00
<!-- Nav tabs -->
<input type="radio" id="english-option" name="nav-tab" type="hidden">
<input type="radio" id="german-option" name="nav-tab" type="hidden">
<div class="tabs is-boxed">
<ul>
<li class="english-link">
<label for="english-option"><a class="remove-check">EN</a></label>
</li>
<li class="german-link">
<label for="german-option"><a class="remove-check">DE</a></label>
</li>
</ul>
</div>
2018-09-14 16:16:02 +00:00
2018-11-13 16:21:58 +00:00
<!-- Tab panes -->
<div class="tab-content">
2018-09-14 16:16:02 +00:00
2018-11-13 16:21:58 +00:00
<div class="tab-pane content-pic" id="english-form">
<div class="pure-control-group">
{!! Form::label('en_title', trans('validation.attributes.backend.pages.title'), ['class' => 'col-lg-2 control-label required'])
!!}
<div class="col-lg-10">
{!! Form::text('en_title', $page->translate('en')->title, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.title'),
'required' => 'required', 'readonly' => 'true']) !!}
</div>
</div>
<div class="pure-control-group">
{!! Form::label('en_description', trans('validation.attributes.backend.pages.description'), ['class' => 'col-lg-2 control-label
required']) !!}
<div class="col-lg-10">
2019-04-16 12:35:16 +00:00
{!! Form::textarea('en_description', $page->translate('en')->description, ['class' => 'form-control description ckeditor', 'placeholder' => trans('validation.attributes.backend.pages.description')])
2018-11-13 16:21:58 +00:00
!!}
</div>
</div>
</div>
2018-09-14 16:16:02 +00:00
2018-11-13 16:21:58 +00:00
<div class="tab-pane content-music" id="german-form">
<div class="pure-control-group">
{!! Form::label('de_title', trans('validation.attributes.backend.pages.title'), ['class' => 'col-lg-2 control-label required'])
!!}
<div class="col-lg-10">
{!! Form::text('de_title', $page->translate('de')->title, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.title'),
'required' => 'required', 'readonly' => 'true']) !!}
</div>
</div>
<div class="pure-control-group">
{!! Form::label('de_description', trans('validation.attributes.backend.pages.description'), ['class' => 'col-lg-2 control-label
required']) !!}
<div class="col-lg-10">
2019-04-16 12:35:16 +00:00
{!! Form::textarea('de_description', $page->translate('de')->description, ['class' => 'form-control description ckeditor', 'placeholder' => trans('validation.attributes.backend.pages.description')])
2018-11-13 16:21:58 +00:00
!!}
</div>
2018-09-06 15:58:54 +00:00
</div>
2018-09-14 16:16:02 +00:00
</div>
</div>
2018-11-13 16:21:58 +00:00
<div class="pure-control-group">
{!! Form::label('status', trans('validation.attributes.backend.pages.is_active'), ['class' => 'col-lg-2 control-label']) !!}
<div class="control-group">
<label class="control control--checkbox">
{!! Form::checkbox('status', 1, ($page->status == 1) ? true : false ) !!}
</label>
</div>
</div>
2018-09-14 16:16:02 +00:00
<div class="pure-controls">
2018-11-13 16:21:58 +00:00
{{ link_to_route('settings.page.index', trans('buttons.general.cancel'), [], ['class' => 'pure-button button-small is-warning']) }}
{!! Form::submit(trans('buttons.general.crud.update'), ['class' => 'pure-button button-small is-primary']) !!}
2018-09-14 16:16:02 +00:00
</div>
2018-11-13 16:21:58 +00:00
2018-09-14 16:16:02 +00:00
</div>
<!-- /.box-body -->
</div>
2018-11-13 16:21:58 +00:00
@include('errors._errors')
{!! Form::close() !!}
2018-09-06 15:58:54 +00:00
@endsection
2018-09-14 16:16:02 +00:00
2018-11-13 16:21:58 +00:00
@section('styles')
{{-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.2/css/bulma.min.css"/> --}}
<style type="text/css">
input[type="radio"], .tab-pane { display: none; }
#english-option:checked ~ .tab-content > .content-pic,
#german-option:checked ~ .tab-content > .content-music,
#video:checked ~ .tab-content > .content-video,
#doc:checked ~ .tab-content > .content-doc {
display: block;
}
#english-option:checked ~ .tabs .english-link a,
#german-option:checked ~ .tabs .german-link a {
/* border-bottom-color: #3273dc;
color: #3273dc; */
background-color: #3273dc;
border-color: #3273dc;
color: #fff;
z-index: 1;
}
</style>
@endsection
2018-09-06 15:58:54 +00:00
@section("after-scripts")
2019-04-16 12:35:16 +00:00
<script type="text/javascript" src="{{ asset('backend/ckeditor.js') }}"></script>
2018-09-14 16:16:02 +00:00
<script>
2019-04-16 12:35:16 +00:00
$(document).ready(function() {
document.getElementById("english-option").checked = true;
});
2018-11-13 16:21:58 +00:00
// var $englishForm = $('#english-form');
// var $germanForm = $('#german-form');
// var $englishLink = $('#english-link');
// var $germanLink = $('#german-link');
// $englishLink.click(function() {
// $englishLink.toggleClass('bg-aqua-active');
// $englishForm.toggleClass('hidden');
// $germanLink.toggleClass('bg-aqua-active');
// $germanForm.toggleClass('hidden');
// });
// $germanLink.click(function() {
// $englishLink.toggleClass('bg-aqua-active');
// $englishForm.toggleClass('hidden');
// $germanLink.toggleClass('bg-aqua-active');
// $germanForm.toggleClass('hidden');
// });
2019-04-16 12:35:16 +00:00
2018-11-13 16:21:58 +00:00
2018-09-14 16:16:02 +00:00
</script>
2019-04-16 12:35:16 +00:00
@endsection