Changeset 304 for branches/Ver2.0/xpressme_integration_kit/blocks
- Timestamp:
- Jun 22, 2009, 1:27:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Ver2.0/xpressme_integration_kit/blocks/widget_block.php
r303 r304 46 46 $form .= "<br />"; 47 47 $form .= _MB_XP2_SELECT_WIDGET .":<br />\n"; 48 $form .= " <select name='options[]' multiple=\"multiple\">\n"; 48 $select = " <select name='options[]' multiple=\"multiple\">\n"; 49 $found = false; 49 50 foreach ( (array) $sidebars_widgets as $index => $sidebar ){ 50 51 if ( is_array($sidebar) ){ 51 52 $sidebar_id = $index; 52 53 foreach ( (array) $sidebar as $i => $name ) { 54 $found = true; 53 55 $widget = strtolower($name); 54 56 $widget_str = $sidebar_id . '::' . $widget; 55 57 if (in_array($widget_str, $selected)) 56 $ form.= "<option value='" . $widget_str . "' selected='selected'>" . $widget_str;58 $$select .= "<option value='" . $widget_str . "' selected='selected'>" . $widget_str; 57 59 else 58 $ form.= "<option value='" . $widget_str . "'>" . $widget_str;60 $$select .= "<option value='" . $widget_str . "'>" . $widget_str; 59 61 60 62 } … … 62 64 } 63 65 64 $form .= "</select><br/>\n"; 66 $select .= "</select><br/>\n"; 67 if ($found){ 68 $form = $form . $select; 69 } else { 70 $form = $form . " " . _MB_XP2_NO_WIDGET; 71 } 72 65 73 return $form; 66 74 }
Note: See TracChangeset
for help on using the changeset viewer.