diff options
author | Vinzenz <vinzenz.rosenkranz@gmail.com> | 2016-11-16 02:08:15 +0300 |
---|---|---|
committer | Vinzenz <vinzenz.rosenkranz@gmail.com> | 2016-11-16 02:08:15 +0300 |
commit | bf4f8dbab4ed1ba71274503c7cecff1803fa28b8 (patch) | |
tree | 111f065289641f83d83b5bedd09b9dc22b8cdbac /js | |
parent | b3817fa39b0741178f8abc81ef8d04d6bf55469b (diff) |
add extended anon type, replace username with random id
Diffstat (limited to 'js')
-rw-r--r-- | js/create_edit.js | 10 |
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(); } } |