
<?php $__env->startSection('content'); ?>
<div class="main-header">
    <div class="admin-header">
        <div class="uk-grid">
            <div class="uk-width-1-2">
                <h1 class="uk-margin-small-top main-heading"><?php echo e($title); ?></h1>
            </div>
            <div class="uk-width-1-2 uk-text-right">
                <a class="uk-button uk-button-default" href="<?php echo e(url('admin/cms')); ?>"> Back</a>
            </div>
        </div>
    </div>
</div>
<div class="uk-margin uk-width-1-1 uk-margin-auto uk-card uk-card-default uk-card-body small-padding">
	<?php echo $__env->make('partials.messages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
	<?php echo e(Form::open(array('route' => ['admin.cms.update',$data->id],'method' => 'PUT', 'class' => 'uk-form-stacked','id' => 'edit_form', 'files' => 'true'))); ?>

    <?php echo csrf_field(); ?>
	<div uk-grid>
    	<div class="uk-width-2-3@m">  
    	    <div class="uk-margin-small">
                <label for="ordering" class="uk-form-label">Ordering <span class="uk-text-danger">*</span></label>
                <div class="uk-form-controls">
                    <?php echo e(Form::number('ordering', $data->ordering,['class' => 'uk-input','autocomplete' => 'off'])); ?>

                </div>    
            </div>
            <div class="uk-margin-small">
                <label for="title" class="uk-form-label">Title <span class="uk-text-danger">*</span></label>
                <div class="uk-form-controls">
                    <?php echo e(Form::text('title', $data->title,['class' => 'uk-input','autocomplete' => 'off'])); ?>

                </div>    
            </div>
            <div class="uk-margin-small">
                <label for="description" class="uk-form-label">Description </label>
                <div class="uk-form-controls">
                    <?php echo e(Form::textarea('description',$data->description,['class' => 'uk-textarea','autocomplete' => 'off', 'rows' => '4'])); ?>

                </div>    
            </div>
            <div class="uk-margin-small">
                <div class="uk-form-controls">
                <?php echo e(Form::submit('Update', array('class' => 'uk-button uk-button-primary','name' => 'save', 'id' => 'edit_submit'))); ?>

                <a class="uk-button uk-button-default" href="<?php echo e(url('admin/cms')); ?>">Cancel</a>
                </div>
            </div> 
        </div>
        <?php echo e(Form::close()); ?>

    </div>
</div>                   
<?php $__env->stopSection(); ?>
<?php $__env->startSection('footer-script'); ?>
<script src="https://cdn.tiny.cloud/1/o8hirmy6xz6a9ebl09dlbq1rqsgglo479w9ghmkhir5av4au/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>

 <script>
    tinymce.init({
      height : "350",
      selector: 'textarea',
      tinycomments_mode: 'embedded',
      tinycomments_author: 'Author name',
      mergetags_list: [
        { value: 'First.Name', title: 'First Name' },
        { value: 'Email', title: 'Email' },
      ]
    });
    
    $("#edit_form").validate({
        errorClass: "uk-text-danger",
        rules:{
            ordering:"required",
            title:"required",
        },
        messages: {
            ordering: {
                required: "Complete this required field."
            },
            title: {
                required: "Complete this required field.",
            }
        },
        submitHandler: function(form) {
            $('#edit_submit').attr('disabled',true);
            form.submit();
        }
    });
    
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/kelowna/public_html/listingllama.kelowna.website/resources/views/admin/cms/edit.blade.php ENDPATH**/ ?>