Dotclear


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/widgets/class.widgets.php

    r0 r117  
    220220     } 
    221221      
    222      public function formSettings($pr='') 
     222     public function formSettings($pr='',&$i=0) 
    223223     { 
    224224          $res = ''; 
    225225          foreach ($this->settings as $id => $s) 
    226226          { 
     227               $wfid = "wf-".$i; 
    227228               $iname = $pr ? $pr.'['.$id.']' : $id; 
    228229               switch ($s['type']) 
     
    230231                    case 'text': 
    231232                         $res .= 
    232                          '<p><label>'.$s['title'].' '. 
    233                          form::field(array($iname),20,255,html::escapeHTML($s['value']),'maximal'). 
     233                         '<p><label for="'.$wfid.'">'.$s['title'].' '. 
     234                         form::field(array($iname,$wfid),20,255,html::escapeHTML($s['value']),'maximal'). 
    234235                         '</label></p>'; 
    235236                         break; 
    236237                    case 'textarea': 
    237238                         $res .= 
    238                          '<p><label>'.$s['title'].' '. 
    239                          form::textarea(array($iname),30,5,html::escapeHTML($s['value']),'maximal'). 
     239                         '<p><label for="'.$wfid.'">'.$s['title'].' '. 
     240                         form::textarea(array($iname,$wfid),30,5,html::escapeHTML($s['value']),'maximal'). 
    240241                         '</label></p>'; 
    241242                         break; 
     
    243244                         $res .= 
    244245                         '<p>'.form::hidden(array($iname),'0'). 
    245                          '<label class="classic">'. 
    246                          form::checkbox(array($iname),'1',$s['value']).' '.$s['title']. 
     246                         '<label class="classic" for="'.$wfid.'">'. 
     247                         form::checkbox(array($iname,$wfid),'1',$s['value']).' '.$s['title']. 
    247248                         '</label></p>'; 
    248249                         break; 
    249250                    case 'combo': 
    250251                         $res .= 
    251                          '<p><label>'.$s['title'].' '. 
    252                          form::combo(array($iname),$s['options'],$s['value']). 
    253                          '</label></p>'; 
    254                          break; 
    255                } 
     252                         '<p><label for="'.$wfid.'">'.$s['title'].' '. 
     253                         form::combo(array($iname,$wfid),$s['options'],$s['value']). 
     254                         '</label></p>'; 
     255                         break; 
     256               } 
     257               $i++; 
    256258          } 
    257259           
Note: See TracChangeset for help on using the changeset viewer.

Sites map