mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Added message 'Please, select an agent first'
This commit is contained in:
parent
060e46868d
commit
14afe2ff88
@ -385,6 +385,9 @@ echo '</form>';
|
|||||||
echo '<h3 class="error invisible" id="message"> </h3>';
|
echo '<h3 class="error invisible" id="message"> </h3>';
|
||||||
|
|
||||||
ui_require_jquery_file ('form');
|
ui_require_jquery_file ('form');
|
||||||
|
//Hack to translate text "none" in PHP to javascript
|
||||||
|
echo '<span id ="none_text" style="display: none;">' . __('None') . '</span>';
|
||||||
|
echo '<span id ="select_agent_first_text" style="display: none;">' . __('Please, select an agent first') . '</span>';
|
||||||
ui_require_jquery_file ('pandora.controls');
|
ui_require_jquery_file ('pandora.controls');
|
||||||
|
|
||||||
if ($selection_mode == 'modules') {
|
if ($selection_mode == 'modules') {
|
||||||
|
@ -709,6 +709,7 @@ echo '</form>';
|
|||||||
echo '<h3 class="error invisible" id="message"> </h3>';
|
echo '<h3 class="error invisible" id="message"> </h3>';
|
||||||
//Hack to translate text "none" in PHP to javascript
|
//Hack to translate text "none" in PHP to javascript
|
||||||
echo '<span id ="none_text" style="display: none;">' . __('None') . '</span>';
|
echo '<span id ="none_text" style="display: none;">' . __('None') . '</span>';
|
||||||
|
echo '<span id ="select_agent_first_text" style="display: none;">' . __('Please, select an agent first') . '</span>';
|
||||||
ui_require_jquery_file ('pandora.controls');
|
ui_require_jquery_file ('pandora.controls');
|
||||||
|
|
||||||
if ($selection_mode == 'modules') {
|
if ($selection_mode == 'modules') {
|
||||||
|
@ -189,8 +189,10 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
|
|||||||
$('#module').empty ();
|
$('#module').empty ();
|
||||||
|
|
||||||
if (isEmptyObject(data)) {
|
if (isEmptyObject(data)) {
|
||||||
var noneText = $("#none_text").html(); //Trick for catch the translate text.
|
//Trick for catch the translate text.
|
||||||
|
var noneText = $("#id_agents").val() === null
|
||||||
|
? $("#select_agent_first_text").html()
|
||||||
|
: $("#none_text").html();
|
||||||
if (noneText == null) {
|
if (noneText == null) {
|
||||||
noneText = 'None';
|
noneText = 'None';
|
||||||
}
|
}
|
||||||
|
@ -340,6 +340,11 @@ if (is_ajax ()) {
|
|||||||
'tmetaconsole_setup', 'id', $id_server);
|
'tmetaconsole_setup', 'id', $id_server);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($idAgents[0])) {
|
||||||
|
echo json_encode(array());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$filter = '1 = 1';
|
$filter = '1 = 1';
|
||||||
|
|
||||||
$all = (string)get_parameter('all', 'all');
|
$all = (string)get_parameter('all', 'all');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user