<?php $__env->startSection('head'); ?>
    <!-- BEGIN PAGE LEVEL STYLES -->
    <?php echo HTML::style("assets/global/plugins/bootstrap-select/css/bootstrap-select.min.css"); ?>

    <?php echo HTML::style("assets/global/plugins/select2/css/select2.css"); ?>

    <?php echo HTML::style("assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker.css"); ?>

    <?php echo HTML::style("assets/global/plugins/jquery-multi-select/css/multi-select.css"); ?>

    <?php echo HTML::style("assets/global/plugins/typeahead/typeahead.css"); ?>

    <?php echo HTML::style("assets/global/plugins/bootstrap-summernote/summernote.css"); ?>

    <!-- BEGIN THEME STYLES -->

<?php $__env->stopSection(); ?>


<?php $__env->startSection('mainarea'); ?>

    <!-- BEGIN PAGE HEADER-->
    <div class="page-head">
        <div class="page-title"><h1>
                <?php echo app('translator')->get("pages.projects.editTitle"); ?>
            </h1></div>
    </div>
    <div class="page-bar">
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <a onclick="loadView('<?php echo e(route('admin.dashboard.index')); ?>')"><?php echo e(__('core.dashboard')); ?></a>
                <i class="fa fa-circle"></i>
            </li>
            <li>
                <a onclick="loadView('<?php echo e(route('admin.projects.index')); ?>')"><?php echo app('translator')->get("pages.projects.indexTitle"); ?></a>
                <i class="fa fa-circle"></i>
            </li>
            <li>
                <span class="active"><?php echo app('translator')->get("pages.projects.editTitle"); ?></span>
            </li>
        </ul>

    </div>            <!-- END PAGE HEADER-->            <!-- BEGIN PAGE CONTENT-->
    <div class="row">
        <div class="col-md-12">
            <!-- BEGIN EXAMPLE TABLE PORTLET-->

            

            


            <div class="portlet light bordred">

                <div class="portlet-body form">

                    <!-- BEGIN FORM-->
                    <?php echo Form::open(['class'=>'form-horizontal ajax_form']); ?>



                    <div class="form-body">

                        <div class="form-group">
                            <label class="col-md-2 control-label"><?php echo e(trans('core.project_name')); ?>: <span class="required">
								* </span>
                            </label>

                            <div class="col-md-6">
                                <input type="text" class="form-control" id="typeahead_example_1" name="name"
                                       placeholder="<?php echo e(trans('core.name')); ?>" value="<?php echo e($project->name); ?>">
                                <span class="help-block"></span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label"><?php echo e(trans('core.description')); ?>: <span class="required">
								* </span>
                            </label>

                            <div class="col-md-6">
							<textarea class="form-control" id="description"
                                      name="description"><?php echo e($project->description); ?></textarea>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label"><?php echo e(trans('core.startDate')); ?>

                            </label>

                            <div class="col-md-6">
                                <div class="input-group input-medium date date-picker" data-date-viewmode="years">
                                    <input type="text" class="form-control" name="start_date" id="start_date"
                                           data-date-format="dd-mm-yyyy" data-date-viewmode="years" readonly
                                           value="<?php echo e($project->start_date); ?>">
                                    <span class="input-group-btn">
									<button class="btn default" type="button"><i class="fa fa-calendar"></i></button>
								</span>
                                </div>

                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label"><?php echo e(trans('core.endDate')); ?>

                            </label>

                            <div class="col-md-6">
                                <div class="input-group input-medium date2 ">
                                    <input type="text" class="form-control" name="end_date" id="end_date"
                                           data-date-format="dd-mm-yyyy" data-date-viewmode="years" readonly
                                           value="<?php echo e($project->end_date); ?>">
                                    <span class="input-group-btn">
									<button class="btn default" type="button"><i class="fa fa-calendar"></i></button>
								</span>
                                </div>

                            </div>
                        </div>

          

                        <div class="form-group">
                    <label class="col-md-2 control-label"><?php echo e(trans('core.status')); ?>: <span class="required">
                            * </span>
                    </label>

                    <div class="col-md-6">
                        <select class="form-control select floating" name="status">
                            <?php if($project->status=='active'): ?>
                            <option value="active" selected="selected">Active</option>
                            <?php else: ?>
                            <option value="active">Active</option>
                            <?php endif; ?>
                            
                            <?php if($project->status=='inactive'): ?>
                            <option value="inactive" selected="selected">Open</option>
                            <?php else: ?>
                            <option value="inactive">Open</option>
                            <?php endif; ?>

                            <?php if($project->status=='closed'): ?>
                            <option value="closed" selected="selected">Closed</option>
                            <?php else: ?>
                            <option value="closed">Closed</option>
                            <?php endif; ?>
                            
                        </select>
                    </div>
                </div>


                        <!-- END FORM-->

                    </div>
                    <div class="form-actions">
                        <div class="row">
                            <div class="col-md-offset-3 col-md-9">

                                <button class="btn green" onclick="ajaxUpdateProject(<?php echo e($project->id); ?>);return false;">
                                    <i class="fa fa-edit"></i> <?php echo e(trans('core.btnSubmit')); ?> </button>

                            </div>
                        </div>
                    </div>
                    <?php echo Form::close(); ?>

                </div>
                <!-- END EXAMPLE TABLE PORTLET-->

            </div>
        </div>
        <!-- END PAGE CONTENT-->
    </div>


<?php $__env->stopSection(); ?>

<?php $__env->startSection('footerjs'); ?>


    <!-- BEGIN PAGE LEVEL PLUGINS -->
    <?php echo HTML::script("assets/global/plugins/bootstrap-select/js/bootstrap-select.min.js"); ?>

    <?php echo HTML::script("assets/global/plugins/select2/js/select2.min.js"); ?>

    <?php echo HTML::script("assets/global/plugins/jquery-multi-select/js/jquery.multi-select.js"); ?>

    <?php echo HTML::script("assets/global/plugins/bootstrap-summernote/summernote.min.js"); ?>

    <?php echo HTML::script("assets/global/plugins/typeahead/typeahead.bundle.min.js"); ?>

    <?php echo HTML::script("assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"); ?>

    <script>

        $(document).ready(function () {
            $('#description').summernote({height: 300});
            $('#start_date').datepicker();
            $('#end_date').datepicker();
        });
        

        function ajaxUpdateProject(id) {
            var url = "<?php echo e(route('admin.projects.update',':id')); ?>";
            url = url.replace(':id', id);
            $.easyAjax({
                url: url,
                type: "PUT",
                data: $(".ajax_form").serialize(),
                container: ".ajax_form",
            });

        }
    </script>
    <!-- END PAGE LEVEL PLUGINS -->
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.adminlayouts.adminlayout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/kodiinit/hrm.kodiinitiative.org/resources/views/admin/projects/edit.blade.php ENDPATH**/ ?>