The Patron summary pane was not properly displaying the values
for the primary ID and secondary ID. Also added the type name of
the ID in next to primary ID label.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
<div class="col-md-7">{{patron().other_phone()}}</div>
</div>
<div class="row">
- <div class="col-md-5">[% l('ID1') %]</div>
- <div class="col-md-7">{{patron().ident_type().name()}}</div>
+ <div class="col-md-5">[% l('ID1') %] <span ng-if="hasIdentTypeName" class="ident_type">({{patron().ident_type().name()}})</span></div>
+ <div class="col-md-7">{{patron().ident_value()}}</div>
</div>
<div class="row">
<div class="col-md-5">[% l('ID2') %]</div>
- <div class="col-md-7">{{patron().ident_type2().name()}}</div>
+ <div class="col-md-7">{{patron().ident_value2()}}</div>
</div>
<div class="row">
<div class="col-md-5">[% l('Email') %]</div>
$scope.patron_id = patron_id;
return patronSvc.setPrimary($scope.patron_id)
.then(function() {return patronSvc.checkAlerts()})
- .then(redirectToAlertPanel);
+ .then(redirectToAlertPanel)
+ .then(function(){
+ $scope.ident_type_name = $scope.patron().ident_type().name()
+ $scope.hasIdentTypeName = $scope.ident_type_name.length > 0;
+ });
}
return $q.when();
}