Merge branch 'ent-8591-envio-de-feedback-no-funciona' into 'develop'

Fix error/success from send feedback dialog

See merge request artica/pandorafms!4713
This commit is contained in:
Daniel Rodriguez 2022-03-10 13:53:40 +00:00
commit edd76aa959
2 changed files with 24 additions and 19 deletions

View File

@ -577,28 +577,34 @@ function confirmDialog(settings) {
*/
// eslint-disable-next-line no-unused-vars
function generalShowMsg(data, idMsg) {
var title = "Response";
var text = data;
var failed = false;
var title = data.title[data.error];
var text = data.text[data.error];
var failed = !data.error;
if (typeof data == "object") {
title = data.title || "Response";
text = data.text || data.error || data.result;
failed = failed || data.error;
}
if (typeof data.error != "number") {
title = "Response";
text = data;
failed = false;
if (failed) {
title = "Error";
text = data.error;
}
if (typeof data == "object") {
title = data.title || "Response";
text = data.text || data.error || data.result;
failed = data.failed || data.error;
}
if (idMsg == null) {
idMsg = uniqId();
}
if (failed) {
title = "Error";
text = data.error;
}
if ($("#" + idMsg).length === 0) {
$("body").append('<div title="' + title + '" id="' + idMsg + '"></div>');
$("#" + idMsg).empty();
if (idMsg == null) {
idMsg = uniqId();
}
if ($("#" + idMsg).length === 0) {
$("body").append('<div title="' + title + '" id="' + idMsg + '"></div>');
$("#" + idMsg).empty();
}
}
$("#" + idMsg).empty();

View File

@ -6038,7 +6038,6 @@ form#modal_form_feedback input[type="email"] {
border: none;
border-radius: 0;
border-bottom: 1px solid #ccc;
font-weight: lighter;
padding: 0px 0px 2px 0px;
box-sizing: border-box;
margin-bottom: 4px;