diff options
-rw-r--r-- | index.html | 3 | ||||
-rw-r--r-- | js/codeq/settings.js | 6 |
2 files changed, 6 insertions, 3 deletions
@@ -88,7 +88,6 @@ </div> </div> -<!--TODO --> <!-- login screen --> <div class="container" id="screen_login" style="display: none;"> <div class="row"> @@ -416,7 +415,7 @@ <div class="form-group"> <div class="text-right"> <button type="button" class="btn btn-default" id="settings_cancel_btn">Close</button> - <input type="submit" class="btn btn-primary" id="settings_save_btn" value="Save"/> + <input form="settingsForm" type="submit" class="btn btn-primary" id="settings_save_btn" value="Save"/> </div> </div> </form> diff --git a/js/codeq/settings.js b/js/codeq/settings.js index 8207c3f..5b57c49 100644 --- a/js/codeq/settings.js +++ b/js/codeq/settings.js @@ -22,9 +22,13 @@ if (data.code !== 0) { throw new Error('Updating settings failed, code: ' + data.code + ', message: ' + data.message); } + history.back(); + }) + .fail(function(reason){ + codeq.log.error('Settings update failed: ' + reason); + alert('Settings update failed: ' + reason); }) .done(); - history.back(); e.preventDefault(); }); jqSettCancelBtn.on("click",function(){ |