Projet

Général

Profil

Révision b220caf9

Ajouté par Assos Assos il y a environ 8 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/themes/bootstrap/templates/system/form-element-label.func.php
38 38
  // Extract variables.
39 39
  $output = '';
40 40
  $title = isset($element['#title']) ? filter_xss_admin($element['#title']) . ' ' : '';
41
  $required = !empty($element['#required']) ? theme('form_required_marker', array('element' => $element)) : '';
42
  if ($required) {
41
  if ($title && ($required = !empty($element['#required']) ? theme('form_required_marker', array('element' => $element)) : '')) {
43 42
    $title .= $required;
44 43
  }
45 44
  $display = isset($element['#title_display']) ? $element['#title_display'] : 'before';
......
49 48

  
50 49
  // Immediately return if the element is not a checkbox or radio and there is
51 50
  // no label to be rendered.
52
  if (!$checkbox && !$radio && ($display === 'none' || (!$title && !$required))) {
51
  if (!$checkbox && !$radio && ($display === 'none' || !$title)) {
53 52
    return '';
54 53
  }
55 54

  

Formats disponibles : Unified diff