public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
Search Repo:
Setup to allow using a default name and id if none is specified, allow 
explicityly setting class.


git-svn-id: http://svn.cmsmadesimple.org/svn/cmsmadesimple/trunk@4451 
3d254a34-79dc-0310-9e5f-be208747d8a0
calguy1000 (author)
Sat Apr 26 08:47:33 -0700 2008
commit  59759ed1d0a83fcdc9300b67c3c8a0784dbc5a1c
tree    693b7a83d76adfcaa7d8ba528aacc3119550fe15
parent  e4abfb70c68d521e0e78eba05384f0a04823a871
...
18
19
20
 
21
22
23
24
 
 
25
26
27
 
28
29
30
...
18
19
20
21
22
23
24
 
25
26
27
28
 
29
30
31
32
0
@@ -18,13 +18,15 @@
0
 
0
 function smarty_cms_block_mod_formrow($params,$content,&$smarty,&$repeat)
0
 {
0
+ static $counter=1;
0
   $module =& $smarty->get_template_vars('cms_mapi_module');
0
   $id = $smarty->get_template_vars('cms_mapi_id');
0
   $return_id = $smarty->get_template_vars('cms_mapi_return_id');
0
- $htmlid = $id.'formrow_'.$params['name'];
0
+ $name = coalesce_key($params,'name',$counter++);
0
+ $htmlid = $id.'formrow_'.$name;
0
 
0
   $class=coalesce_key($params,'class','row');
0
- $output = "<div class='$class' id='$htmlid'>";
0
+ $output = "<div name='$name' class='$class' id='$htmlid'>";
0
   $output .= $content;
0
   $output .= '</div>';
0
   return $output;

Comments

    No one has commented yet.