Projet

Général

Profil

Révision 955823d8

Ajouté par Assos Assos il y a presque 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/flexslider/flexslider.admin.inc
404 404
    '#default_value' => $optionset->name,
405 405
  );
406 406

  
407
  // Show select boxes for the various image styles (thumbnail, normal, big)
408
  $image_style = image_style_options(FALSE);
409
  $form['image_style'] = array(
410
    '#type' => 'fieldset',
411
    '#title' => 'Image style',
412
    '#tree' => TRUE,
413
  );
414
  $form['image_style']['normal'] = array(
415
    '#type' => 'select',
416
    '#title' => t('Normal image style'),
417
    '#description' => t('Image style for the main stage images.'),
418
    '#empty_option' => t('None (original image)'),
419
    '#options' => $image_style,
420
    '#default_value' => $optionset->imagestyle_normal,
421
  );
422
  $form['image_style']['thumbnail'] = array(
423
    '#type' => 'select',
424
    '#title' => t('Thumbnail image style'),
425
    '#description' => t('Image style for the thumbnail images.'),
426
    '#empty_option' => t('None (original image)'),
427
    '#options' => $image_style,
428
    '#default_value' => $optionset->imagestyle_thumbnail,
429
    // @todo enable/disable this option based on the type of options selected
430
    // Ex: Thumbnails should be enabled
431
  );
432

  
433 407
  // Options Vertical Tab Group table
434 408
  $form['options'] = array(
435 409
    '#type' => 'vertical_tabs',
......
547 521
 */
548 522
function _flexslider_validate_minimum_version_22($element, &$form_state) {
549 523
  $lib = libraries_detect('flexslider');
550
  $version = $lib['version'];
551
  $required = "2.2";
552

  
553
  if (!version_compare($version, $required, '>=')) {
554
    form_error($element, t('To use %name you must install FlexSlider version !required or higher.', array(
555
      '%name' => $element['#title'],
556
      '!required' => l($required, 'https://github.com/woothemes/FlexSlider/tree/version/2.2'),
557
    )));
524
  if (!isset($lib['version'])) {
525
    drupal_set_message(t('Unable to detect FlexSlider library version. Some options may not function properly. Please review the README.md file for installation instructions.'), 'warning');
526
  }
527
  else {
528
    $version = $lib['version'];
529
    $required = "2.2";
530

  
531
    if (!version_compare($version, $required, '>=')) {
532
      form_error($element, t('To use %name you must install FlexSlider version !required or higher.', array(
533
        '%name' => $element['#title'],
534
        '!required' => l($required, 'https://github.com/woothemes/FlexSlider/tree/version/2.2'),
535
      )));
536
    }
558 537
  }
559 538
}

Formats disponibles : Unified diff