summaryrefslogtreecommitdiffstats
path: root/admin/js/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'admin/js/users.js')
-rw-r--r--admin/js/users.js101
1 files changed, 101 insertions, 0 deletions
diff --git a/admin/js/users.js b/admin/js/users.js
new file mode 100644
index 00000000000..6d59a2efb7c
--- /dev/null
+++ b/admin/js/users.js
@@ -0,0 +1,101 @@
+$(document).ready(function(){
+ // Dialog for adding users
+ $( "#adduser-form" ).dialog({
+ autoOpen: false,
+ height: 300,
+ width: 350,
+ modal: true,
+ buttons: {
+ "Create an account": function() {
+ $( this ).dialog( "close" );
+ },
+ Cancel: function() {
+ $( this ).dialog( "close" );
+ }
+ },
+ close: function() {
+ allFields.val( "" ).removeClass( "ui-state-error" );
+ }
+ });
+
+ $( "#adduser-button" )
+ .click(function() {
+ $( "#adduser-form" ).dialog( "open" );
+ return false;
+ });
+
+ // Dialog for adding users
+ $( "#edituser-form" ).dialog({
+ autoOpen: false,
+ height: 300,
+ width: 350,
+ modal: true,
+ buttons: {
+ "Edit password": function() {
+ $( this ).dialog( "close" );
+ },
+ Cancel: function() {
+ $( this ).dialog( "close" );
+ }
+ },
+ close: function() {
+ allFields.val( "" ).removeClass( "ui-state-error" );
+ }
+ });
+
+ $( ".edituser-button" )
+ .click(function() {
+ $( "#edituser-form" ).dialog( "open" );
+ return false;
+ });
+
+ // Dialog for adding users
+ $( "#removeuser-form" ).dialog({
+ autoOpen: false,
+ height: 300,
+ width: 350,
+ modal: true,
+ buttons: {
+ "Remove user": function() {
+ $( this ).dialog( "close" );
+ },
+ Cancel: function() {
+ $( this ).dialog( "close" );
+ }
+ },
+ close: function() {
+ allFields.val( "" ).removeClass( "ui-state-error" );
+ }
+ });
+
+ $( ".removeuser-button" )
+ .click(function() {
+ $( "#removeuser-form" ).dialog( "open" );
+ return false;
+ });
+
+ // Dialog for adding users
+ $( "#removegroup-form" ).dialog({
+ autoOpen: false,
+ height: 300,
+ width: 350,
+ modal: true,
+ buttons: {
+ "Remove group": function() {
+ $( this ).dialog( "close" );
+ },
+ Cancel: function() {
+ $( this ).dialog( "close" );
+ }
+ },
+ close: function() {
+ allFields.val( "" ).removeClass( "ui-state-error" );
+ }
+ });
+
+ $( ".removegroup-button" )
+ .click(function() {
+ $( "#removegroup-form" ).dialog( "open" );
+ return false;
+ });
+} );