summaryrefslogtreecommitdiff
path: root/addons/survey/static/src/js/survey.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/survey/static/src/js/survey.js')
-rw-r--r--addons/survey/static/src/js/survey.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/addons/survey/static/src/js/survey.js b/addons/survey/static/src/js/survey.js
index d7092902f34..1f12c6ad2a6 100644
--- a/addons/survey/static/src/js/survey.js
+++ b/addons/survey/static/src/js/survey.js
@@ -129,6 +129,15 @@ if(!the_form.length) {
}
}
+ $('.o_survey_header .breadcrumb-item a').each(function() {
+ var $valObj = $(this);
+ $valObj.click(function(event) {
+ event.preventDefault();
+ $('<input>').attr({type: 'hidden', name: 'breadcrumb_redirect', value: $valObj.attr('href')}).appendTo('.js_surveyform');
+ $('.js_surveyform').submit();
+ });
+ });
+
// Parameters for form submission
$('.js_surveyform').ajaxForm({
url: submit_controller,
@@ -232,5 +241,4 @@ if(!the_form.length) {
display_scores();
}
});
-
});