Current File : /home/karenpetzb/application/modules/backoffice/views/scripts/annoncecms/edit.phtml |
<div class="table-box">
<form action="<?php echo $this->baseUrl; ?>/backoffice/annoncecms/edit" method="post" name="editAnnonceForm" >
<table class="table">
<thead>
<tr>
<th colspan="2" class="col-md-4" ><?php echo $this->titlePage; ?></th>
</tr>
</thead>
<tbody>
<?php echo $this->render("alert_tr.phtml"); ?>
<tr >
<td class="col-md-4"><i class="glyphicon glyphicon-asterisk"></i> Statut</td>
<td class="col-md-8">
<input type="radio" value="0" name="isshow" id="isshow1" class="bluecheckradios" <?php if ($this->populateFormAnnonceCms['isSHOW'] == 0) { echo 'checked="checked"';} ?>><label for="isshow1"> Actif</label>
<input type="radio" value="1" name="isshow" id="isshow2" class="bluecheckradios" <?php if ($this->populateFormAnnonceCms['isSHOW'] == 1) { echo 'checked="checked"';} ?>><label for="isshow2"> Inactif</label>
</td>
</tr>
<tr >
<td class="col-md-4"><i class="glyphicon glyphicon-asterisk"></i> Position</td>
<td class="col-md-8"><input type="text" name="position" size="40" class="form-control" placeholder="Position de l'article" id="position" value="<?php echo $this->populateFormAnnonceCms['POSITION']; ?>" /></td>
</tr>
<tr >
<td class="col-md-4"><i class="glyphicon glyphicon-asterisk"></i> Titre</td>
<td class="col-md-8"><input type="text" name="nom" size="40" class="form-control" placeholder="Titre non visible" id="nom" value="<?php echo $this->populateFormAnnonceCms['NOM']; ?>" /></td>
</tr>
<tr >
<td class="col-md-4">Cat�gorie</td>
<td class="col-md-8">
<?php $tabController = explode(':',$this->populateFormAnnonceCms['ID_CATS']); ?>
<select class="form-control" size="15" name="categories[]" id="categories" multiple="multiple">
<?php
$show = array();
foreach($this->listallcategories as $row) {
for ($level=0 ; $level<11; $level++) {
if ((!isset($show['NOM'.$level]) || $show['NOM'.$level] != $row['NOM'.$level]) && $row['NOM'.$level] != null) {
?>
<option value="<?php echo $this->escape($row['ID'.$level]); ?>" <?php if (in_array($row['ID'.$level], $tabController)) {echo 'selected="selected"';} ?>>
<?php
for ($i=0 ; $i<$level; $i++) {
echo ' ';
}
echo $row['NOM'.$level]; ?>
</option>
<?php
$show['NOM'.$level] = $row['NOM'.$level];
}
}
} ?>
</select>
</td>
</tr>
<tr >
<td class="col-md-12" colspan="2"> Contenu</td>
</tr>
<tr >
<td class="col-md-12" colspan="2">
<div class="col-md-6 no-space-top" >
<input type="text" name="content_short" size="40" class="form-control" placeholder="Titre de l'article" id="content_short" value="<?php echo $this->populateFormAnnonceCms['CONTENT_SHORT']; ?>" />
</div>
<div class="col-md-6 no-space-top" >
<input type="text" name="content_long" size="40" class="form-control" placeholder="Sous-titre de l'article" id="content_long" value="<?php echo $this->populateFormAnnonceCms['CONTENT_LONG']; ?>" />
</div>
</td>
</tr>
<tr >
<td class="col-md-6 text-center" colspan="2">
<button id="pickImageFromGallery" class="btn btn-info">S�lectionner une image depuis la gallerie</button>
<div id="pickImageFromGalleryContent" style="display:none"></div>
</td>
</tr>
<tr >
<td class="col-md-12" colspan="2">
<textarea name="content" cols="130" rows="20" id="annonceContent" name="annonceContent">
<?php if (isset($this->populateFormAnnonceCms['CONTENT']) && !empty($this->populateFormAnnonceCms['CONTENT'])) {
echo $this->populateFormAnnonceCms['CONTENT'];
} ?>
</textarea>
</td>
</tr>
<tr>
<td colspan="2" class="text-center">
<input type="hidden" name="id" value="<?php echo $this->populateFormAnnonceCms['ID'];?>">
<button class="btn btn-success" type="submit" name="edit"><i class="glyphicon glyphicon-edit"></i> Modifier</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
<div class="clearfix"></div>
<script type="text/javascript">
$(function(){
tinymce.init({
selector: 'textarea',
height: 500,
convert_urls: false,
theme: 'modern',
skin: "lightgraygradient",
language: 'fr_FR',
plugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code fullscreen',
'insertdatetime media nonbreaking save table contextmenu directionality',
'emoticons template paste textcolor colorpicker textpattern imagetools jbimages'
],
toolbar1: 'insertfile undo redo | styleselect fontselect | bold italic forecolor backcolor emoticons | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image jbimages template | print preview media',
image_advtab: true,
relative_urls: false,
templates: <?php echo $this->FeatureTinymceTemplate; ?>,
content_css: '<?php echo $this->FeatureTinymceCss; ?>',
font_formats: 'DEFAUT(Aref Ruqaa)=ArefRuqaaReg;'+'DEFAUT 2 (Poiret One)=PoiretOne;'+'Andale Mono=andale mono,times;'+ 'Arial=arial,helvetica,sans-serif;'+ 'Arial Black=arial black,avant garde;'+ 'Book Antiqua=book antiqua,palatino;'+ 'Comic Sans MS=comic sans ms,sans-serif;'+ 'Courier New=courier new,courier;'+ 'Georgia=georgia,palatino;'+ 'Helvetica=helvetica;'+ 'Impact=impact,chicago;'+ 'Symbol=symbol;'+ 'Tahoma=tahoma,arial,helvetica,sans-serif;'+ 'Terminal=terminal,monaco;'+ 'Times New Roman=times new roman,times;'+ 'Trebuchet MS=trebuchet ms,geneva;'+ 'Verdana=verdana,geneva;'+ 'Webdings=webdings;'+ 'Wingdings=wingdings,zapf dingbats'
});
$( "#pickImageFromGallery" ).click(function(){
$( "#pickImageFromGalleryContent" ).toggle();
if($('#pickImageFromGalleryContent').css('display') == 'block') {
$.ajax( {
type : "GET",
async : true,
url : '/backoffice/annoncegallery/ajaxshowallpicture',
contentType:"application/x-www-form-urlencoded; charset=iso-8859-1",
success : function(data) {
$('#pickImageFromGalleryContent').html(data);
}});
}
return false;
});
});
</script>