@include('admin.header')

<body class="skin-blue layout-top-nav">
<div class="wrapper">

    @include('admin.sidebar')

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <div class="container inner_container">
            <!-- Content Header (Page header) -->

            <!-- Main content -->
            <section class="content" style="padding: 20px 0;">

                        <div class="box">
                            <div class="box-header with-border">
                                <h3 class="box-title">Save Project</h3>
                            </div>
                            <!-- form start -->
                            <form id="project_form" enctype="multipart/form-data">

                                <input type="hidden" class="project_id" name="id" <?php if(isset($project)){?> value="<?php echo $project['id']; ?>" <?php } ?> >

                                <div class="box-body">

                                    <div class="form-group col-md-4">
                                        <label>Title <span class="statric">*</span></label>
                                        <input type="text" class="form-control project_title" name="title" placeholder="Enter title" <?php if(isset($project)){?> value="<?php echo $project['title']; ?>" <?php } ?> >
                                    </div>

                                    <div class="form-group col-md-4">
                                        <label>Slug <span class="statric">*</span></label>
                                        <input type="text" class="form-control project_slug" name="slug" placeholder="Enter slug" <?php if(isset($project)){?> value="<?php echo $project['slug']; ?>" <?php } ?> >
                                    </div>

                                    <div class="form-group col-md-4">
                                        <label>Price</label>
                                        <input type="text" class="form-control project_price" name="price" placeholder="Enter price" <?php if(isset($project)){?> value="<?php echo $project['price']; ?>" <?php } ?> >
                                    </div>

                                    <div class="form-group col-md-4">
                                        <label>Client</label>
                                        <input type="text" class="form-control project_client" name="client" placeholder="Enter client" <?php if(isset($project)){?> value="<?php echo $project['client']; ?>" <?php } ?> >
                                    </div>

                                    <div class="form-group col-md-4">
                                        <label>Start Date</label>
                                        <input type="text" class="form-control pull-right project_start_date" placeholder="Select start date" <?php if(isset($project)){?> value="<?php echo $project['start_date']; ?>" <?php } ?> >
                                    </div>

                                    <div class="form-group col-md-4">
                                        <label>End Date</label>
                                        <input type="text" class="form-control pull-right project_end_date" placeholder="Select end date" <?php if(isset($project)){?> value="<?php echo $project['end_date']; ?>" <?php } ?> >
                                    </div>



                                    <div class="form-group col-md-12">
                                        <label>Description</label>
                                        <textarea id="editor1" class="form-control project_description" name="description" rows="10" cols="80">@if(isset($project)) {{$project['description']}} @endif</textarea>
                                    </div>

                                    @if(isset($project))
                                        <div class="form-group col-md-12">
                                            <img style="border: 1px solid #ddd;border-radius: 4px;padding: 5px;width: 150px;" src="{{\Illuminate\Support\Facades\URL::to('/') .'/public/images/'.$project['media']}}" />
                                        </div>
                                    @endif

                                    <div class="form-group col-md-12">
                                        <input accept="image/x-png,image/gif,image/jpeg" type="file" name="select_file" id="select_file" />
                                    </div>

                                </div>
                                <!-- /.box-body -->

                                <div class="box-footer col-md-12">
                                    <div class="col-md-12">
                                        <button class="btn btn-primary save_project">Save</button>
                                    </div>
                                </div>
                            </form>
                        </div>



            </section>
            <!-- /.content -->
        </div>

    </div>

</div>

@include('admin.footer')
