Current File : /home/karenpetzb/application/modules/backoffice/views/scripts/supplier/edit.phtml
<div class="table-box">	
	<div class="col-md-12 no-space-side">
		<div class="tabs-section ">
			<ul class="nav nav-tabs" id="myTab">
				<li class="active"><a href="#tabs-supplier" data-toggle="tab">Fournisseur</a></li>
				<li><a href="#tabs-brend" data-toggle="tab">Marques</a></li>
			</ul>
			<div class="tab-content">
				<div class="tab-pane active" id="tabs-supplier">
					<section class 	="boxpadding">
						<?php $formSupplier = $this->populateFormSupplier; ?>
						<form action="<?php echo $this->baseUrl; ?>/backoffice/supplier/edit#tabs-supplier" method="post" name="editSupplierForm" enctype="multipart/form-data" >
						<table class="table">
							<?php echo $this->render("alert_tr.phtml"); ?>							
							<tr >
								<td class="col-md-4">
									<i class="glyphicon glyphicon-asterisk"></i>&nbsp;<label for="company">Nom de l'entreprise</label>
								</td>
								<td class="col-md-8">
									<input type="text" class="form-control" name="company" id="company" value="<?php echo $formSupplier['COMPANY']; ?>"/>
								</td>
							</tr>
              <tr >
                <td class="col-md-4">
                  <label for="descshort">Description courte</label>
                </td>
                <td class="col-md-8">
                  <input type="text" class="form-control" name="descshort" id="descshort" value="<?php echo $formSupplier['DESCRIPTIONSHORT']; ?>"/>
                </td>
              </tr>
              <tr >
                <td class="col-md-4">
                  <label for="desclong">Description longue</label>
                </td>
                <td class="col-md-8">
                  <textarea class="form-control"  rows="10" cols="50" name="desclong" id="desclong"><?php echo $formSupplier['DESCRIPTIONLONG'];?></textarea>
                </td>
              </tr>
							<tr><td colspan="2"><h5>Responsable</h5></td></tr>
							<tr >
								<td >
									<i class="glyphicon glyphicon-asterisk"></i>&nbsp;<label for="nom">Nom</label>
								</td>
								<td>
									<input type="text" class="form-control" name="nom" id="nom" value="<?php echo $formSupplier['NOM']; ?>"/>
								</td>
							</tr>
							<tr >
								<td>
									<i class="glyphicon glyphicon-asterisk"></i>&nbsp;<label for="prenom">Pr�nom</label>
								</td>
								<td>
									<input type="text" class="form-control" name="prenom" id="prenom" value="<?php echo $formSupplier['PRENOM']; ?>"/>
								</td>
							</tr>
							<tr >
								<td>
									<i class="glyphicon glyphicon-asterisk"></i>&nbsp;<label for="email">Email</label>
								</td>
								<td>
									<input type="text" class="form-control" name="email" id="email" value="<?php echo $formSupplier['EMAIL']; ?>"/>
								</td>
							</tr>
							<tr >
								<td>
									<label for="tel">Telephone</label>
								</td>
								<td>
									<input type="text" class="form-control" name="tel" id="tel" value="<?php echo $formSupplier['TEL']; ?>"/>
								</td>
							</tr>
							<tr >
								<td>
									<label for="fax">Fax</label>
								</td>
								<td>
									<input type="text" class="form-control" name="fax" id="fax" value="<?php echo $formSupplier['FAX']; ?>"/>
								</td>
							</tr>
							<tr >
								<td>
									<label for="address">Adresse</label>
								</td>
								<td>
									<input type="text" class="form-control" name="address" id="address" value="<?php echo $formSupplier['ADDRESSE']; ?>"/>
								</td>
							</tr>
							<tr >
								<td>
									<label for="cp">Code Postal</label>
								</td>
								<td>
									<input type="text" class="form-control" name="cp" id="cp" value="<?php echo $formSupplier['CP']; ?>"/>
								</td>
							</tr>
							<tr >
								<td>
									<label for="ville">Ville</label>
								</td>
								<td>
									<input type="text" class="form-control" name="ville" id="ville" value="<?php echo $formSupplier['VILLE']; ?>"/>
								</td>
							</tr>
							<tr >
								<td width="200px">
									<label for="picture">Image du fournisseur</label>
									<div class="col-md-12 text-center no-space-top">
										<ul class="gallerybox ">
										  	<li>
												<figure>
													<img src="<?php echo '/'.$formSupplier['URL'];?>" />
												</figure>
											</li>
										</ul>
									</div>
								</td>
								<td>
									<input type="file" name="picture" id="picture" size="50"/>
									<br/>
									<i>Extensions : jpg, gif, png</i>
								</td>
							</tr>
							<tr>
								<td align="center" colspan="2">
									<input type="hidden" class="input4" name="id" id="id" value="<?php echo $formSupplier['ID']; ?>">
									<button class="btn btn-success" type="submit" name="edit"><i class="glyphicon glyphicon-edit"></i>&nbsp;Modifier</button>
								</td>
							</tr>
						</table>
					</form> 
					</section>
				</div>
				<div class="tab-pane" id="tabs-brend">
					<section class 	="boxpadding">
						<?php  $formBrends = $this->populateFormBrend; ?>
						<table class="table" >
							<?php echo $this->render("alert_tr.phtml"); ?>
							<tr >
								<td colspan="2">
									<form action="<?php echo $this->baseUrl; ?>/backoffice/supplier/addbrend#tabs-brend" method="post" name="addBrendForm" enctype="multipart/form-data" >
										<table  class="table" >
											<tr  >
												<td><h5>Ajouter une marque</h5></td>
												<td>
													<label for="brend">Nom : </label>
												</td>
												<td>
													<label><input placeholder="Marque du fournisseur" class="form-control" type="text" name="brend" id="brend" size="20"> </label>
												</td>
												<td>
													<input type="file" name="picture" id="picture" size="50"/><br>
													<i>Extensions : jpg, gif, png</i>
												</td>
												<td>
													<button class="btn btn-success" type="submit" name="edit"><i class="glyphicon glyphicon-plus"></i>&nbsp;Ajouter</button>
													<input type="hidden" name="id" id="id" value="<?php echo $formSupplier['ID']; ?>" >
												</td>
											</tr>
										</table>
									</form>
								</td>
							</tr>
							<tr >
								<td colspan="2">
									<?php 
									foreach($formBrends as $brend) { 
									?>
									<div class="col-md-3 no-space-top">
										<form action="<?php echo $this->baseUrl; ?>/backoffice/supplier/editbrend#tabs-brend" method="post" name="editBrendForm" >
										<div class="col-md-12 text-center  no-space-top">
											<ul class="gallerybox ">
											  	<li>
													<figure>
														<img src="<?php echo $this->baseUrl.'/'.$brend['URL'];?>" />
													</figure>
												</li>
											</ul>
										</div>
										<div class="col-md-12 no-space-top">
											<input class="form-control" type="text" name="brend" value="<?php echo $brend['BREND']; ?>"/>
										</div>
										<div class="col-md-12 no-space-top">
											 <select name="isshowbrendpage" class="form-control">
										            <option value="1" <?php if ($brend['IS_SHOW_BREND_PAGE'] == true) { echo 'selected="selected"';} ?>>Afficher sur la page des marques</option>
										            <option value="0" <?php if ($brend['IS_SHOW_BREND_PAGE'] == false) { echo 'selected="selected"';} ?>>Ne pas afficher sur la page des marques</option>
                                                </select>
										</div>
										<div class="col-md-6 text-right">
											<button class="btn btn-success " type="submit" name="edit"><i class="glyphicon glyphicon-edit"></i>&nbsp;Modifier</button>
											<input type="hidden" name="idBrend" value="<?php echo $brend['ID']; ?>" >
											<input type="hidden" name="id" value="<?php echo $formSupplier['ID']; ?>" >
										</div>
										</form>	
																				
										<form action="<?php echo $this->baseUrl; ?>/backoffice/supplier/delbrend#tabs-brend" method="post" >
										<div class="col-md-6 text-left">
											<button class="btn btn-danger" type="submit" name="edit"><span class="glyphicon glyphicon-resize-full"></span> D�lier</button>
											<input type="hidden" name="idBrend" value="<?php echo $brend['ID']; ?>" >
											<input type="hidden" name="id" value="<?php echo $formSupplier['ID']; ?>" >
										</div>
										</form>
									</div>
									<?php ; } ?>
								</td>
							</tr> 
							<tr><td colspan="2"><h5>Les images</h5></td></tr>
							<tr >
								<td ><label for="selectIdSetPicture">Modifier l'image</label></td>
								<td >
									<?php $files = glob("items/supplier/*.*"); ?>
									<div class="col-md-6 no-space-top" >
										<select class="form-control" name="selectIdSetPicture" id="selectIdSetPicture" onchange="setSupplierMarqueForPicture(<?php echo sizeof($files); ?>);">
											<option value="0">Modifier</option>
											<?php 
											foreach($formBrends as $brend) { 
											?><option value="<?php echo $brend['ID']; ?>"><?php echo 'Marque : '.$brend['BREND']; ?></option>
											<?php } ?>
										</select>
									</div>
								</td>
							</tr>
							<tr >
								<td  colspan="2">
									<?php for ($i=0; $i <sizeof($files); $i++) { ?>
									<div class="col-md-3 text-center no-space-top">
										<form action="<?php echo $this->baseUrl; ?>/backoffice/supplier/setpicture#tabs-brend" method="post" name="setPictureForm_<?php echo $i; ?>">
										<div class="col-md-12 text-center">
											<ul class="gallerybox ">
											  	<li>
													<figure>
														<img src="<?php echo $this->baseUrl.'/'.$files[$i]; ?>" />
													</figure>
												</li>
											</ul>
										</div>
										<div class="col-md-6 text-right">
											<button class="btn btn-primary" type="submit" name="edit"><i class="glyphicon glyphicon-resize-small"></i>&nbsp;Lier</button>
											<input type="hidden" name="picture" value="<?php echo $files[$i]; ?>" >
											<input type="hidden" name="id" value="<?php echo $formSupplier['ID']; ?>" >
											<input type="hidden" name="idSelected" id="idSelected" >
										</div>
										</form>	
																				
										<form action="<?php echo $this->baseUrl; ?>/backoffice/supplier/erasepicture#tabs-brend" method="post" id="delPictureImage<?php echo $i;?>">
										<div class="col-md-6 text-left">
											<button class="btn btn-danger btn-modal" type="button" data-toggle="ajaxModalSubmitDelete" data-form="delPictureImage<?php echo $i;?>"  ><i class="glyphicon glyphicon-trash"></i>&nbsp;Supprimer</button>
											<input type="hidden" name="picture" value="<?php echo $files[$i]; ?>" >
											<input type="hidden" name="id" value="<?php echo $formSupplier['ID']; ?>" >
										</div>
										</form>
									</div>
									<?php } ?>
								</td>
							</tr> 
						</table>
					</section>
				</div>
			</div>
		</div>
	</div>
</div>


<script type="text/javascript">  
$(function(){  
	initTabs(window.location.hash);
    initEditor('#desclong');
});
</script>