Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
strategy:
fail-fast: false
matrix:
localgov-version:
- '2.x'
drupal-version:
- '~9.3'
php-version:
- '7.4'
- '8.1'
include:
- localgov-version: '2.x'
drupal-version: '~9.4'
php-version: '8.1'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.1'

steps:

Expand Down Expand Up @@ -110,13 +110,13 @@ jobs:
strategy:
fail-fast: false
matrix:
localgov-version:
- '2.x'
drupal-version:
- '~9.3'
php-version:
- '7.4'
- '8.1'
include:
- localgov-version: '2.x'
drupal-version: '~9.4'
php-version: '8.1'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.1'

steps:

Expand Down Expand Up @@ -146,13 +146,13 @@ jobs:
strategy:
fail-fast: false
matrix:
localgov-version:
- '2.x'
drupal-version:
- '~9.3'
php-version:
- '7.4'
- '8.1'
include:
- localgov-version: '2.x'
drupal-version: '~9.4'
php-version: '8.1'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.1'

steps:

Expand Down Expand Up @@ -181,13 +181,13 @@ jobs:
strategy:
fail-fast: false
matrix:
localgov-version:
- '2.x'
drupal-version:
- '~9.3'
php-version:
- '7.4'
- '8.1'
include:
- localgov-version: '2.x'
drupal-version: '~9.4'
php-version: '8.1'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.1'

steps:

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"minimum-stability": "dev",
"require": {
"drupal/webform": "^6.0",
"drupal/geocoder": "^3.20",
"drupal/geocoder": "^3.20 || ^4.0",
"localgovdrupal/localgov_os_places_geocoder_provider": "1.x-dev"
},
"require-dev": {
Expand Down
2 changes: 0 additions & 2 deletions config/install/localgov_forms.webform.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ element:
default_description_display: ''
default_more_title: More
default_section_title_tag: h2
default_algolia_places_app_id: ''
default_algolia_places_api_key: ''
default_empty_option: true
default_empty_option_required: ''
default_empty_option_optional: ''
Expand Down
2 changes: 1 addition & 1 deletion js/address_change.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
attach: function (context, settings) {

// Behaviors to only attach once.
$('.js-centralhub-address-lookup', context).once('central-hub-behaviours').each(function () {
$(once('central-hub-behaviours', '.js-centralhub-address-lookup', context)).each(function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting :)

// Get form elements.
var addressLookupElement = $(this);
var searchElement = addressLookupElement.find('.js-address-searchstring');
Expand Down
10 changes: 3 additions & 7 deletions js/address_select.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
// Attach after an ajax refresh
Drupal.behaviors.localgov_forms_webform = {
attach: function (context, settings) {
$('.js-webform-type-localgov-webform-uk-address', context).once('localgov-address-webform').each(function () {
$(once('localgov-address-webform', '.js-webform-type-localgov-webform-uk-address', context)).each(function () {
var centralHubElement = $(this);
addManualEntryButton(centralHubElement);

Expand All @@ -226,14 +226,10 @@
});

// Manual address change handler first.
$(document).once('.js-address-entry-container input', context).ajaxSuccess(function (event, data) {
$('.js-address-entry-container input').on('change', localgov_forms_webform_manual_address_change_handler);
});
$('.js-address-entry-container input').on('change', localgov_forms_webform_manual_address_change_handler);

// Select box change handler.
$(document).once('.js-address-select-container', context).ajaxSuccess(function (event, data) {
$('.js-address-select').on('change', localgov_forms_webform_change_handler);
});
$('.js-address-select').on('change', localgov_forms_webform_change_handler);
},
detach: function (context, settings, trigger) {
$('.js-address-entry-container input').off('change', localgov_forms_webform_manual_address_change_handler);
Expand Down
2 changes: 1 addition & 1 deletion localgov_forms.info.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: LocalGov Forms
type: module
description: Provides additional configuration, styling and components for the Drupal Webform module.
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^8.8 || ^9 || ^10
package: LocalGov Drupal

dependencies:
Expand Down
2 changes: 2 additions & 0 deletions localgov_forms.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ localgov_forms.address_select:
dependencies:
- localgov_forms/localgov_forms.address_change
- core/drupal
- core/once
- core/jquery

localgov_forms.address_change:
Expand All @@ -29,4 +30,5 @@ localgov_forms.address_change:
js/address_change.js: {}
dependencies:
- core/drupal
- core/once
- core/jquery
2 changes: 1 addition & 1 deletion modules/localgov_forms_date/localgov_forms_date.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'LocalGov Forms: Date'
type: module
description: 'A custom Date component'
package: LocalGov Drupal
core_version_requirement: ^8 || ^9
core_version_requirement: ^8 || ^9 || ^10
dependencies:
- 'webform:webform'
- 'localgov_forms:localgov_forms'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Localgov form date test'
description: 'Helper module to setup a webform with a localgov_forms_date field.'
type: module
package: Testing
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^8.8 || ^9 || ^10

dependencies:
- webform:webform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Localgov form test'
description: 'Helper module to setup a Contact webform.'
type: module
package: Testing
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^8.8 || ^9 || ^10

dependencies:
- webform:webform
Expand Down