Dotclear

Changeset 539:5d12c71d0399


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

Correction bug sur suppression

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/simpleMenu/index.php

    r538 r539  
    230230     } 
    231231} else { 
     232      
     233     # Remove selected menu items 
    232234     if (!empty($_POST['removeaction'])) 
    233235     { 
     
    235237               if (!empty($_POST['items_selected'])) { 
    236238                    foreach ($_POST['items_selected'] as $k => $v) { 
    237                          $menu[$k]['label'] = ''; 
     239                         $menu[$v]['label'] = ''; 
    238240                    } 
    239241                    $newmenu = array(); 
     
    260262          } 
    261263     } 
     264 
     265     # Update menu items 
    262266     if (!empty($_POST['updateaction'])) 
    263267     { 
     
    408412               echo '<form id="additem" action="'.$p_url.'&add=4" method="post">'; 
    409413               echo '<fieldset><legend>'.$item_type_label.($item_select_label != '' ? ' ('.$item_select_label.')' : '').'</legend>'; 
    410                echo '<p class="field"><label for"item_label" class="classic">'.__('Label of item menu:').'</label>'.form::field('item_label',10,255,$item_label).'</p>'; 
    411                echo '<p class="field"><label for"item_descr" class="classic">'.__('Description of item menu:').'</label>'.form::field('item_descr',20,255,$item_descr).'</p>'; 
    412                echo '<p class="field"><label for"item_url" class="classic">'.__('URL of item menu:').'</label>'.form::field('item_url',40,255,$item_url).'</p>'; 
     414               echo '<p class="field"><label for"item_label" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '. 
     415                    __('Label of item menu:').'</label>'.form::field('item_label',20,255,$item_label).'</p>'; 
     416               echo '<p class="field"><label for"item_descr" class="classic">'. 
     417                    __('Description of item menu:').'</label>'.form::field('item_descr',30,255,$item_descr).'</p>'; 
     418               echo '<p class="field"><label for"item_url" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '. 
     419                    __('URL of item menu:').'</label>'.form::field('item_url',40,255,$item_url).'</p>'; 
    413420               echo form::hidden('item_type',$item_type).form::hidden('item_select',$item_select); 
    414421               echo '<p>'.$core->formNonce().'<input type="submit" name="appendaction" value="'.__('Add item').'" /></p>'; 
     
    452459          if (!$step) { 
    453460               $count++; 
    454                echo '<td>'.form::checkbox(array('items_selected[]','ims-'.$i),false,'','','',($step)).'</td>'; 
     461               echo '<td>'.form::checkbox(array('items_selected[]','ims-'.$i),$i).'</td>'; 
    455462               if (count($menu) > 1) { 
    456463                    echo '<td>'.form::field(array('order['.$i.']'),2,3,$count,'position','',false,'title="'.sprintf(__('position of %s'),__($m['label'])).'"'). 
    457464                         form::hidden(array('dynorder[]','dynorder-'.$i),$i).'</td>'; 
    458465               } 
    459                echo '<td class="nowrap" scope="row">'.form::field(array('items_label[]','iml-'.$i),10,255,__($m['label']),'','',($step)).'</td>'; 
    460                echo '<td class="nowrap">'.form::field(array('items_descr[]','imd-'.$i),20,255,__($m['descr']),'','',($step)).'</td>'; 
    461                echo '<td class="nowrap">'.form::field(array('items_url[]','imu-'.$i),40,255,$m['url'],'','',($step)).'</td>'; 
     466               echo '<td class="nowrap" scope="row">'.form::field(array('items_label[]','iml-'.$i),20,255,__($m['label'])).'</td>'; 
     467               echo '<td class="nowrap">'.form::field(array('items_descr[]','imd-'.$i),30,255,__($m['descr'])).'</td>'; 
     468               echo '<td class="nowrap">'.form::field(array('items_url[]','imu-'.$i),40,255,$m['url']).'</td>'; 
    462469          } else { 
    463470               echo '<td class="nowrap" scope="row">'.__($m['label']).'</td>'; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map