Commit c910a860 authored by parvez's avatar parvez
Browse files

Merge pull request #2 from rajeshrhino/master

Display API errors during postcode lookup
parents 6c8737ee 6cb1343c
......@@ -56,7 +56,12 @@ class CRM_Civicrmpostcodelookup_Page_Civipostcode extends CRM_Core_Page {
$simpleJSONData = json_decode($data);
if (!empty($simpleJSONData)) {
$addresslist = self::getAddressList($simpleJSONData, $postcode);
if ($simpleJSONData->is_error == 1) {
$addresslist[0]['value'] = '';
$addresslist[0]['label'] = $simpleJSONData->error;
} else {
$addresslist = self::getAddressList($simpleJSONData, $postcode);
}
}
// highlight search results
......
......@@ -14,14 +14,14 @@
<url desc="Support">https://github.com/veda-consulting/uk.co.vedaconsulting.module.civicrmpostcodelookup</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2015-01-05</releaseDate>
<version>1.0.alpha2</version>
<develStage>alpha</develStage>
<releaseDate>2015-04-14</releaseDate>
<version>1.0</version>
<develStage>stable</develStage>
<compatibility>
<ver>4.4</ver>
<ver>4.5</ver>
</compatibility>
<comments>This module is under active development.</comments>
<comments>Developed by Veda NFP Consulting LTD.</comments>
<civix>
<namespace>CRM/Civicrmpostcodelookup</namespace>
</civix>
......
Supports Markdown
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