Commit 8656f0d5 authored by EXT Hélène David's avatar EXT Hélène David
Browse files

readd status in the form and getStatus in the controller

parent a97b71f5
......@@ -9,6 +9,7 @@ root.controller('UnivCompanyContacts' ,['$scope','$http','$stateParams', '$conta
$scope.entrepriseId = $stateParams.entrepriseId;
$scope.getUnivs();
$scope.getStatus();
}
$scope.refresh = function(){
......@@ -33,6 +34,23 @@ root.controller('UnivCompanyContacts' ,['$scope','$http','$stateParams', '$conta
});
};
$scope.getStatus = function(){
$contactFactory.getContactAllStatus(function(data){
$scope._showAlert({status:2,message:""})
$scope.listStatus = [];
if(data.status == "success"){
$scope.listStatus = data.details
$scope._showAlert({status:1,message:""})
}
else{
$scope._showAlert({status:3,message:""})
}
});
}
$scope.getContacts = function (){
$scope._log("get contacts");
$scope.contacts.elements = [];
......
......@@ -21,6 +21,11 @@
<h6 style='font-family: "SSPBold";text-transform: uppercase;'>{{::_labels.contactsFields.organization}}</h6>
<input type="text" value="" ng-model="newElement.organization">
<h6 style='font-family: "SSPBold";text-transform: uppercase;'>{{::_labels.contactsFields.status}}</h6>
<select ng-model="newElement.status" style="width: 100%" required>
<option ng-repeat="option in listStatus" value="{{option.value}}">{{::_labels.contactsFields.statusValues[option.value]}}</option>
</select>
<h6 style='font-family: "SSPBold";text-transform: uppercase;'>{{::_labels.description}}</h6>
<textarea type="text" ng-model="newElement.description"></textarea>
......
Markdown is supported
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