diff --git a/client/src/i18n/en.json b/client/src/i18n/en.json
index befb36c8dc..46b3084f17 100644
--- a/client/src/i18n/en.json
+++ b/client/src/i18n/en.json
@@ -1722,12 +1722,10 @@
},
"LOCATION": {
"ADD" : "Add",
- "COUNTRY" : "Country",
"CURRENT" : "Current",
"DESCRIPTION" : "Location Manager Configuration is used to create location and to store it in the system, locations are very importants when you register a patient and so one. Use this module to",
- "ET" : "and",
- "INFO_CREATE" : "create",
- "INFO_MODIFY" : "modify",
+ "INFO_CREATE" : "Create",
+ "INFO_MODIFY" : "Modify",
"LOCALITY" : "Locality",
"LOCATION" : "Location",
"MANAGER_CONFIGURATION" : "Location Manager Configuration",
@@ -1737,15 +1735,16 @@
"MANAGE_VILLAGE" : "Manage Village",
"NEW_FORM" : "New Form",
"ORIGIN" : "Origin",
- "PROVINCE" : "Province",
- "REGISTER" : "Register a Location",
+ "REGISTER" : "Register a new Location",
"REGISTERED" : "Registered Locations",
- "REMOVE" : "remove",
- "SECTOR" : "Sector",
+ "REMOVE" : "Remove",
"TITLE" : "Location Manager",
- "VILLAGE" : "Village",
"VILLAGE_NAME" : "Village Name",
- "VILLE" : "Township/Commune"
+ "VILLE" : "Township/Commune",
+ "COUNTRY" : "Country",
+ "PROVINCE" : "Province",
+ "SECTOR" : "Sector",
+ "VILLAGE" : "Village"
},
"NO_EXCHANGE": {
"CURRENT_DATE" : "Current Date",
@@ -2584,9 +2583,9 @@
"TITLE" : "Sector Manager"
},
"SELECT": {
- "ACCOUNT" : "Select Account",
- "ACCOUNT_REFERENTIIAL" : "Select the accounts referential",
- "ACCOUNT_TYPE" : "Select Account Type",
+ "ACCOUNT" : "Select an Account",
+ "ACCOUNT_REFERENTIIAL" : "Select the Referential Account",
+ "ACCOUNT_TYPE" : "Select an Account Type",
"ALL" : "All",
"BALANCE_SECTION" : "Select Balance Sheet Section",
"CASH" : "Select a Cash",
@@ -2650,7 +2649,12 @@
"VALUE" : "Select a value",
"VILLAGE" : "Select a Village",
"WHOLE_YEAR_BUDGET" : "Select the annual budget",
- "ZS" : "Select an health zone"
+ "ZS" : "Select an health zone",
+ "VILLAGE" : "Select a Village",
+ "SECTOR" : "Select a Sector",
+ "PROVINCE" : "Select a Province",
+ "COUNTRY" : "Select a Country",
+ "EMPTY" : "No matching records!"
},
"SERVICE": {
"COST_CENTER_SELECT" : "Cost center",
diff --git a/client/src/js/directives/bhLocationSelect.js b/client/src/js/directives/bhLocationSelect.js
new file mode 100644
index 0000000000..2c033182b2
--- /dev/null
+++ b/client/src/js/directives/bhLocationSelect.js
@@ -0,0 +1,240 @@
+angular.module('bhima.directives')
+
+/**
+ * Location Selection Component - bhLocationSelect
+ */
+.component('bhLocationSelect', {
+ templateUrl : 'partials/templates/bhLocationSelect.tmpl.html',
+ controller : LocationSelectController,
+ bindings: {
+ locationUuid: '=', // two-way binding
+ disable: '<', // one-way binding
+ validationTrigger: '<', // one-way binding
+ }
+});
+
+LocationSelectController.$inject = [ 'LocationService', '$scope' ];
+
+/**
+ * Location Select Controller
+ *
+ * This component allows easy selection and validation of locations to be used
+ * throughout bhima.
+ *
+ * COMPONENT LIFECYCLE
+ *
+ * 1. On startup, all countries are downloaded and bound the view. If a
+ * location-uuid was provided, the location is immediately downloaded and
+ * selected in the view.
+ *
+ * 2. As the user changes each
diff --git a/client/src/partials/patients/registration/registration.html b/client/src/partials/patients/registration/registration.html
index 72d5d84581..23e7d4dda6 100644
--- a/client/src/partials/patients/registration/registration.html
+++ b/client/src/partials/patients/registration/registration.html
@@ -1,18 +1,18 @@
-
+
@@ -20,9 +20,9 @@
-
+
-
@@ -42,9 +42,9 @@
-
+
-
@@ -55,27 +55,27 @@
-
-
-
+
-
+
-
@@ -118,39 +118,37 @@
+
-
+
-
+
-
{{ "PATIENT_REG.ORIGIN_LOCATION" | translate }}
-
-
-
-
-
+
+
-
+
-
+
{{ "PATIENT_REG.CURRENT_LOCATION" | translate }}
-
-
-
-
+
+
-
+
-
+
{{ "PATIENT_REG.CURRENT_LOCATION" | translate }}
-
+
{{ "PATIENT_REG.OPTIONAL_INFO" | translate }}