From af4a225b390c83fa5777af4c7c07471a8a3556d1 Mon Sep 17 00:00:00 2001 From: Seven Du Date: Sat, 15 Mar 2014 00:04:56 +0800 Subject: [PATCH] simple code to add a gateway --- htdocs/portal/assets/js/fsportal.js | 12 ++++++++--- htdocs/portal/index.html | 33 +++++++++++++++++------------ 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/htdocs/portal/assets/js/fsportal.js b/htdocs/portal/assets/js/fsportal.js index cb1e0349b0..0a84184da1 100644 --- a/htdocs/portal/assets/js/fsportal.js +++ b/htdocs/portal/assets/js/fsportal.js @@ -851,9 +851,15 @@ App.SofiaStatusController = Ember.ObjectController.extend({ actions: { //Submit the modal submit: function() { - alert("Not implemented"); - return false; - $.post("/txtapi/lua?create_gw.lua%20" + $("#gateway_name").val(), { + // alert("Not implemented"); + // return false; + url = "/txtapi/lua?create_gateway.lua%20" + + $("#gateway_name").val() + "%20" + + $("#gateway_realm").val() + "%20" + + $("#gateway_username").val() + "%20" + + $("#gateway_password").val() + "%20" + + $("#gateway_register").is(":checked"); + $.post(url, { success: function() { }, error: function(e) { } }); diff --git a/htdocs/portal/index.html b/htdocs/portal/index.html index c3102b5764..77db574741 100644 --- a/htdocs/portal/index.html +++ b/htdocs/portal/index.html @@ -643,30 +643,37 @@ {{#bs-modal name="newUserForm" fade="true" footerButtonsBinding="addGatewayButtons" title="Add Gateway"}} -
- -
- +
+
+ +
+
- -
- + +
+
- -
- + +
+
- -
- + +
+
+
+ + +
+ + {{/bs-modal}}

Sofia Status