[frio] Fix ACL selection in new event modal

- Fix this.allow_cid.push isn't a function error
This commit is contained in:
Hypolite Petovan 2018-09-09 10:10:17 -04:00
parent 4edbea3ed0
commit 11a3b45957

View file

@ -54,20 +54,19 @@ $(document).ready(function() {
// without page reloading (e.g. closing an old modal and open a new modal). // without page reloading (e.g. closing an old modal and open a new modal).
// Otherwise we wouldn't get the ACL data. // Otherwise we wouldn't get the ACL data.
/// @todo: Try to implement some kind of ACL reloading in acl.js. /// @todo: Try to implement some kind of ACL reloading in acl.js.
if (typeof acl !== "undefined") {
var eventPerms = document.getElementById('event-edit-form'); var eventPerms = document.getElementById('event-edit-form');
acl = new ACL( acl = new ACL(
baseurl + "/acl", baseurl + "/acl",
[ [
eventPerms.dataset.allow_cid, JSON.parse(eventPerms.dataset.allow_cid),
eventPerms.dataset.allow_gid, JSON.parse(eventPerms.dataset.allow_gid),
eventPerms.dataset.deny_cid, JSON.parse(eventPerms.dataset.deny_cid),
eventPerms.dataset.deny_gid JSON.parse(eventPerms.dataset.deny_gid)
] ]
); );
} acl.get(0, 100);
}); });
// Load the html of the actual event and incect the output to the // Load the html of the actual event and incect the output to the