<div class="container-fluid">
	<!-- ============================================================== -->
	<!-- Start Page Content -->
	<!-- ============================================================== -->
	<div class="row ">
		<div class="col-12">
			<div class="card card-outline-info">
				<div class="card-header">
					<h6 class="m-b-0 text-white">Product</h6>
				</div>

				<div class="card-body">
					<button type="button" class="btn btn-info open" data-toggle="collapse" data-target="#add">Add New</button>
					<div id="add" class="collapse">
						<div class="row justify-content-center">
							<div class="col col-md-8">
								<form id="addForm" method="post">
									<div class="row">
										<div class="col-md-6">
											<div class="form-group">
												<label class="control-label">Product Name</label>
												<input type="text" name="product_name" class="form-control" autocomplete="off" placeholder="Type product name">
											</div>
										</div>
										<div class="col-md-6">
											<div class="form-group">
												<label class="control-label">Product Size</label>
												<input type="text" name="product_size" class="form-control" autocomplete="off" placeholder="Type Product Size">
											</div>
										</div>
									</div>
									<div class="row">
										<div class="col-md-6">
											<div class="form-group">
												<label class="control-label">Product Model</label>
												<input type="text" name="product_model" class="form-control" autocomplete="off" placeholder="Type product model">
											</div>
										</div>
										<div class="col-md-6">
											<div class="form-group">
												<label class="control-label">Brand</label>
												<select class="form-control" name="brand_id" id="brand">

												</select>
											</div>
										</div>
									</div>
									<div class="row">
										<div class="col-md-6">
											<div class="form-group">
												<label class="control-label">Category</label>
												<select class="form-control category" name="category_id">

												</select>
											</div>
										</div>
										<div class="col-md-6">
											<div class="form-group">
												<label class="control-label">Sub-Category</label>
												<select class="form-control sub_category" name="sub_category_id">
													<option value="">-select a sub-category-</option>
												</select>
											</div>
										</div>
									</div>

									<div class="form-group">
										<label class="control-label">Description</label>
										<textarea class="form-control" name="description" id="ckfield" autocomplete="off" placeholder="Type product Description"></textarea>
									</div>

									<div class="form-group">
										<label class="control-label">Tag</label>
										<input type="text" name="tag" class="form-control tag" data-role="tagsinput" autocomplete="off" placeholder="Please type a tag and type comma">
									</div>
									<span id="tag_error" style="color: red;margin-top: 10px;margin-bottom: 15px;"></span>
									<div class="form-group">
										<label class="control-label">Meta Description</label>
										<textarea name="meta_description" class="form-control" rows="3" autocomplete="off" placeholder="SEO Description max 160 characters"></textarea>
									</div>
									<?php
									$csrf = array(
										'name' => $this->security->get_csrf_token_name(),
										'hash' => $this->security->get_csrf_hash()
									);
									?>
									<input type="hidden" name="<?= $csrf['name']; ?>" id="token_key" value="<?= $csrf['hash']; ?>" class="form-control login_style" readonly>


									<div class="submit-btn-group text-xs-right">
										<button type="submit" class="btn btn-info submit_button">Submit</button>
										<button type="reset" class="btn btn-inverse reset_button">Cancel</button>
									</div>
								</form>
							</div>
						</div>
					</div>

					<div class="table-responsive">
						<br>
						<table id="productTable" class="table table-bordered table-striped">
							<thead>
								<tr>
									<th>#</th>
									<th width="20%">Product</th>
									<th width="10%">Model</th>
									<th width="10%">Category</th>
									<th width="10%">Sub-Category</th>
									<th width="10%">Size</th>
									<th width="10%">Avaiability</th>
									<th width="5%">Status</th>
									<th width="10%">Publish</th>
									<th width="15%">Action</th>
								</tr>
							</thead>
							<tbody>

							</tbody>
						</table>
					</div>


					<div class="modal fade" id="full_width_modal_parent" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel1" data-backdrop="static" data-keyboard="false">
						<div class="modal-dialog modal-lg full_width_modal" role="document">
							<div class="modal-content full_width_modal_content">
								<div class="modal-header">
									<h4 class="modal-title" id="exampleModalLabel1">View Product</h4>
									<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
								</div>
								<div class="modal-body">
									<div class="row">
										<div class="col-md-6">
											<!-- <form id="updateLogo"> -->
											<div class="form-group">
												<label>Picture</label>
												<input type="file" class="form-control" id="upload" accept="image/*">
											</div>
											<div id="upload-demo" style="width:100%;margin: 0 auto;background: #e6efec;padding-top: 10px;">
											</div>
											<div class="form-group">
												<button type="button" class="btn btn-info upload-result">Add Picture</button>
											</div>
											<!-- </form> -->
										</div>
										<div class="col-md-6">
											<div id="modal_image"></div>
											<form id="updateForm" method="post">
												<div class="row">
													<div class="col-md-6">
														<div class="form-group">
															<label class="control-label">Product Name</label>
															<input type="text" name="product_name" id="product_name" class="form-control" autocomplete="off" placeholder="Type product name">
														</div>
													</div>
													<div class="col-md-6">
														<div class="form-group">
															<label class="control-label">Product Size</label>
															<input type="text" name="product_size" id="product_size" class="form-control" autocomplete="off" placeholder="Type Product Size">
														</div>
													</div>
												</div>
												<div class="row">
													<div class="col-md-6">
														<div class="form-group">
															<label class="control-label">Product Model</label>
															<input type="text" name="product_model" id="product_model" class="form-control" autocomplete="off" placeholder="Type product model">
														</div>
													</div>
													<div class="col-md-6">
														<div class="form-group">
															<label class="control-label">Brand</label>
															<select class="form-control" name="brand_id" id="modal_brand">

															</select>
														</div>
													</div>
												</div>
												<div class="row">
													<div class="col-md-6">
														<div class="form-group">
															<label class="control-label">Category</label>
															<select class="form-control modal_category" name="category_id">

															</select>
														</div>
													</div>
													<div class="col-md-6">
														<div class="form-group">
															<label class="control-label">Sub-Category</label>
															<select class="form-control modal_sub_category" name="sub_category_id">
																<option value="">-select a sub-category-</option>
															</select>
														</div>
													</div>
												</div>

												<div class="form-group">
													<label class="control-label">Description</label>
													<textarea class="form-control" name="description" id="modal-ckfield" autocomplete="off" placeholder="Type product Description"></textarea>
												</div>
												<div class="form-group">
													<label class="control-label">Tag</label>
													<input type="text" name="tag" id="n_tag" class="form-control tag" data-role="tagsinput" autocomplete="off" placeholder="Please type a tag and type comma">
												</div>
												<span id="tag_error" style="color: red;margin-top: 10px;margin-bottom: 15px;"></span>
												<div class="form-group">
													<label class="control-label">Meta Description</label>
													<textarea name="meta_description" class="form-control" id="modal_meta_desc" rows="3" autocomplete="off" placeholder="SEO Description max 160 characters"></textarea>
												</div>
												<div class="form-group">
													<label class="control-label">Status</label>
													<select class="form-control" name="status" id="modal_status">
														<option value="">-select a status-</option>
														<option value="Active">Active</option>
														<option value="De-Active">De-Active</option>
													</select>
												</div>
												<?php
												$csrf = array(
													'name' => $this->security->get_csrf_token_name(),
													'hash' => $this->security->get_csrf_hash()
												);
												?>
												<input type="hidden" name="<?= $csrf['name']; ?>" value="<?= $csrf['hash']; ?>" class="form-control login_style" readonly>
												<input type="hidden" name="product_id" id="modal_product_id" readonly>

												<div class="form-group">
													<button type="submit" class="btn btn-info update_button_2">Update</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
												</div>
											</form>
										</div>
									</div>
									<input type="hidden" id="modal_product_id_picture" name="product_id" readonly>

								</div>
								<div class="modal-footer">
									<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
								</div>
							</div>

						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- ============================================================== -->
	</div>

</div>
