Projet

Général

Profil

Révision 1f683914

Ajouté par Assos Assos il y a environ 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/date/date_elements.inc
337 337
    '#date_label_position' => $instance['widget']['settings']['label_position'],
338 338
  );
339 339

  
340
  $description = !empty($element['#description']) ? t($element['#description']) : '';
341
  unset($element['#description']);
340
  // Date repeat is a multiple value field. So the description is removed from
341
  // the single element earlier. Let's get it back.
342
  if (isset($element['show_repeat_settings']) && !empty($element['value']['#instance']['description'])) {
343
    $element['#description'] = $element['value']['#instance']['description'];
344
  }
342 345

  
343 346
  // Give this element the right type, using a Date API
344 347
  // or a Date Popup element type.
......
383 386
    $element[$to_field]['#prefix'] = '';
384 387
    // Users with JS enabled will never see initially blank values for the end
385 388
    // date (see Drupal.date.EndDateHandler()), so hide the message for them.
386
    $description .= '<span class="js-hide"> ' . t("Empty 'End date' values will use the 'Start date' values.") . '</span>';
387
    $element['#fieldset_description'] = $description;
389
    $element['#description'] .= '<span class="js-hide"> ' . t("Empty 'End date' values will use the 'Start date' values.") . '</span>';
388 390
    if ($field['settings']['todate'] == 'optional') {
389 391
      $element[$to_field]['#states'] = array(
390 392
        'visible' => array(
......
395 397
      );
396 398
    }
397 399
  }
398
  else {
399
    $element[$from_field]['#description'] = $description;
400
  }
401 400

  
402 401
  // Create label for error messages that make sense in multiple values
403 402
  // and when the title field is left blank.

Formats disponibles : Unified diff