- Timestamp:
- Jun 18, 2014, 10:39:25 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_html.inc.php
r28587 r28715 232 232 } 233 233 234 /**235 * Returns an HTML list of tags. It can be a multi select field or a list of236 * checkboxes.237 *238 * @param string HTML field name239 * @param array selected tag ids240 * @return array241 */242 function get_html_tag_selection(243 $tags,244 $fieldname,245 $selecteds = array(),246 $forbidden_categories = null247 )248 {249 global $conf;250 251 if (count ($tags) == 0 )252 {253 return '';254 }255 $output = '<ul class="tagSelection">';256 foreach ($tags as $tag)257 {258 $output.=259 '<li>'260 .'<label>'261 .'<input type="checkbox" name="'.$fieldname.'[]"'262 .' value="'.$tag['id'].'"'263 ;264 265 if (in_array($tag['id'], $selecteds))266 {267 $output.= ' checked="checked"';268 }269 270 $output.=271 '> '272 .$tag['name']273 .'</label>'274 .'</li>'275 ."\n"276 ;277 }278 $output.= '</ul>';279 280 return $output;281 }282 234 283 235 /** -
trunk/themes/default/theme.css
r28709 r28715 588 588 margin: 0; 589 589 padding: 0 0.5em 0 0; 590 }591 592 .tagSelection {593 margin: 1em 0 !important;594 }595 596 .tagSelection LI {597 display:inline-block;598 width: 150px;599 overflow:hidden;600 white-space: nowrap;601 590 } 602 591
Note: See TracChangeset
for help on using the changeset viewer.