mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
[sso] fix create mapping w/ datatype display
This commit is contained in:
parent
50543b8d09
commit
dc4c4b678f
@ -189,9 +189,16 @@ Application.Controllers.controller "NewAuthenticationController", ["$scope", "$s
|
||||
size: 'md'
|
||||
resolve:
|
||||
field: -> mapping
|
||||
controller: ['$scope', '$uibModalInstance', 'field', ($scope, $uibModalInstance, field) ->
|
||||
datatype: ->
|
||||
for field in $scope.mappingFields[mapping.local_model]
|
||||
if field[0] == mapping.local_field
|
||||
return field[1]
|
||||
|
||||
controller: ['$scope', '$uibModalInstance', 'field', 'datatype', ($scope, $uibModalInstance, field, datatype) ->
|
||||
## parent field
|
||||
$scope.field = field
|
||||
## expected data type
|
||||
$scope.datatype = datatype
|
||||
|
||||
## close and save the modifications
|
||||
$scope.ok = ->
|
||||
|
@ -1,9 +1,9 @@
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><span translate>{{ 'data_mapping' }}</span> : {{field.local_field[0]}}</h3>
|
||||
<h3 class="modal-title"><span translate>{{ 'data_mapping' }}</span> : {{field.local_field}}</h3>
|
||||
</div>
|
||||
<div class="modal-body m-lg">
|
||||
<div>
|
||||
<span translate>{{ 'expected_data_type' }}</span> : {{field.local_field[1]}}
|
||||
<span translate>{{ 'expected_data_type' }}</span> : {{datatype}}
|
||||
</div>
|
||||
<form name="mappingForm">
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
<tbody>
|
||||
<tr ng-repeat="m in provider.providable_attributes.o_auth2_mappings_attributes" ng-if="!m._destroy">
|
||||
<td class="text-c">{{m.local_model}}</td>
|
||||
<td>{{m.local_field[0]}}</td>
|
||||
<td>{{m.local_field}}</td>
|
||||
<td>{{m.api_endpoint}}</td>
|
||||
<td>{{m.api_data_type}}</td>
|
||||
<td>{{m.api_field}}</td>
|
||||
@ -41,7 +41,7 @@
|
||||
<td ng-class="{'has-error': mappingForm['auth_mapping[local_field]'].$dirty && mappingForm['auth_mapping[local_field]'].$invalid}">
|
||||
<select class="form-control"
|
||||
name="auth_mapping[local_field]"
|
||||
ng-options="field[0] for field in mappingFields[newMapping.local_model]"
|
||||
ng-options="field[0] as field[0] for field in mappingFields[newMapping.local_model]"
|
||||
ng-model="newMapping.local_field"
|
||||
required>
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user