public function action(Request $request)
 {
     switch ($request->get("action")) {
         case "changeTva":
             PaysAdmin::getInstance($request->query->get("id"))->changeTva();
             break;
         case "changeDefault":
             PaysAdmin::getInstance($request->query->get("id"))->changeDefault();
             break;
         case "changeBoutique":
             PaysAdmin::getInstance($request->query->get("id"))->changeBoutique();
             break;
         case "deleteCountry":
             PaysAdmin::getInstance($request->query->get("id"))->delete();
             break;
         case "editCountry":
             PaysAdmin::getInstance($request->request->get("id"))->modify($request->request->get("isocode"), $request->request->get("isoalpha2"), $request->request->get("isoalpha3"), $request->request->get("tva"), $request->request->get("zone"), $this->getDesc($request));
             break;
         case "addCountry":
             PaysAdmin::getInstance()->add($request->request->get("titre"), $request->request->get("isocode"), $request->request->get("isoalpha2"), $request->request->get("isoalpha3"), $request->request->get("tva"), $request->request->get("zone"));
             break;
     }
 }
Example #2
0
echo trad('Boutique', 'admin');
?>
</th>
                    <th><?php 
echo trad('N° ISO', 'admin');
?>
</th>
                    <th><?php 
echo trad('Codes ISO', 'admin');
?>
</th>
                    <th>&nbsp;</th>
                </thead>
                <tbody>
                    <?php 
foreach (PaysAdmin::getInstance()->getList() as $pays) {
    ?>
                    <tr>
                        <td><?php 
    echo $pays->id;
    ?>
</td>
                        <td><?php 
    echo $pays->titre;
    ?>
</td>
                        <td><input type="checkbox" name="tva" value="<?php 
    echo $pays->id;
    ?>
" <?php 
    if ($pays->tva) {