Info message when there are no responses

pull/1/head
yflory 4 years ago
parent c4f7f9d55e
commit c63e6a4f32

@ -1734,11 +1734,18 @@ define([
var renderResults = function (content, answers) { var renderResults = function (content, answers) {
var $container = $('div.cp-form-creator-results').empty(); var $container = $('div.cp-form-creator-results').empty();
if (!Object.keys(answers || {}).length) {
$container.append(h('div.alert.alert-info', Messages.form_results_empty));
return;
}
var controls = h('div.cp-form-creator-results-controls'); var controls = h('div.cp-form-creator-results-controls');
var $controls = $(controls).appendTo($container); var $controls = $(controls).appendTo($container);
var results = h('div.cp-form-creator-results-content'); var results = h('div.cp-form-creator-results-content');
var $results = $(results).appendTo($container); var $results = $(results).appendTo($container);
var summary = true; var summary = true;
var form = content.form; var form = content.form;

Loading…
Cancel
Save