From 2fccf08c324d14de9e95c35eb2028686a9310d96 Mon Sep 17 00:00:00 2001 From: "Richard Mathot (OpenERP)" Date: Mon, 9 Dec 2013 14:03:26 +0100 Subject: [PATCH] [IMP] Added modal when AJAX submission fails .. note:: modal is rendered by QWeb so translation should be OK bzr revid: rim@openerp.com-20131209130326-4ib589zrzsoz4qlm --- addons/survey/static/src/js/survey.js | 3 +-- addons/survey/views/survey_templates.xml | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/addons/survey/static/src/js/survey.js b/addons/survey/static/src/js/survey.js index 7b069a4908c..699f2990f16 100644 --- a/addons/survey/static/src/js/survey.js +++ b/addons/survey/static/src/js/survey.js @@ -94,7 +94,7 @@ $(document).ready(function () { }, timeout: 5000, error: function(jqXHR, textStatus, errorThrown){ // failure of AJAX request - alert("Something went wrong while contacting survey server. Your answers have probably not been recorded. Try refreshing.\n" + errorThrown); + $('#AJAXErrorModal').modal('show'); } }); @@ -105,5 +105,4 @@ $(document).ready(function () { }); console.debug("[survey] Custom JS for survey loaded!"); - }); diff --git a/addons/survey/views/survey_templates.xml b/addons/survey/views/survey_templates.xml index 971006e8cd3..fa57efa8f19 100644 --- a/addons/survey/views/survey_templates.xml +++ b/addons/survey/views/survey_templates.xml @@ -120,6 +120,21 @@ + + + +