94 lines
5.6 KiB
PHP
94 lines
5.6 KiB
PHP
@extends('backend.template')
|
|
@section('content')
|
|
<div class='card'>
|
|
<div class='card-header d-flex justify-content-between align-items-center'>
|
|
<h2 class="">{{ label('Edit News') }}</h2>
|
|
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('news.index')); ?>
|
|
|
|
</div>
|
|
<div class='card-body'>
|
|
<form action="{{ route('news.update', [$data->news_id]) }}" id="updateCustomForm" method="POST">
|
|
@csrf <input type=hidden name='news_id' value='{{ $data->news_id }}' />
|
|
<div class="row">
|
|
<div class="col-xl-9 mb-3 ">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-6 col-lg-6 col-md-6">
|
|
{{ createCustomSelect('tbl_economies', 'title', 'economy_id', $data->economies_id, 'Economies Id', 'economics_id', 'form-control select2', 'status<>-1') }}
|
|
</div>
|
|
<div class="col-6 col-lg-6 col-md-6">
|
|
{{ createCustomSelect('tbl_provinces', 'title', 'province_id', $data->provinces_id, 'Provinces Id', 'provinces_id', 'form-control select2', 'status<>-1') }}
|
|
</div>
|
|
<div class="col-6 col-lg-6 col-md-6">
|
|
{{ createCustomSelect('tbl_news_type', 'title', 'news_type_id', $data->news_type_id, 'News Type Id', 'news_type_id', 'form-control select2', 'status<>-1') }}
|
|
</div>
|
|
<div class="col-6 col-lg-6 col-md-6">
|
|
{{ createCustomSelect('tbl_authors', 'title', 'author_id', $data->authors_id, 'Authors Id', 'authors_id', 'form-control select2', 'status<>-1') }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4 class="card-title mb-0">News</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="col-lg-12">
|
|
{{ createText('title', 'title', 'Title','',$data->title) }}
|
|
</div>
|
|
<div class="col-lg-12 pb-2">
|
|
{{ createText('nepali_title', 'nepali_title', 'Nepali Title','',$data->nepali_title) }}
|
|
</div>
|
|
<div class="col-lg-12 pb-2">
|
|
{{ createPlainTextArea('short_description','', 'Short Description',$data->short_description) }}
|
|
</div>
|
|
<div class="col-lg-12 pb-2">
|
|
{{ createTextarea('content', 'content ckeditor-classic', 'Content','',$data->content) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php createButton('btn-primary btn-store', '', 'Submit'); ?>
|
|
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('news.index')); ?>
|
|
|
|
</div>
|
|
<div class="col-xl-3">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
{{ createCustomSelect('tbl_newscategories', 'title', 'category_id', $data->newscategories_id, 'Newscategories Id', 'newscategories_id', 'form-control select2', 'status<>-1') }}
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4 class="card-title mb-0">Cover Photo</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
{{ createImageInput('thumb', 'Thumb','',$data->thumb) }}
|
|
<div class="border mt-3 border-dashed"></div>
|
|
{{ createImageInput('image', 'Image','',$data->image) }}
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4 class="card-title mb-0">Featured News</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="form-check form-switch form-switch-lg form-switch-success mb-3" dir="ltr">
|
|
<input type="checkbox" class="form-check-input" id="customSwitchsizelg"
|
|
name="featured_news" @checked($data->featured_news == 'True')>
|
|
<label class="form-check-label" for="customSwitchsizelg">Active</label>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer">
|
|
<?php createButton('btn-primary btn-store', '', 'Submit'); ?>
|
|
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('news.index')); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
@endsection
|