diff options
author | Simon Rettberg | 2016-09-07 19:13:24 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-09-07 19:13:24 +0200 |
commit | 78c2407ba64007256f61328e2c58daa3bd49cd97 (patch) | |
tree | f2f05b1794a83e9c59782cf5b615fab0a3072feb /modules-available/roomplanner/js | |
parent | [sysconfig] Confirm dialog for deletion; show success message after deleting ... (diff) | |
download | slx-admin-78c2407ba64007256f61328e2c58daa3bd49cd97.tar.gz slx-admin-78c2407ba64007256f61328e2c58daa3bd49cd97.tar.xz slx-admin-78c2407ba64007256f61328e2c58daa3bd49cd97.zip |
[roomplanner] Add managerip field, move mgr/tutor fields to location_roomplanner table, add to install.inc.php
Diffstat (limited to 'modules-available/roomplanner/js')
-rw-r--r-- | modules-available/roomplanner/js/init.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules-available/roomplanner/js/init.js b/modules-available/roomplanner/js/init.js index 67090cc2..83f94390 100644 --- a/modules-available/roomplanner/js/init.js +++ b/modules-available/roomplanner/js/init.js @@ -21,13 +21,18 @@ function initRoomplanner() { }); $("#saveBtn").click(function() { + var managerip = $('#manager-ip').val().trim(); + if (managerip.length !== 0 && !(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(managerip))) { + alert('Invalid IP address format'); + return; + } $('#saveBtn').prop('disabled', true); $('#error-msg').hide(); $('#success-msg').hide(); $('#saving-msg').show(); var serializedCurrent = roomplanner.serialize(); $.post('?do=roomplanner&locationid=' + locationId, - { token: TOKEN, action: 'save', serializedRoom: serializedCurrent } + { token: TOKEN, action: 'save', serializedRoom: serializedCurrent, managerip: managerip } ).done(function ( data ) { if (data.indexOf('SUCCESS') !== -1) { window.close(); |