mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-03 14:16:23 +00:00
See ChangeLog.
Monotone-Parent: 870459b5cd89f38f2c5d579fccb19dba58515f8b Monotone-Revision: 4d8fb1ed0734fbcfd6dc4e68194b48101ac46567 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-01-30T19:59:05
This commit is contained in:
@@ -1,12 +1,44 @@
|
||||
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
function onUpdateACL(event) {
|
||||
if ($('uid').value == 'anyone') {
|
||||
var inputs = $$('#userRightsForm input[type="checkbox"]');
|
||||
var enabled = false;
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
if (inputs[i].checked) {
|
||||
enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (enabled) {
|
||||
showConfirmDialog(_("Confirmation"), _("Are you sure you want to give rights to all authenticated users?"),
|
||||
onUpdateACLConfirm, onUpdateACLCancel,
|
||||
"Give Access", "Keep Private");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return onUpdateACLConfirm(event);
|
||||
}
|
||||
|
||||
function onUpdateACLConfirm(event) {
|
||||
disposeDialog();
|
||||
|
||||
$('userRightsForm').submit();
|
||||
Event.stop(event);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onUpdateACLCancel(event) {
|
||||
var inputs = $$('#userRightsForm input[type="checkbox"]');
|
||||
for (var i = 0; i < inputs.length; i++)
|
||||
if (inputs[i].checked)
|
||||
inputs[i].checked = false;
|
||||
|
||||
disposeDialog();
|
||||
}
|
||||
|
||||
function onCancelACL(event) {
|
||||
window.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user