[1] | 1 | <h2>Modifier le bloc</h2> |
---|
| 2 | <div class="bloc_content"> |
---|
| 3 | |
---|
| 4 | <form name="box_form" action="<?= $env->url(array("e" => "set_boxes", "action" => "set_box", "id" => $env->out["box"]["id"])) ?>" method="post"> |
---|
| 5 | <table class="admin"> |
---|
| 6 | <tr> |
---|
| 7 | <th>intitulé</th> |
---|
| 8 | <td><input type="text" name="titre" style="width: 500px" value="<?= $_POST ? $_POST["titre"] : $env->out["box"]["titre"] ?>"></td> |
---|
| 9 | </tr> |
---|
| 10 | <tr> |
---|
| 11 | <th>public</th> |
---|
| 12 | <td> |
---|
| 13 | <input type="checkbox" name="public" <?= |
---|
| 14 | $_POST ? ($_POST["public"] ? "checked" : "") : ($env->out["box"]["public"] ? "checked" : "") ?>> |
---|
| 15 | <div class="info">cochez cette case pour rendre le bloc public</div> |
---|
| 16 | </td> |
---|
| 17 | </tr> |
---|
| 18 | <tr> |
---|
| 19 | <th>nom</th> |
---|
| 20 | <td> |
---|
| 21 | <div class="info"> |
---|
| 22 | Vous pouvez préciser un nom pour le bloc.<br /> |
---|
| 23 | Ce nom pourra servir de référence dans un template. |
---|
| 24 | </div> |
---|
| 25 | <input type="text" name="nom" style="width: 500px" value="<?= $_POST ? $_POST["nom"] : $env->out["box"]["nom"] ?>"> |
---|
| 26 | </td> |
---|
| 27 | </tr> |
---|
| 28 | <?php if($env->out["emplacements"]) : ?> |
---|
| 29 | <tr> |
---|
| 30 | <th>emplacement</th> |
---|
| 31 | <td> |
---|
| 32 | <select name="emplacement"> |
---|
| 33 | <option value="">Aucun</option> |
---|
| 34 | <?php foreach($env->out["emplacements"] as $id_emplacement => $emplacement) : ?> |
---|
| 35 | <option value="<?= $id_emplacement ?>"<?= |
---|
| 36 | $_POST ? |
---|
| 37 | ($_POST["emplacement"] == $id_emplacement ? " selected" : "") |
---|
| 38 | : ($env->out["box"]["emplacement"] == $id_emplacement ? " selected" : "") ?>> |
---|
| 39 | <?= $emplacement["intitule"] ?> |
---|
| 40 | </option> |
---|
| 41 | <?php endforeach; ?> |
---|
| 42 | </select> |
---|
| 43 | </td> |
---|
| 44 | </tr> |
---|
| 45 | <?php endif; ?> |
---|
| 46 | <tr> |
---|
| 47 | <th>fichier</th> |
---|
| 48 | <td> |
---|
| 49 | <select name="fichier"> |
---|
| 50 | <option value="">Aucun</option> |
---|
| 51 | <?php foreach($env->out["box_files"] as $box_file) : ?> |
---|
| 52 | <option value="<?= $box_file ?>" |
---|
| 53 | <?= $box_file == ($_POST ? $_POST["fichier"] : $env->out["box"]["fichier"]) ? " selected" : "" |
---|
| 54 | ?>><?= $box_file ?></option> |
---|
| 55 | <?php endforeach; ?> |
---|
| 56 | </select> |
---|
| 57 | <div class="info"> |
---|
| 58 | Vous pouvez préciser un fichier pour le contenu du bloc.<br /> |
---|
| 59 | Vous pouvez ajouter des fichiers de bloc par FTP dans le dossier <strong>boxes</strong> |
---|
| 60 | du template.<br /> |
---|
| 61 | <strong>note</strong> : si vous précisez un fichier, le contenu ci-dessous ne sera pas affiché. |
---|
| 62 | </div> |
---|
| 63 | </td> |
---|
| 64 | </tr> |
---|
| 65 | <tr> |
---|
| 66 | <th>contenu</th> |
---|
| 67 | <td> |
---|
| 68 | <textarea name="contenu" id="contenu" style="width: 500px; height: 300px;"><?= $_POST ? $_POST["contenu"] : $env->out["box"]["contenu"] ?></textarea> |
---|
| 69 | <script type="text/javascript" src="<?= $env->path("tinymce") ?>jscripts/tiny_mce/tiny_mce.js"></script> |
---|
| 70 | <script type="text/javascript"> |
---|
| 71 | tinyMCE.init |
---|
| 72 | ( { mode: "exact", |
---|
| 73 | elements : "contenu", |
---|
| 74 | theme : "advanced", |
---|
| 75 | plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", |
---|
| 76 | theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontsizeselect", |
---|
| 77 | theme_advanced_buttons2 : "bullist,numlist,|blockquote,|,link,unlink,anchor,image,cleanup,help,|,hr,charmap,|,forecolor,backcolor", |
---|
| 78 | theme_advanced_buttons3 : null, |
---|
| 79 | theme_advanced_toolbar_location : "top", |
---|
| 80 | theme_advanced_toolbar_align : "left", |
---|
| 81 | theme_advanced_statusbar_location : "bottom", |
---|
| 82 | theme_advanced_resizing : true, |
---|
| 83 | content_css : "<?= $env->out_file("css/tiny_mce.css") ?>" |
---|
| 84 | } |
---|
| 85 | ); |
---|
| 86 | </script> |
---|
| 87 | </td> |
---|
| 88 | </tr> |
---|
| 89 | <tr> |
---|
| 90 | <td align="center" colspan="2"><input type="submit" value="Enregistrer" /></td> |
---|
| 91 | </tr> |
---|
| 92 | </table> |
---|
| 93 | </form> |
---|
| 94 | |
---|
| 95 | </div> |
---|