mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
FIX Initial visibility of permission fields when editing a document
This commit is contained in:
parent
2039d72688
commit
708721a5aa
@ -34,20 +34,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});*/
|
});*/
|
||||||
$('#CanViewType input, #CanEditType input').entwine({
|
$('.permissions input[name="CanViewType"], .permissions input[name="CanEditType"]').entwine({
|
||||||
onchange: function () {
|
onchange: function () {
|
||||||
var dropDown = $(this).closest('.field').next();
|
if (!this.is(':checked')) {
|
||||||
if ($(this).val() === 'OnlyTheseUsers') {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var dropDown = this.closest('.fieldholder-small').next();
|
||||||
|
if (this.val() === 'OnlyTheseUsers') {
|
||||||
dropDown.removeClass('hide');
|
dropDown.removeClass('hide');
|
||||||
} else {
|
} else {
|
||||||
dropDown.addClass('hide');
|
dropDown.addClass('hide');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onadd: function () {
|
onadd: function () {
|
||||||
if ($(this).is(':checked') && $(this).val() === 'OnlyTheseUsers') {
|
this.trigger('change');
|
||||||
var dropDown = $(this).closest('.field').next();
|
|
||||||
dropDown.removeClass('hide');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#Actions ul li').entwine({
|
$('#Actions ul li').entwine({
|
||||||
|
Loading…
Reference in New Issue
Block a user