Commit 7bd190f6 authored by jrockowitz's avatar jrockowitz Committed by jrockowitz

Issue #3184269 by jrockowitz: Deploy 6.0.0-beta1 and 8.x-5.23-beta2

parent 4d0ddb54
......@@ -187,7 +187,7 @@ function _webform_update_webform_setting_settings(array $settings) {
}
/**
* Update webform handler settings to reflect changes in a handler's default configuration.
* Update webform handler settings to reflect changes in the handler's settings.
*
* @see \Drupal\webform\Plugin\WebformHandlerInterface
*/
......@@ -326,7 +326,7 @@ function _webform_update_field_storage_definitions() {
function _webform_update_webform_submission_storage_schema() {
$manager = \Drupal::entityDefinitionUpdateManager();
if (!$manager->getEntityType('webform_submission')) {
$type = \Drupal::entityTypeManager()->getDefinition('webform_submission');
$type = \Drupal::entityTypeManager()->getDefinition('webform_submission');
$manager->installEntityType($type);
}
$manager->updateEntityType($manager->getEntityType('webform_submission'));
......
......@@ -164,7 +164,7 @@ function template_preprocess_webform_confirmation(array &$variables) {
// @see \Drupal\webform\WebformSubmissionForm::getCustomForm
// @see Drupal.behaviors.webformConfirmationBackAjax (js/webform.ajax.js)
$is_ajax = (!empty($query['ajax_form'])) ? TRUE : FALSE;
$is_limit_unique = ($webform && ($webform->getSetting('limit_total_unique') || $webform ->getSetting('limit_user_unique')));
$is_limit_unique = ($webform && ($webform->getSetting('limit_total_unique') || $webform->getSetting('limit_user_unique')));
if (!empty($is_ajax) && !$is_limit_unique) {
$variables['back_attributes']->addClass('js-webform-confirmation-back-link-ajax');
}
......@@ -366,15 +366,15 @@ function template_preprocess_webform_submission_information(array &$variables) {
$route_options = [];
if ($current_url === $source_entity_url) {
$base_route_name = 'webform.user.submission.delete';
$base_route_name = 'webform.user.submission.delete';
$route_options = ['query' => \Drupal::destination()->getAsArray()];
}
elseif (strpos(\Drupal::routeMatch()->getRouteName(), 'webform.user.submission') !== FALSE
|| !$webform->access('submission_view_any')) {
$base_route_name = 'webform.user.submission.delete';
$base_route_name = 'webform.user.submission.delete';
}
else {
$base_route_name = 'webform_submission.delete_form';
$base_route_name = 'webform_submission.delete_form';
}
$url = $request_handler->getUrl($webform_submission, $source_entity, $base_route_name, $route_options);
$variables['delete'] = [
......
......@@ -22,7 +22,7 @@
backButton = true;
}
else if (window.performance.navigation
&& window.performance.navigation.type == window.performance.navigation.TYPE_BACK_FORWARD) {
&& window.performance.navigation.type === window.performance.navigation.TYPE_BACK_FORWARD) {
backButton = true;
}
}
......@@ -32,7 +32,7 @@
var attachBehaviors = Drupal.attachBehaviors;
Drupal.attachBehaviors = function (context, settings) {
setTimeout(function (context, settings) {
attachBehaviors(context, settings)
attachBehaviors(context, settings);
}, 300);
};
}
......
......@@ -318,7 +318,7 @@
.once('webform-radios-required')
.each(function () {
var $element = $(this);
setTimeout(function () {radiosRequired($element)});
setTimeout(function () {radiosRequired($element);});
});
}
};
......@@ -530,6 +530,7 @@
* @param {element} $input
* An input.
* @param {boolean} required
* Is input required.
*/
function toggleRequired($input, required) {
if (required) {
......
......@@ -83,13 +83,13 @@ class WebformNodeTest extends WebformNodeBrowserTestBase {
$webform->setStatus(WebformInterface::STATUS_CLOSED);
$webform->save();
// Check page closed message
// Check page closed message.
$this->drupalGet('/node/' . $node->id());
$this->assertRaw('Sorry… This form is closed to new submissions.');
$this->drupalLogin($this->rootUser);
// Check webform closed warning
// Check webform closed warning.
$this->drupalGet('/node/' . $node->id() . '/edit');
$this->assertRaw('The <em class="placeholder">Contact</em> webform is <a href="' . $base_path . 'admin/structure/webform/manage/contact/settings/form">closed</a>. The below status will be ignored.');
......
......@@ -85,15 +85,5 @@ Results for URL: http://localhost/wf/webform/example_accessibility_advanced
├── #edit-webform-tableselect-sort > tbody > tr:nth-child(3) > td:nth-child(2)
└── <td>Three</td>
• Error: Duplicate id attribute value "edit-actions" found on the web page.
├── WCAG2AA.Principle4.Guideline4_1.4_1_1.F77
├── #edit-actions
└── <div data-drupal-selector="edit-actions" class="form-actions js-form-wrapper form-wrapper" id="edit-actions"><input class="search-form__subm...</div>
• Error: Duplicate id attribute value "edit-submit" found on the web page.
├── WCAG2AA.Principle4.Guideline4_1.4_1_1.F77
├── #edit-submit
└── <input class="search-form__submit button js-form-submit form-submit" data-drupal-selector="edit-submit" type="submit" id="edit-submit" value="Search">
18 Errors
16 Errors
......@@ -3,17 +3,5 @@ Welcome to Pa11y
> Running Pa11y on URL http://localhost/wf/webform/example_accessibility_basic
Results for URL: http://localhost/wf/webform/example_accessibility_basic
• Error: Duplicate id attribute value "edit-actions" found on the web page.
├── WCAG2AA.Principle4.Guideline4_1.4_1_1.F77
├── #edit-actions
└── <div data-drupal-selector="edit-actions" class="form-actions js-form-wrapper form-wrapper" id="edit-actions"><input class="search-form__subm...</div>
• Error: Duplicate id attribute value "edit-submit" found on the web page.
├── WCAG2AA.Principle4.Guideline4_1.4_1_1.F77
├── #edit-submit
└── <input class="search-form__submit button js-form-submit form-submit" data-drupal-selector="edit-submit" type="submit" id="edit-submit" value="Search">
2 Errors
No issues found!
......@@ -3,17 +3,5 @@ Welcome to Pa11y
> Running Pa11y on URL http://localhost/wf/webform/example_accessibility_containers
Results for URL: http://localhost/wf/webform/example_accessibility_containers
• Error: Duplicate id attribute value "edit-actions" found on the web page.
├── WCAG2AA.Principle4.Guideline4_1.4_1_1.F77
├── #edit-actions
└── <div data-drupal-selector="edit-actions" class="form-actions js-form-wrapper form-wrapper" id="edit-actions"><input class="search-form__subm...</div>
• Error: Duplicate id attribute value "edit-submit" found on the web page.
├── WCAG2AA.Principle4.Guideline4_1.4_1_1.F77
├── #edit-submit
└── <input class="search-form__submit button js-form-submit form-submit" data-drupal-selector="edit-submit" type="submit" id="edit-submit" value="Search">
2 Errors
No issues found!
......@@ -3,17 +3,5 @@ Welcome to Pa11y
> Running Pa11y on URL http://localhost/wf/webform/example_accessibility_labels
Results for URL: http://localhost/wf/webform/example_accessibility_labels
• Error: Duplicate id attribute value "edit-actions" found on the web page.
├── WCAG2AA.Principle4.Guideline4_1.4_1_1.F77
├── #edit-actions
└── <div data-drupal-selector="edit-actions" class="form-actions js-form-wrapper form-wrapper" id="edit-actions"><input class="search-form__subm...</div>
• Error: Duplicate id attribute value "edit-submit" found on the web page.
├── WCAG2AA.Principle4.Guideline4_1.4_1_1.F77
├── #edit-submit
└── <input class="search-form__submit button js-form-submit form-submit" data-drupal-selector="edit-submit" type="submit" id="edit-submit" value="Search">
2 Errors
No issues found!
......@@ -50,10 +50,5 @@ Results for URL: http://localhost/wf/webform/example_accessibility_wizard
├── #webform-submission-example-accessibility-wizard-add-form > div:nth-child(7) > ul > li:nth-child(5) > span:nth-child(2) > span
└── <span class="progress-title" data-webform-progress-link=""> <span class="visua...</span>
• Error: Duplicate id attribute value "edit-actions" found on the web page.
├── WCAG2AA.Principle4.Guideline4_1.4_1_1.F77
├── #edit-actions
└── <div data-drupal-selector="edit-actions" class="form-actions js-form-wrapper form-wrapper" id="edit-actions"><input class="search-form__subm...</div>
10 Errors
9 Errors
......@@ -120,7 +120,7 @@ class WebformEntitySettingsSubmissionsForm extends WebformEntitySettingsBaseForm
'#states' => [
'visible' => [
':input[name="serial_disabled"]' => ['checked' => FALSE],
]
],
],
];
$form['submission_settings']['serial_disabled'] = [
......
......@@ -444,4 +444,3 @@ trait WebformAjaxFormTrait {
}
}
......@@ -206,7 +206,7 @@ class WebformBlock extends BlockBase implements ContainerFactoryPluginInterface
public function build() {
$webform = $this->getWebform();
if (!$webform) {
if (strpos(\Drupal::routeMatch()->getRouteName(), 'layout_builder.') === 0) {
if (strpos($this->routeMatch->getRouteName(), 'layout_builder.') === 0) {
return ['#markup' => $this->t('The webform (@webform) is broken or missing.', ['@webform' => $this->configuration['webform_id']])];
}
else {
......
......@@ -2,12 +2,9 @@
namespace Drupal\webform\Plugin\WebformElement;
use Drupal\Core\Form\FormState;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element\VerticalTabs as VerticalTabsElement;
use Drupal\webform\Element\WebformMessage as WebformMessageElement;
use Drupal\webform\Plugin\WebformElementBase;
use Drupal\webform\Plugin\WebformElementDisplayOnInterface;
use Drupal\webform\WebformSubmissionInterface;
/**
......
......@@ -1358,10 +1358,10 @@ abstract class WebformManagedFileBase extends WebformElementBase implements Webf
*
* @param \Drupal\file\FileInterface $file
* A file.
* @param \Drupal\Core\Session\AccountInterface|NULL $account
* @param \Drupal\Core\Session\AccountInterface|null $account
* A user account.
*
* @return bool|NULL
* @return bool|null
* Returns NULL if the file is not attached to a webform submission.
* Returns FALSE if the user can't access the file.
* Returns TRUE if the user can access the file.
......
......@@ -41,8 +41,7 @@ class WebformCompositeCustomFileTest extends WebformElementManagedFileTestBase {
// Check that file was uploaded.
$this->assertRaw(basename($first_file->uri));
// Add another empty row and check t
//hat file is still uploaded and attached.
// Add another empty row and check that file is still uploaded and attached.
$this->drupalPostForm(NULL, [], 'webform_custom_composite_file_table_add');
$this->assertRaw(basename($first_file->uri));
......
......@@ -67,7 +67,6 @@ class WebformElementCheckboxesJavaScriptTest extends WebformWebDriverTestBase {
$assert_session->checkboxChecked('edit-checkboxes-both-three');
$assert_session->checkboxChecked('edit-checkboxes-both-all');
// Check that 'all' is checked when form is prepopulated.
$options = [
'query' => [
......
......@@ -488,7 +488,6 @@ function webform_toolbar_alter(&$items) {
}
}
/**
* Implements hook_menu_links_discovered_alter().
*/
......@@ -903,7 +902,7 @@ function webform_process_states(array &$elements, $key = '#attributes') {
/******************************************************************************/
/**
* Implements hook_devel_generate_info_alter()
* Implements hook_devel_generate_info_alter().
*/
function webform_devel_generate_info_alter(array &$generators) {
if (!isset($generators['webform_submission'])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment