Adjust "response message" button and dialog

pull/1/head
David Benqué 3 years ago
parent ad50be0308
commit 663e7fbf1d

@ -3129,9 +3129,9 @@ define([
var $responseMsg = $(responseMsg); var $responseMsg = $(responseMsg);
var refreshResponse = function () { var refreshResponse = function () {
$responseMsg.empty(); $responseMsg.empty();
Messages.form_updateMsg = "Update response message"; // XXX 4.11.0 Messages.form_updateMsg = "Update submit message"; // XXX 4.11.0
Messages.form_addMsg = "Add response message"; // XXX 4.11.0 Messages.form_addMsg = "Add submit message"; // XXX 4.11.0
Messages.form_responseMsg = "Add a message that will be displayed in the response page."; // XXX 4.11.0 Messages.form_responseMsg = "Add a message that will be displayed after participants submit the form."; // XXX 4.11.0
var text = content.answers.msg ? Messages.form_updateMsg : Messages.form_addMsg; var text = content.answers.msg ? Messages.form_updateMsg : Messages.form_addMsg;
var btn = h('button.btn.btn-secondary', text); var btn = h('button.btn.btn-secondary', text);
$(btn).click(function () { $(btn).click(function () {
@ -3167,6 +3167,12 @@ define([
}); });
var buttons = [{ var buttons = [{
className: 'cancel',
name: Messages.cancel,
onClick: function () {},
keys: [27]
},
{
className: 'primary', className: 'primary',
name: Messages.settings_save, name: Messages.settings_save,
onClick: function () { onClick: function () {
@ -3179,11 +3185,6 @@ define([
}); });
}, },
//keys: [] //keys: []
}, {
className: 'cancel',
name: Messages.cancel,
onClick: function () {},
keys: [27]
}]; }];
APP.responseModal = UI.dialog.customModal(div, { buttons: buttons }); APP.responseModal = UI.dialog.customModal(div, { buttons: buttons });
} else { } else {

Loading…
Cancel
Save