mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Added tags select field
This commit is contained in:
parent
5e2a65d6b8
commit
1361ecd2e9
@ -303,6 +303,13 @@ $table->data['form_modules_3'][1] = html_print_select($status_list,
|
|||||||
'status_module', 'selected', '', __('All'), AGENT_MODULE_STATUS_ALL, true);
|
'status_module', 'selected', '', __('All'), AGENT_MODULE_STATUS_ALL, true);
|
||||||
$table->data['form_modules_3'][3] = '';
|
$table->data['form_modules_3'][3] = '';
|
||||||
|
|
||||||
|
$tags = tags_get_user_tags();
|
||||||
|
$table->rowstyle['form_modules_4'] = 'vertical-align: top;';
|
||||||
|
$table->rowclass['form_modules_4'] = 'select_modules_row select_modules_row_2';
|
||||||
|
$table->data['form_modules_4'][0] = __('Tags');
|
||||||
|
$table->data['form_modules_4'][1] = html_print_select ($tags, 'tags[]',
|
||||||
|
$tags_name, false, __('Any'), -1, true, true, true);
|
||||||
|
|
||||||
$table->rowstyle['form_modules_2'] = 'vertical-align: top;';
|
$table->rowstyle['form_modules_2'] = 'vertical-align: top;';
|
||||||
$table->rowclass['form_modules_2'] = 'select_modules_row select_modules_row_2';
|
$table->rowclass['form_modules_2'] = 'select_modules_row select_modules_row_2';
|
||||||
$table->data['form_modules_2'][0] = __('Modules');
|
$table->data['form_modules_2'][0] = __('Modules');
|
||||||
@ -662,8 +669,10 @@ $(document).ready (function () {
|
|||||||
|
|
||||||
clean_lists();
|
clean_lists();
|
||||||
|
|
||||||
|
|
||||||
$(".select_modules_row").css('display', '<?php echo $modules_row?>');
|
$(".select_modules_row").css('display', '<?php echo $modules_row?>');
|
||||||
$(".select_agents_row").css('display', '<?php echo $agents_row?>');
|
$(".select_agents_row").css('display', '<?php echo $agents_row?>');
|
||||||
|
$(".select_modules_row_2").css('display', 'none');
|
||||||
|
|
||||||
// Trigger change to refresh selection when change selection mode
|
// Trigger change to refresh selection when change selection mode
|
||||||
$("#agents_selection_mode").change (function() {
|
$("#agents_selection_mode").change (function() {
|
||||||
@ -721,6 +730,13 @@ $(document).ready (function () {
|
|||||||
if (status_module != '-1')
|
if (status_module != '-1')
|
||||||
params['status_module'] = status_module;
|
params['status_module'] = status_module;
|
||||||
|
|
||||||
|
var tags_to_search = $('#tags').val();
|
||||||
|
if (tags_to_search != null) {
|
||||||
|
if (tags_to_search[0] != -1) {
|
||||||
|
params['tags'] = tags_to_search;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$("#module_loading").show ();
|
$("#module_loading").show ();
|
||||||
$("tr#delete_table-edit1, tr#delete_table-edit0, tr#delete_table-edit2").hide ();
|
$("tr#delete_table-edit1, tr#delete_table-edit0, tr#delete_table-edit2").hide ();
|
||||||
$("#module_name").attr ("disabled", "disabled")
|
$("#module_name").attr ("disabled", "disabled")
|
||||||
@ -926,6 +942,7 @@ $(document).ready (function () {
|
|||||||
else if(selector == 'modules') {
|
else if(selector == 'modules') {
|
||||||
$(".select_agents_row").hide();
|
$(".select_agents_row").hide();
|
||||||
$(".select_modules_row").show();
|
$(".select_modules_row").show();
|
||||||
|
$("#module_type").trigger("change");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1041,6 +1058,16 @@ $(document).ready (function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#tags").change(function() {
|
||||||
|
|
||||||
|
selector = $("#form_edit input[name=selection_mode]:checked").val();
|
||||||
|
if(selector == 'agents') {
|
||||||
|
$("#id_agents").trigger("change");
|
||||||
|
}
|
||||||
|
else if(selector == 'modules') {
|
||||||
|
$("#module_type").trigger("change");
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function disabled_status () {
|
function disabled_status () {
|
||||||
|
@ -550,6 +550,8 @@ if (is_ajax ()) {
|
|||||||
$id_tipo_modulo = (int) get_parameter ('id_tipo_modulo', 0);
|
$id_tipo_modulo = (int) get_parameter ('id_tipo_modulo', 0);
|
||||||
$status_modulo = (int) get_parameter ('status_module', -1);
|
$status_modulo = (int) get_parameter ('status_module', -1);
|
||||||
|
|
||||||
|
$tags = (array) get_parameter ('tags', array());
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
$filter = array();
|
$filter = array();
|
||||||
if ($disabled !== -1)
|
if ($disabled !== -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user