Dotclear

Changeset 546:da644dda2095


Ignore:
Timestamp:
07/09/11 22:43:32 (14 years ago)
Author:
Franck <carnet.franck.paul@…>
Branch:
themes
Message:

Simplification de la gestion des modifications des items de menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/simpleMenu/index.php

    r545 r546  
    307307     } 
    308308 
    309      if (!empty($_POST['saveorder']) && !empty($order)) 
     309     if (!empty($_POST['updateaction']) && !empty($order)) 
    310310     { 
    311311          try { 
     
    490490          '<tr>'; 
    491491     if (!$step) { 
    492           if (count($menu) > 1) { 
    493                echo '<th scope="col"></th>'; 
    494           } 
     492          echo '<th scope="col"></th>'; 
    495493          echo '<th scope="col"></th>'; 
    496494     } 
     
    507505          if (!$step) { 
    508506               $count++; 
    509                if (count($menu) > 1) { 
    510                     echo '<td class="handle minimal">'.form::field(array('order['.$i.']'),2,3,$count,'position','',false,'title="'.sprintf(__('position of %s'),__($m['label'])).'"'). 
    511                          form::hidden(array('dynorder[]','dynorder-'.$i),$i).'</td>'; 
    512                } 
     507               echo '<td class="handle minimal">'.form::field(array('order['.$i.']'),2,3,$count,'position','',false,'title="'.sprintf(__('position of %s'),__($m['label'])).'"'). 
     508                    form::hidden(array('dynorder[]','dynorder-'.$i),$i).'</td>'; 
    513509               echo '<td class="minimal">'.form::checkbox(array('items_selected[]','ims-'.$i),$i).'</td>'; 
    514510               echo '<td class="nowrap" scope="row">'.form::field(array('items_label[]','iml-'.$i),20,255,__($m['label'])).'</td>'; 
     
    527523          echo '<div class="two-cols">'; 
    528524          echo '<p class="col">'.form::hidden('im_order','').$core->formNonce(); 
    529           if (count($menu) > 1) { 
    530                echo '<input type="submit" name="saveorder" value="'.__('Save order').'" /> '; 
    531           } 
    532           echo '<input type="submit" name="updateaction" value="'.__('Update menu items').'" />'.'</p>'; 
     525          echo '<input type="submit" name="updateaction" value="'.__('Update menu').'" />'.'</p>'; 
    533526          echo '<p class="col right">'.'<input type="submit" class="delete" name="removeaction" '. 
    534527                    'value="'.__('Delete selected menu items').'" '. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map