2018-08-03 14:50:13 +00:00
|
|
|
@extends('admin::layouts.content')
|
|
|
|
|
|
|
|
|
|
@section('page_title')
|
|
|
|
|
{{ __('admin::app.settings.sliders.add-title') }}
|
|
|
|
|
@stop
|
|
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
<div class="content">
|
|
|
|
|
<form method="POST" action="{{ route('admin.sliders.create') }}" @submit.prevent="onSubmit" enctype="multipart/form-data">
|
|
|
|
|
<div class="page-header">
|
|
|
|
|
<div class="page-title">
|
|
|
|
|
<h1>{{ __('admin::app.settings.sliders.add-title') }}</h1>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="page-action">
|
|
|
|
|
<button type="submit" class="btn btn-lg btn-primary">
|
|
|
|
|
{{ __('admin::app.settings.sliders.save-btn-title') }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="page-content">
|
|
|
|
|
<div class="form-container">
|
|
|
|
|
@csrf()
|
2018-10-27 11:13:57 +00:00
|
|
|
<div class="control-group" :class="[errors.has('title') ? 'has-error' : '']">
|
|
|
|
|
<label for="title">{{ __('admin::app.settings.sliders.title') }}</label>
|
|
|
|
|
<input type="text" class="control" name="title" v-validate="'required'">
|
|
|
|
|
<span class="control-error" v-if="errors.has('title')">@{{ errors.first('title') }}</span>
|
|
|
|
|
</div>
|
2018-08-03 14:50:13 +00:00
|
|
|
|
2018-10-27 11:13:57 +00:00
|
|
|
<?php $channels = core()->getAllChannels() ?>
|
|
|
|
|
<div class="control-group" :class="[errors.has('channel_id') ? 'has-error' : '']">
|
|
|
|
|
<label for="channel_id">{{ __('admin::app.settings.sliders.channels') }}</label>
|
|
|
|
|
<select class="control" id="channel_id" name="channel_id" v-validate="'required'">
|
|
|
|
|
@foreach($channels as $channel)
|
|
|
|
|
<option value="{{ $channel->id }}" @if($channel->id == old('channel_id')) selected @endif>
|
|
|
|
|
{{ __($channel->name) }}
|
|
|
|
|
</option>
|
|
|
|
|
@endforeach
|
|
|
|
|
</select>
|
|
|
|
|
<span class="control-error" v-if="errors.has('channel_id')">@{{ errors.first('channel_id') }}</span>
|
|
|
|
|
</div>
|
2018-08-03 14:50:13 +00:00
|
|
|
|
2018-10-27 11:13:57 +00:00
|
|
|
<div class="control-group" :class="[errors.has('image') ? 'has-error' : '']">
|
|
|
|
|
<label for="new_image">{{ __('admin::app.settings.sliders.image') }}</label>
|
2018-10-28 11:00:15 +00:00
|
|
|
<image-wrapper :button-label="'{{ __('admin::app.settings.sliders.image') }}'" input-name="image" :multiple="false"></image-wrapper>
|
2018-10-27 11:13:57 +00:00
|
|
|
</div>
|
2018-08-03 14:50:13 +00:00
|
|
|
|
2018-10-27 11:13:57 +00:00
|
|
|
<div class="control-group" :class="[errors.has('content') ? 'has-error' : '']">
|
|
|
|
|
<label for="content">{{ __('admin::app.settings.sliders.content') }}</label>
|
2018-08-03 14:50:13 +00:00
|
|
|
|
2018-10-29 06:09:09 +00:00
|
|
|
<textarea id="tiny" class="control" id="add_content" name="content" rows="5"></textarea>
|
2018-08-03 14:50:13 +00:00
|
|
|
|
2018-10-27 11:13:57 +00:00
|
|
|
<span class="control-error" v-if="errors.has('content')">@{{ errors.first('content') }}</span>
|
|
|
|
|
</div>
|
2018-08-03 14:50:13 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
@endsection
|