Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorVinzenz <vinzenz.rosenkranz@gmail.com>2016-11-16 02:08:15 +0300
committerVinzenz <vinzenz.rosenkranz@gmail.com>2016-11-16 02:08:15 +0300
commitbf4f8dbab4ed1ba71274503c7cecff1803fa28b8 (patch)
tree111f065289641f83d83b5bedd09b9dc22b8cdbac /js
parentb3817fa39b0741178f8abc81ef8d04d6bf55469b (diff)
add extended anon type, replace username with random id
Diffstat (limited to 'js')
-rw-r--r--js/create_edit.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/create_edit.js b/js/create_edit.js
index 97e72cb0..f6d40089 100644
--- a/js/create_edit.js
+++ b/js/create_edit.js
@@ -5,6 +5,7 @@ var g_chosen_users = [];
var chosen_type = 'event';
var access_type = '';
var isAnonymous;
+var hideNames;
$(document).ready(function () {
// enable / disable date picker
@@ -15,8 +16,15 @@ $(document).ready(function () {
}
});
+ var anonOptions = document.getElementById('anonOptions');
+ $('#hideNames').click(function() {
+ hideNames = this.checked;
+ });
+
$('#isAnonymous').click(function() {
isAnonymous = this.checked;
+ if(isAnonymous) anonOptions.style.display = 'inline';
+ else anonOptions.style.display = 'none';
});
var privateRadio = document.getElementById('private');
@@ -29,6 +37,7 @@ $(document).ready(function () {
if(selectRadio.checked) access_type = 'select';
isAnonymous = document.getElementById('isAnonymous').checked;
+ hideNames = anonOptions.checked;
var accessValues = document.getElementById('accessValues');
if(accessValues.value.length > 0) {
@@ -373,6 +382,7 @@ $(document).ready(function () {
});
}
form.elements['isAnonymous'].value = isAnonymous;
+ form.elements['hideNames'].value = hideNames;
form.submit();
}
}