Skip to content

Commit a17afa6

Browse files
authored
Merge pull request #109 from companieshouse/feature/fa-396-fa-397-display-etag-mismatch-error
Display etag mismatch error
2 parents 97864f9 + 11151f6 commit a17afa6

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

errors.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ errors:
124124
minlength: "Secretary of State authorisation code has an invalid value - it must be 4 characters long"
125125
maxlength: "Secretary of State authorisation code has an invalid value - it must be 4 characters long"
126126

127+
change_registered_office_address:
128+
address:
129+
etag:
130+
etag-mismatch: "This address has been recently updated. Check the current address to see if it's correct."
131+
127132
register_charge:
128133
creation_date:
129134
before_incorporation_date: "The Date of Creation must be on or after the date of incorporation"

lib/ChGovUk/Models/Company/Transactions/ChangeRegisteredOfficeAddress.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ our %api_field_map = (
1414
'address[postcode]' => 'postal_code',
1515
'address[country]' => 'country',
1616
'address[po_box]' => 'po_box',
17+
'address[etag]' => 'reference_etag',
1718
);
1819

1920
#-------------------------------------------------------------------------------

templates/company/transactions/change_registered_office_address.html.tx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@
88
<legend class="heading-medium text">What is the new address of the company?</legend>
99
% $c.include_later('includes/forms/errors', form => $form, form_title => 'Filing Error');
1010
% include 'includes/forms/address.tx' { form => $form, name => 'address', include_po_box => 1 }
11-
% $form.hidden_field( name => 'address[etag]', value => $etag );
1211
</fieldset>
1312
% }

templates/company/transactions/current_address.html.tx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<p class="text">
2+
% $form.hidden_field( name => 'address[etag]', value => $etag );
23
Current address
34
<br />
45
% if $care_of_name {

0 commit comments

Comments
 (0)