<div class="container">
    <div class="row">
        <div class="col-md-3">
        
        </div>


        <div class="col-md-6">
            <div class="panel panel-default">
                <div class="panel-body">

                    <h4>Edit Event Listing</h4>


                    <?php
                    $attributes = array(
                        'class' => 'form-horizontal',
                    );
                    ?>
                    <?php echo validation_errors('<p class="alert alert-dismissable alert-danger">'); ?>

                    <?php if ($this->session->flashdata('event_added')) : ?>
                        <p class="alert alert-dismissable alert-success"><?php echo $this->session->flashdata('event_added'); ?></p>
                    <?php endif; ?>


                    <?php echo form_open_multipart('event/update_listing/' . $this_listing->eventID . '', $attributes); ?>


                    <div class="panel-body">
                        <div class="form-group">
                            <span class="msgF pull-right">* required field.</span>
                            <label for="startDate" class="col-sm-3 control-label">Start Date:</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control datepicker" data-date-format="mm-dd-yyyy" id="startDate" name="startDate" value="<?php echo set_value('startDate'); ?>" placeholder="MM-DD-YYYY">
                            </div>
                            <div class="col-sm-1">
                                <span class="error2">*</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="endDate" class="col-sm-3 control-label">End Date:</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control datepicker" data-date-format="mm-dd-yyyy" id="endDate" name="endDate" value="<?php echo set_value('endDate'); ?>" placeholder="MM-DD-YYYY">
                            </div>
                            <div class="col-sm-1">
                                <span class="error2">*</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="title" class="col-sm-3 control-label">Title:</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" id="title" name="title" value="<?php echo $this_listing->title; ?>" placeholder="Title">
                            </div>
                            <div class="col-sm-1">
                                <span class="error2">*</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="description" class="col-sm-3 control-label">Description:</label>
                            <div class="col-sm-5">

                                <textarea class="form-control" rows="8" id="description" name="description" value="<?php echo set_value('description'); ?>" placeholder="Event Description"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="country" class="col-sm-3 control-label">Country:</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" id="country" name="country" value="<?php echo $this_listing->country; ?>" placeholder="Country">
                            </div>
                            <div class="col-sm-1">
                                <span class="error2">*</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="state" class="col-sm-3 control-label">State:</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" id="state" name="state" value="<?php echo $this_listing->state; ?>" placeholder="State">
                            </div>
                            <div class="col-sm-1">
                                <span class="error2">*</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="city" class="col-sm-3 control-label">City:</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" id ="city" name="city" value="<?php echo $this_listing->city; ?>" placeholder="City">
                            </div>
                            <div class="col-sm-1">
                                <span class="error2">*</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="zipcode" class="col-sm-3 control-label">Zipcode:</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" id="zipcode" name="zipcode" value="<?php echo $this_listing->zipcode; ?>" placeholder="Zipcode">
                            </div>
                            <div class="col-sm-1">
                                <span class="error2">*</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="address" class="col-sm-3 control-label">Address:</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" id="address" name="address" value="<?php echo $this_listing->address; ?>" placeholder="Address">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="brochure" class="col-sm-3 control-label">brochure:</label>
                            <div class="col-sm-5">
                                <input type="file" class="form-control" name="userfile" size="20">
                            </div>
                        </div>


                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-10">
                                <button type="submit" class="btn btn-primary btn-xs">Save
                                    <i class="glyphicon glyphicon-log-in"></i></button>
                                <a href="<?php echo base_url(); ?>event/update_listing/<?php echo $this_listing->eventID; ?>"
                            </a>

                        </div>
                    </div>


                </div>
                <?php echo form_close(); ?>

            </div>
        </div>
    </div>

    <div class="col-md-3">
    
    </div>
</div>
</div>










