%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/sljcon/storage/framework/views/
Upload File :
Create Path :
Current File : /var/www/html/sljcon/storage/framework/views/ea22df327763bad95f00843d7c8f9695b7dbce90.php

<?php $__env->startSection('content'); ?>
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="pull-right">
                    <?php if($project_id != null): ?>
                        <a href="<?php echo e(route('admin.project.section',$project_id)); ?>" class="btn btn-warning">
                            <i class="fa fa-arrow-left"></i> All section
                        </a>
                    <?php else: ?>
                        <a href="<?php echo e(route('admin.project.section',$section->project->id)); ?>" class="btn btn-warning">
                            <i class="fa fa-arrow-left"></i> All section
                        </a>
                    <?php endif; ?>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12 m_top_30">
                <form class="form-horizontal" method="POST" autocomplete="off" enctype="multipart/form-data"
                      action="<?php echo e(route('admin.project.section.store', $id)); ?>">
                    <?php echo e(csrf_field()); ?>

                    <div class="center m_top_30 m_bottom_30">
                        <h2>Add New Section</h2>
                    </div>
                    <?php if($project_id != null): ?>
                        <input name="project_id" type="hidden" value="<?php echo e($project_id); ?>"/>
                    <?php else: ?>
                        <input name="project_id" type="hidden" value="<?php echo e($section->project->id); ?>"/>
                    <?php endif; ?>
                    <div class="form-group<?php echo e($errors->has('title') ? ' has-error' : ''); ?>">
                        <label for="title" class="col-md-3 control-label">Title</label>
                        <div class="col-md-6">
                            <input id="title" type="text" class="form-control" name="title"
                                   value="<?php echo e($section->title); ?>" required autofocus>
                        </div>
                    </div>
                    <div class="form-group<?php echo e($errors->has('description') ? ' has-error' : ''); ?>">
                        <label for="description" class="col-md-3 control-label">Description</label>
                        <div class="col-md-6">
                                <textarea id="description" class="form-control" name="description" rows="6"
                                          required
                                ><?php echo e($section->description); ?></textarea>
                            <?php if($errors->has('description')): ?>
                                <span class="help-block">
                                    <strong><?php echo e($errors->first('description')); ?></strong>
                                </span>
                            <?php endif; ?>
                        </div>
                    </div>
                    <div class="form-group<?php echo e($errors->has('order') ? ' has-error' : ''); ?>">
                        <label for="order" class="col-md-3 control-label">Order</label>
                        <div class="col-md-6">
                            
                            <select name="order" id="order" class="form-control">
                                <option value="1" <?php echo e($section->order == 1 ? 'selected' : ''); ?>>1</option>
                                <option value="2" <?php echo e($section->order == 2 ? 'selected' : ''); ?>>2</option>
                                <option value="3" <?php echo e($section->order == 3 ? 'selected' : ''); ?>>3</option>
                                <option value="4" <?php echo e($section->order == 4 ? 'selected' : ''); ?>>3</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group<?php echo e($errors->has('file') ? ' has-error' : ''); ?>">
                        <label for="file" class="col-md-3 control-label">Main Image</label>
                        <div class="col-md-6">
                            <input type="file" name="file" id="file" accept="image/*" onchange="fileChanged(this)">
                            <?php if($errors->has('file')): ?>
                                <span class="help-block">
                                    <strong><?php echo e($errors->first('file')); ?></strong>
                                </span>
                            <?php endif; ?>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-6 col-md-offset-3">
                            <?php if($section->media()->count() > 0): ?>
                                <img class="img img-responsive full-width" id="image-preview-uploaded"
                                     src="<?php echo e(env('APP_URL') . 'uploads/section/' . $section->media()->where('media_type', \App\Models\Media::MEDIA_TYPE_SECTION_IMAGE)->first()->file_name); ?>">
                            <?php endif; ?>
                            <img class="img img-responsive full-width" id="image-preview">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-8 col-md-offset-3">
                            <button type="submit" class="btn btn-primary">
                                Save
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<script>
    function fileChanged(input) {
        if (input.files && input.files[0]) {
            var reader = new FileReader();

            reader.onload = function (e) {
                $('#image-preview').attr('src', e.target.result);
                $('#image-preview-uploaded').css('display', 'none');
            };

            reader.readAsDataURL(input.files[0]);
        }
    }
</script>
<?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

Zerion Mini Shell 1.0