Skip to content

Commit

Permalink
2.0.0 tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkbone committed Dec 14, 2023
1 parent befc9ce commit 2769dab
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions tags/2.0.0/js/abnlookup-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function itsg_gf_abnlookup_function( field_id, field_validate_abnlookup, field_d
gform_abnlookup_entity_state_field_input.val('').change();
gform_abnlookup_entity_effective_from_input.val('').change();
gform_abnlookup_gst_effective_from_input.val('').change();
gform_abnlookup_business_name_options.remove();
jQuery('.gform_abnlookup_business_name_field_' + field_id + ' option').remove();
gform_abnlookup_entity_gst_field_yes.prop( 'disabled', false );
gform_abnlookup_entity_gst_field_no.prop( 'disabled', false );
gform_abnlookup_entity_gst_field_yes.prop( 'checked', false ).change().keyup();
Expand Down Expand Up @@ -94,7 +94,7 @@ function itsg_gf_abnlookup_function( field_id, field_validate_abnlookup, field_d
} else if ( gform_abnlookup_entity_effective_from_input.hasClass('ymd_slash') ) {
var entityEffectiveFromFormatted = year + '/' + month + '/' + date;
} else if ( gform_abnlookup_entity_effective_from_input.hasClass('ymd_dash') ) {
var entityEffectiveFromFormatted = year + '-' + month + '-' + date;businessEntity202001
var entityEffectiveFromFormatted = year + '-' + month + '-' + date;
} else if ( gform_abnlookup_entity_effective_from_input.hasClass('ymd_dot') ) {
var entityEffectiveFromFormatted = year + '.' + month + '.' + date;
} else {
Expand Down Expand Up @@ -143,15 +143,15 @@ function itsg_gf_abnlookup_function( field_id, field_validate_abnlookup, field_d
}

if (typeof businessNames !== 'undefined') {
gform_abnlookup_business_name_options.remove();
jQuery('.gform_abnlookup_business_name_field_' + field_id + ' option').remove();
var entityNameOption = new Option(entityName, entityName, true, true);
gform_abnlookup_business_name_select.append(entityNameOption);
businessNames.forEach(function(item, index, arr) {
var thisNameOption = new Option(item['organisationName'], item['organisationName'], false, false);
gform_abnlookup_business_name_select.append(thisNameOption);
});
} else {
gform_abnlookup_business_name_options.remove();
jQuery('.gform_abnlookup_business_name_field_' + field_id + ' option').remove();
var entityNameOption = new Option(entityName, entityName, true, true);
gform_abnlookup_business_name_select.append(entityNameOption);
}
Expand Down Expand Up @@ -331,7 +331,7 @@ function itsg_gf_abnlookup_function( field_id, field_validate_abnlookup, field_d
gform_abnlookup_entity_postcode_field_input.val('').change();
gform_abnlookup_entity_state_field_input.val('').change();
gform_abnlookup_entity_effective_from_input.val('').change();
gform_abnlookup_business_name_options.remove();
jQuery('.gform_abnlookup_business_name_field_' + field_id + ' option').remove();
gform_abnlookup_gst_effective_from_input.val('').change();
gform_abnlookup_entity_gst_field_yes.prop( 'disabled', false );
gform_abnlookup_entity_gst_field_no.prop( 'disabled', false );
Expand Down
2 changes: 1 addition & 1 deletion tags/2.0.0/js/abnlookup-script.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2769dab

Please sign in to comment.