Skip to content

Commit

Permalink
Merge pull request #7 from ishannz/pulls/add-region
Browse files Browse the repository at this point in the history
Add Region to the field list
  • Loading branch information
wilr authored Oct 13, 2020
2 parents dfd452d + 8c040df commit 6828432
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/javascript/addressfinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
}

manual.find("input[name*=Suburb]").val(item.suburb || "");
manual.find("input[name*=Region]").val(item.region || "");
manual.find("input[name*=City]").val(item.city || "");
manual.find("input[name*=Postcode]").val(item.postcode || "");
manual.find("input[name*=Longitude]").val(item.x || "");
Expand Down
1 change: 1 addition & 0 deletions client/javascript/addressfinder_ent.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
}

manual.find('input[name*=Suburb]').val(item.suburb || '')
manual.find('input[name*=Region]').val(item.region || '')
manual.find('input[name*=City]').val(item.city || '')
manual.find('input[name*=Postcode]').val(item.postcode || '')
manual.find('input[name*=Longitude]').val(item.x || '')
Expand Down
5 changes: 5 additions & 0 deletions src/AddressFinderField.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ public function __construct($name, $title = null, $value = null)
_t("AddressFinderField.SUBURB", "Suburb")
));

$this->manualFields->push(new TextField(
"{$name}[Region]",
_t("AddressFinderField.REGION", "Region")
));

$this->manualFields->push(new TextField(
"{$name}[City]",
_t("AddressFinderField.CITY", "City")
Expand Down

0 comments on commit 6828432

Please sign in to comment.