[Web] fix attribute mapping list
This commit is contained in:
parent
6dc6c649ce
commit
6aac996861
|
@ -771,7 +771,7 @@ jQuery(function($){
|
||||||
$('.iam_rolemap_add').click(async function(e){
|
$('.iam_rolemap_add').click(async function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var parent = $(this).parent().parent();
|
var parent = $('#iam_mapping_list')
|
||||||
$(parent).children().last().clone().appendTo(parent);
|
$(parent).children().last().clone().appendTo(parent);
|
||||||
var newChild = $(parent).children().last();
|
var newChild = $(parent).children().last();
|
||||||
$(newChild).find('input').val('');
|
$(newChild).find('input').val('');
|
||||||
|
@ -784,11 +784,13 @@ jQuery(function($){
|
||||||
$('.iam_rolemap_del').off('click');
|
$('.iam_rolemap_del').off('click');
|
||||||
$('.iam_rolemap_del').click(async function(e){
|
$('.iam_rolemap_del').click(async function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if ($(this).parent().parent().children().length > 1)
|
||||||
$(this).parent().remove();
|
$(this).parent().remove();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$('.iam_rolemap_del').click(async function(e){
|
$('.iam_rolemap_del').click(async function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if ($(this).parent().parent().children().length > 1)
|
||||||
$(this).parent().remove();
|
$(this).parent().remove();
|
||||||
});
|
});
|
||||||
// selecting identity provider
|
// selecting identity provider
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
<span class="w-100 ms-2">Template</span>
|
<span class="w-100 ms-2">Template</span>
|
||||||
<button class="btn btn-sm d-block d-sm-inline btn-secondary ms-2 iam_rolemap_add"><i class="bi bi-plus-lg"></i></button>
|
<button class="btn btn-sm d-block d-sm-inline btn-secondary ms-2 iam_rolemap_add"><i class="bi bi-plus-lg"></i></button>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="iam_mapping_list">
|
||||||
{% for key, role in iam_settings.mappers %}
|
{% for key, role in iam_settings.mappers %}
|
||||||
<div class="offset-sm-3 col-4 d-flex mb-2">
|
<div class="offset-sm-3 col-4 d-flex mb-2">
|
||||||
<input type="text" class="form-control me-2" name="mappers" value="{{ iam_settings.mappers[key] }}" required>
|
<input type="text" class="form-control me-2" name="mappers" value="{{ iam_settings.mappers[key] }}" required>
|
||||||
|
@ -97,6 +98,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row mb-2 mt-4">
|
<div class="row mb-2 mt-4">
|
||||||
<label class="control-label col-sm-3 text-sm-end"></label>
|
<label class="control-label col-sm-3 text-sm-end"></label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
|
|
Loading…
Reference in New Issue