During create we were passing the wrong objectlcasses to the ajax call when adding a new attribute.
This commit is contained in:
parent
3fad9770a3
commit
b501dfe824
@ -70,8 +70,8 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('page-scripts')
|
@section('page-scripts')
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var oc = {!! $oo->getObject('objectclass')->values !!};
|
|
||||||
var rdn_attr;
|
var rdn_attr;
|
||||||
|
|
||||||
function editmode() {
|
function editmode() {
|
||||||
@ -100,9 +100,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
@if($step === 2)
|
||||||
|
var oc = {!! $o->getObject('objectclass')->values !!};
|
||||||
|
|
||||||
$('#newattr').on('change',function(item) {
|
$('#newattr').on('change',function(item) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
url: '{{ url('entry/attr/add') }}/'+item.target.value,
|
||||||
|
data: {
|
||||||
|
objectclasses: oc,
|
||||||
|
},
|
||||||
|
cache: false,
|
||||||
beforeSend: function() {},
|
beforeSend: function() {},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$('#newattrs').append(data);
|
$('#newattrs').append(data);
|
||||||
@ -111,11 +119,6 @@
|
|||||||
if (e.status != 412)
|
if (e.status != 412)
|
||||||
alert('That didnt work? Please try again....');
|
alert('That didnt work? Please try again....');
|
||||||
},
|
},
|
||||||
url: '{{ url('entry/attr/add') }}/'+item.target.value,
|
|
||||||
data: {
|
|
||||||
objectclasses: oc,
|
|
||||||
},
|
|
||||||
cache: false
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Remove the option from the list
|
// Remove the option from the list
|
||||||
@ -125,6 +128,7 @@
|
|||||||
if ($(this).find("option").length === 1)
|
if ($(this).find("option").length === 1)
|
||||||
$('#newattr-select').remove();
|
$('#newattr-select').remove();
|
||||||
});
|
});
|
||||||
|
@endif
|
||||||
|
|
||||||
editmode();
|
editmode();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user