From 9ea1ab90b4705ef4d5ce37ded36a214f276c0a18 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 31 Mar 2013 18:32:13 +0200 Subject: add and delete accounts, db will be resetted --- module/web/static/js/views/accounts/accountModal.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'module/web/static/js/views/accounts/accountModal.js') diff --git a/module/web/static/js/views/accounts/accountModal.js b/module/web/static/js/views/accounts/accountModal.js index 898b10a89..755ffd510 100644 --- a/module/web/static/js/views/accounts/accountModal.js +++ b/module/web/static/js/views/accounts/accountModal.js @@ -52,8 +52,17 @@ define(['jquery', 'underscore', 'app', 'views/abstract/modalView', 'text!tpl/def add: function(e) { e.stopPropagation(); if (this.select) { - var plugin = this.select.val(); - // TODO + var plugin = this.select.val(), + login = this.$('#login').val(), + password = this.$('#password').val(), + self = this; + + $.ajax(App.apiRequest('updateAccount', { + plugin: plugin, login: login, password: password + }, { success: function() { + App.accountView.refresh(); + self.hide(); + }})); } } }); -- cgit v1.2.3