Commit a193201b authored by Jacob Rockowitz's avatar Jacob Rockowitz
Browse files

Issue #3254570 by jrockowitz, cindytwilliams: [Drupal 9.x] Move jQuery UI...

Issue #3254570 by jrockowitz, cindytwilliams: [Drupal 9.x] Move jQuery UI datepicker support into dedicated deprecated module
parent 7179b488
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -3,10 +3,6 @@
 * Date element styles.
 */

.ui-datepicker-trigger {
  margin: 0 2px;
}

.form-item.form-type-datetime .container-inline,
.form-item.form-type-datelist .container-inline {
  display: inline-block;
+7 −1
Original line number Diff line number Diff line
@@ -102,7 +102,9 @@ echo 'true' > modules/webform_group/tests/modules/webform_group_test/webform_gro

echo 'true' > modules/webform_templates/webform_templates.features.yml

echo 'true' > modules/webform_icheck/tests/modules/webform_icheck/webform_image_select_test.features.yml
echo 'true' > modules/webform_icheck/tests/modules/webform_icheck_test/webform_icheck_test.features.yml

echo 'true' > modules/webform_jqueryui_datepicker/tests/modules/webform_jqueryui_datepicker_test/webform_jqueryui_datepicker.features.yml

echo 'true' > modules/webform_image_select/webform_image_select.features.yml
echo 'true' > modules/webform_image_select/tests/modules/webform_image_select_test/webform_image_select_test.features.yml
@@ -193,6 +195,7 @@ drush en -y webform\
  webform_entity_print_test\
  webform_entity_print_attachment_test\
  webform_icheck_test\
  webform_jqueryui_datepicker_test\
  webform_image_select_test\
  webform_location_geocomplete_test\
  webform_node_test_multiple\
@@ -249,6 +252,7 @@ drush features-export -y webform_clientside_validation_test
drush features-export -y webform_entity_print_test
drush features-export -y webform_entity_print_attachment_test
drush features-export -y webform_icheck_test
drush features-export -y webform_jqueryui_datepicker_test
drush features-export -y webform_image_select_test
drush features-export -y webform_node_test_multiple
drush features-export -y webform_node_test_translation
@@ -282,6 +286,7 @@ drush webform:tidy -y --dependencies webform_example_variant
drush webform:tidy -y --dependencies webform_example_remote_post
drush webform:tidy -y --dependencies webform_group_test
drush webform:tidy -y --dependencies webform_icheck
drush webform:tidy -y --dependencies webform_jqueryui_datepicker
drush webform:tidy -y --dependencies webform_image_select
drush webform:tidy -y --dependencies webform_location_geocomplete
drush webform:tidy -y --dependencies webform_node
@@ -335,6 +340,7 @@ drush features-import -y webform_example_remote_post
drush features-import -y webform_entity_print
drush features-import -y webform_group_test
drush features-import -y webform_icheck
drush features-import -y webform_jqueryui_datepicker_test
drush features-import -y webform_image_select
drush features-import -y webform_location_geocomplete
drush features-import -y webform_node
+11 −20
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ function webform_requirements($phase) {
  }

  /* ************************************************************************ */
  // Check jQuery UI Datepicker module.
  // Check Webform jQuery UI Datepicker module.
  /* ************************************************************************ */

  $config_factory = \Drupal::configFactory();
@@ -177,26 +177,17 @@ function webform_requirements($phase) {
      break;
    }
  }
  if ($has_datepicker) {
    if (\Drupal::moduleHandler()->moduleExists('jquery_ui_datepicker')) {
      $requirements['jquery_ui_datepicker'] = [
        'title' => t('Webform: jQuery UI Datepicker'),
        'value' => t('jQuery UI Datepicker module installed.'),
      ];
    }
    else {
  if ($has_datepicker && !\Drupal::moduleHandler()->moduleExists('webform_jquery_ui_datepicker')) {
    $t_args = [
        ':href_webform' => Url::fromRoute('entity.webform.collection', [], ['query' => ['search' => 'datepicker']])->toString(),
        ':href_datepicker' => 'https://www.drupal.org/project/jquery_ui_datepicker',
      ':href' => Url::fromRoute('entity.webform.collection', [], ['query' => ['search' => 'datepicker']])->toString(),
    ];
    $requirements['jquery_ui_datepicker'] = [
      'title' => t('Webform: jQuery UI Datepicker'),
        'value' => t('jQuery UI Datepicker module not installed.'),
        'description' => t('The <a href=":href_datepicker">jQuery UI Datepicker</a> module is required to support datepickers. Disable this datepicker warning by <a href=":href_webform">removing #datepicker property from all webforms</a>.', $t_args),
      'value' => t('Webform jQuery UI Datepicker module not installed.'),
      'description' => t('The Webform jQuery UI Datepicker module is required to support datepickers. Disable this datepicker warning by <a href=":href">removing #datepicker property from all webforms</a>.', $t_args),
      'severity' => REQUIREMENT_WARNING,
    ];
  }
  }

  /* ************************************************************************ */
  // Check SPAM protection.
+1 −0
Original line number Diff line number Diff line
@@ -4302,3 +4302,4 @@ function webform_update_8636() {

  return implode(PHP_EOL, $messages);
}
+1 −6
Original line number Diff line number Diff line
@@ -60,11 +60,6 @@ elements: |
    datelist:
      '#type': datelist
      '#title': 'Date list'
    date_datepicker:
      '#type': date
      '#title': 'Date picker'
      '#datepicker': true
      '#date_date_format': 'D, m/d/Y'
    webform_time:
      '#type': webform_time
      '#title': Time
Loading