template default en HTML5
[mtweb] / mw / app / out / default / views / admin / config.php
index e71d355..7018400 100644 (file)
@@ -1,86 +1,83 @@
 <h2>Configuration</h2>
 
-<h3>Générale</h3>
-
 <form name="config_form" action="<?php echo $this->url("admin/config"); ?>" method="post">
-  <ul class="form">
-    <li>
-      <label for="site_name">nom du site</label>
-      <div><p>
-        <input type="text" name="site_name" id="site_name" value="<?php echo $this->out["config"]["site_name"]; ?>" />
-      </p></div>
-    </li>
-    <li>
-      <label for="description">description</label>
-      <div><p>
-        <textarea cols="50" rows="10" name="description" id="description"><?php echo $this->out["config"]["description"]; ?></textarea>
-      </p></div>
-    </li>
-    <li>
-      <label for="contact_form">formulaire de contact</label>
-      <div><p>
-        <input type="checkbox" name="contact_form" id="contact_form"<?php echo $this->out["config"]["contact_form"] ? " checked=\"checked\"" : ""; ?> />
-      </p></div>
-    </li>
-    <li id="email_li"<?php echo $this->out["config"]["contact_form"] ? "" : " style=\"display:none;\""; ?>>
-      <label for="email">email</label>
-      <div>
-      <div><p>
-        <input type="text" name="email" id="email" value="<?php echo $this->out["config"]["email"]; ?>" /><br />
-        <br /><input type="checkbox" name="captcha" id="captcha"<?php echo $this->out["config"]["captcha"] ? " checked=\"checked\"" : ""; ?> /> anti-spam
-      </p></div>
-      </div>
-    </li>
-    <li>
-      <label for="max_list">taille maximum des listes</label>
-      <div><p>
-        <span>nombre d'&eacute;l&eacute;ments &agrave; afficher dans une liste avant de paginer :</span>
-        <input type="text" name="max_list" id="max_list" value="<?php echo $this->out["config"]["max_list"]; ?>" />
-      </p></div>
-    </li>
-  </ul>
-
-<h3>Affichage du site</h3>
-
-  <ul class="form">
-
-    <li>
-      <label for="out">template</label>
-<?php
-
-  $template = $this->config("out");
-  $FOUND = false;
-  foreach($this->out["out_pathes"] as $out_path) { if($template == $out_path) { $FOUND = true; break; } }
-  if(!$FOUND) $template = $this->config("default_out");
 
-?>
-      <div><p>
-<?php if($this->out["out_pathes"]) : ?>
-        <select name="out" id="out">
-<?php foreach($this->out["out_pathes"] as $out_path) : ?>
-          <option value="<?php echo $out_path; ?>"<?php echo $template == $out_path ? " selected=\"selected\"" : ""; ?>><?php echo $out_path; ?></option>
-<?php endforeach; ?>
-        </select>
-<?php else : ?>
-        <strong class="warn">Aucun dossier d'affichage ! ... ?</strong>
-<?php endif; ?>
+  <fieldset>
+    <legend>Configuration générale</legend>
+    <ul>
+      <li>
+        <label for="site_name">nom du site</label>
+        <div class="form_input">
+          <input type="text" name="site_name" id="site_name" value="<?php echo $this->out["config"]["site_name"]; ?>" />
+        </div>
+      </li>
+      <li>
+        <label for="description">description</label>
+        <div class="form_input">
+          <textarea cols="50" rows="5" name="description" id="description"><?php echo $this->out["config"]["description"]; ?></textarea>
+        </div>
+      </li>
+      <li>
+        <label for="contact_form">formulaire de contact</label>
+        <div class="form_input">
+          <input type="checkbox" name="contact_form" id="contact_form"<?php echo $this->out["config"]["contact_form"] ? " checked=\"checked\"" : ""; ?> />
+        </div>
+      </li>
+      <li id="email_li"<?php echo $this->out["config"]["contact_form"] ? "" : " style=\"display:none;\""; ?>>
+        <label for="email">email</label>
+        <div class="form_input">
+          <input type="text" name="email" id="email" value="<?php echo $this->out["config"]["email"]; ?>" /><br />
+          <input type="checkbox" name="captcha" id="captcha"<?php echo $this->out["config"]["captcha"] ? " checked=\"checked\"" : ""; ?> /> anti-spam
+        </div>
+      </li>
+      <li>
+        <label for="max_list">taille maximum des listes</label>
+        <div class="form_input">
+          <span class="info">nombre d'&eacute;l&eacute;ments &agrave; afficher dans une liste avant de paginer :</span>
+          <input type="text" name="max_list" id="max_list" value="<?php echo $this->out["config"]["max_list"]; ?>" />
+        </div>
+      </li>
+    </ul>
+  </fieldset>
 
-      </p></div>
-    </li>
+  <?php if($this->out["out_pathes"]) : ?>
+  <fieldset>
+    <legend>Affichage du site</legend>
+    <ul>
+      <li>
+        <label for="out">template</label>
+        <?php
+  
+          $template = $this->config("out");
+          $FOUND = false;
+          foreach($this->out["out_pathes"] as $out_path) { if($template == $out_path) { $FOUND = true; break; } }
+          if(!$FOUND) $template = $this->config("default_out");
+        
+        ?>
+        <div class="form_input">
+          <select name="out" id="out">
+            <?php foreach($this->out["out_pathes"] as $out_path) : ?>
+            <option value="<?php echo $out_path; ?>"<?php echo $template == $out_path ? " selected=\"selected\"" : ""; ?>><?php echo $out_path; ?></option>
+            <?php endforeach; ?>
+          </select>
+        </div>
+      </li>
+      <?php foreach($this->out["out_config"] as $key => $config) : if($config["type"] == "checkbox") : ?>
+      <li>
+        <label for="<?php echo "out_".$key; ?>">&nbsp;</label>
+        <div class="form_input">
+          <input type="checkbox" name="<?php echo "out_".$key; ?>" id="<?php echo "out_".$key; ?>"<?php echo (isset($this->out["config"]["out_".$key]) ? $this->out["config"]["out_".$key] : $config["default"]) ? " checked=\"checked\"" : ""; ?> />
+          <?php echo $config["text"]; ?>
+        </div>
+      </li>
+      <?php endif; endforeach; ?>
+      <li>
+        <div class="form_buttons">
+          <input type="submit" value="Enregistrer" />
+        </div>
+      </li>
+    </ul>
+  </fieldset>
+  <?php endif; ?>
 
-<?php foreach($this->out["out_config"] as $key => $config) : ?>
-<?php if($config["type"] == "checkbox") : ?>
-    <li>
-      <label for="<?php echo "out_".$key; ?>">&nbsp;</label>
-      <div><p>
-        <input type="checkbox" name="<?php echo "out_".$key; ?>" id="<?php echo "out_".$key; ?>"<?php echo (isset($this->out["config"]["out_".$key]) ? $this->out["config"]["out_".$key] : $config["default"]) ? " checked=\"checked\"" : ""; ?> />
-        <?php echo $config["text"]; ?>
-      </p></div>
-    </li>
-<?php endif; ?>
-<?php endforeach; ?>
-    <li class="buttons">
-      <input type="submit" value="Enregistrer" />
-    </li>
-  </ul>
 </form>