mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
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:
commit
edd76aa959
@ -577,28 +577,34 @@ function confirmDialog(settings) {
|
|||||||
*/
|
*/
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
function generalShowMsg(data, idMsg) {
|
function generalShowMsg(data, idMsg) {
|
||||||
var title = "Response";
|
var title = data.title[data.error];
|
||||||
var text = data;
|
var text = data.text[data.error];
|
||||||
var failed = false;
|
var failed = !data.error;
|
||||||
|
|
||||||
if (typeof data == "object") {
|
if (typeof data.error != "number") {
|
||||||
title = data.title || "Response";
|
title = "Response";
|
||||||
text = data.text || data.error || data.result;
|
text = data;
|
||||||
failed = failed || data.error;
|
failed = false;
|
||||||
}
|
|
||||||
|
|
||||||
if (failed) {
|
if (typeof data == "object") {
|
||||||
title = "Error";
|
title = data.title || "Response";
|
||||||
text = data.error;
|
text = data.text || data.error || data.result;
|
||||||
}
|
failed = data.failed || data.error;
|
||||||
|
}
|
||||||
|
|
||||||
if (idMsg == null) {
|
if (failed) {
|
||||||
idMsg = uniqId();
|
title = "Error";
|
||||||
}
|
text = data.error;
|
||||||
|
}
|
||||||
|
|
||||||
if ($("#" + idMsg).length === 0) {
|
if (idMsg == null) {
|
||||||
$("body").append('<div title="' + title + '" id="' + idMsg + '"></div>');
|
idMsg = uniqId();
|
||||||
$("#" + idMsg).empty();
|
}
|
||||||
|
|
||||||
|
if ($("#" + idMsg).length === 0) {
|
||||||
|
$("body").append('<div title="' + title + '" id="' + idMsg + '"></div>');
|
||||||
|
$("#" + idMsg).empty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#" + idMsg).empty();
|
$("#" + idMsg).empty();
|
||||||
|
@ -6038,7 +6038,6 @@ form#modal_form_feedback input[type="email"] {
|
|||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
font-weight: lighter;
|
|
||||||
padding: 0px 0px 2px 0px;
|
padding: 0px 0px 2px 0px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user