Merge branch 'ent-5675-Textos-del-sistema-de-licencias' into 'develop'

Ent 5675 textos del sistema de licencias

See merge request artica/pandorafms!3169
This commit is contained in:
Daniel Rodriguez 2020-05-12 12:54:20 +02:00
commit f0fd40fcca
3 changed files with 60 additions and 35 deletions

View File

@ -752,25 +752,41 @@ class ConsoleSupervisor
// Expiry. // Expiry.
if (($days_to_expiry <= 15) && ($days_to_expiry > 0)) { if (($days_to_expiry <= 15) && ($days_to_expiry > 0)) {
if ($config['license_mode'] == 1) {
$title = __('License is about to expire');
$msg = 'Your license will expire in %d days. Please, contact our sales department.';
} else {
$title = __('Support is about to expire');
$msg = 'Your support license will expire in %d days. Please, contact our sales department.';
}
// Warn user if license is going to expire in 15 days or less. // Warn user if license is going to expire in 15 days or less.
$this->notify( $this->notify(
[ [
'type' => 'NOTIF.LICENSE.EXPIRATION', 'type' => 'NOTIF.LICENSE.EXPIRATION',
'title' => __('License is about to expire'), 'title' => $title,
'message' => __( 'message' => __(
'Your license will expire in %d days. Please, contact our sales department.', $msg,
$days_to_expiry $days_to_expiry
), ),
'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/license'), 'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/license'),
] ]
); );
} else if ($days_to_expiry < 0) { } else if ($days_to_expiry < 0) {
if ($config['license_mode'] == 1) {
$title = __('Expired license');
$msg = __('Your license has expired. Please, contact our sales department.');
} else {
$title = __('Support expired');
$msg = __('This license is outside of support. Please, contact our sales department.');
}
// Warn user, license has expired. // Warn user, license has expired.
$this->notify( $this->notify(
[ [
'type' => 'NOTIF.LICENSE.EXPIRATION', 'type' => 'NOTIF.LICENSE.EXPIRATION',
'title' => __('Expired license'), 'title' => $title,
'message' => __('Your license has expired. Please, contact our sales department.'), 'message' => $msg,
'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/license'), 'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/license'),
] ]
); );

View File

@ -3947,7 +3947,7 @@ function get_copyright_notice()
{ {
$stored_name = enterprise_hook('enterprise_get_copyright_notice'); $stored_name = enterprise_hook('enterprise_get_copyright_notice');
if (empty($stored_name) || $stored_name == ENTERPRISE_NOT_HOOK) { if (empty($stored_name) || $stored_name == ENTERPRISE_NOT_HOOK) {
return 'Ártica ST'; return 'PandoraFMS.com';
} }
return $stored_name; return $stored_name;

View File

@ -45,7 +45,7 @@ $(document).ready(function() {
jQuery.post( jQuery.post(
"ajax.php", "ajax.php",
{ {
page: "operation/messages/message_list" page: "operation/messages/message_list",
}, },
function(data, status) { function(data, status) {
$("#dialog_messages") $("#dialog_messages")
@ -58,10 +58,10 @@ $(document).ready(function() {
modal: true, modal: true,
overlay: { overlay: {
opacity: 0.5, opacity: 0.5,
background: "black" background: "black",
}, },
width: 700, width: 700,
height: 300 height: 300,
}) })
.show(); .show();
}, },
@ -80,7 +80,7 @@ $(document).ready(function() {
jQuery.post( jQuery.post(
"ajax.php", "ajax.php",
{ {
page: "operation/system_alert" page: "operation/system_alert",
}, },
function(data, status) { function(data, status) {
$("#alert_messages").show(); $("#alert_messages").show();
@ -104,7 +104,7 @@ $(document).ready(function() {
"ajax.php", "ajax.php",
{ {
page: "general/alert_enterprise", page: "general/alert_enterprise",
message: elem message: elem,
}, },
function(data, status) { function(data, status) {
$("#alert_messages").show(); $("#alert_messages").show();
@ -130,7 +130,7 @@ $(document).ready(function() {
"ajax.php", "ajax.php",
{ {
page: "general/alert_enterprise", page: "general/alert_enterprise",
message: elem message: elem,
}, },
function(data, status) { function(data, status) {
$("#alert_messages").show(); $("#alert_messages").show();
@ -155,7 +155,7 @@ $(document).ready(function() {
"ajax.php", "ajax.php",
{ {
page: "general/alert_enterprise", page: "general/alert_enterprise",
message: elem message: elem,
}, },
function(data, status) { function(data, status) {
$("#alert_messages").show(); $("#alert_messages").show();
@ -174,6 +174,11 @@ $(document).ready(function() {
if (typeof show_error_license == "undefined") show_error_license = 0; if (typeof show_error_license == "undefined") show_error_license = 0;
if (typeof hide_counter == "undefined") hide_counter = 0;
let height = 300;
if (typeof invalid_license != "undefined") height = 350;
if (process_login_ok || show_error_license) { if (process_login_ok || show_error_license) {
$("#license_error_msg_dialog").dialog({ $("#license_error_msg_dialog").dialog({
dialogClass: "no-close", dialogClass: "no-close",
@ -181,29 +186,33 @@ $(document).ready(function() {
resizable: false, resizable: false,
draggable: true, draggable: true,
modal: true, modal: true,
height: 470, height: height,
width: 850, width: 850,
overlay: { overlay: {
opacity: 0.5, opacity: 0.5,
background: "black" background: "black",
}, },
open: function() { open: function() {
var remaining = 30; if (hide_counter != 1) {
var remaining = 30;
// Timeout counter. // Timeout counter.
var count = function() { var count = function() {
if (remaining > 0) { if (remaining > 0) {
$("#license_error_remaining").text(remaining); $("#license_error_remaining").text(remaining);
remaining -= 1; remaining -= 1;
} else { } else {
$("#license_error_remaining").hide(); $("#license_error_remaining").hide();
$("#ok_buttom").show(); $("#ok_buttom").show();
clearInterval(count); clearInterval(count);
} }
}; };
setInterval(count, 1000); setInterval(count, 1000);
} } else {
$("#ok_buttom").show();
}
},
}); });
$("#submit-hide-license-error-msg").click(function() { $("#submit-hide-license-error-msg").click(function() {
@ -221,8 +230,8 @@ $(document).ready(function() {
width: 620, width: 620,
overlay: { overlay: {
opacity: 0.5, opacity: 0.5,
background: "black" background: "black",
} },
}); });
} }
@ -235,8 +244,8 @@ $(document).ready(function() {
width: 520, width: 520,
overlay: { overlay: {
opacity: 0.5, opacity: 0.5,
background: "black" background: "black",
} },
}); });
} }
@ -249,8 +258,8 @@ $(document).ready(function() {
width: 520, width: 520,
overlay: { overlay: {
opacity: 0.5, opacity: 0.5,
background: "black" background: "black",
} },
}); });
} }
@ -318,7 +327,7 @@ $(document).ready(function() {
left: left:
+parseInt(screen.width / 2) - +parseInt(screen.width / 2) -
parseInt($("#alert_messages").css("width")) / 2 + parseInt($("#alert_messages").css("width")) / 2 +
"px" "px",
}); });
}); });