Merge branch 'ent-5822-prueba-concepto-modal-selector-de-grupos' into 'develop'

Group selection improvement

See merge request artica/pandorafms!3450
This commit is contained in:
Daniel Rodriguez 2020-10-05 13:11:23 +02:00
commit e403c781ea
102 changed files with 1042 additions and 303 deletions

View File

@ -92,7 +92,9 @@ function mainAgentsAlerts()
$groups = users_get_groups(); $groups = users_get_groups();
$filter_groups .= '<b>'.__('Group').'</b>'; $filter_groups .= '<b>'.__('Group').'</b>';
$filter_groups .= '<div class="w250px inline margin-left-2">';
$filter_groups .= html_print_select_groups(false, 'AR', true, 'group_id', $group_id, false, '', '', true, false, true, '', false, 'margin-right: 10px; margin-top: 5px;'); $filter_groups .= html_print_select_groups(false, 'AR', true, 'group_id', $group_id, false, '', '', true, false, true, '', false, 'margin-right: 10px; margin-top: 5px;');
$filter_groups .= '</div>';
$check = '<b>'.__('Show modules without alerts').'</b>'; $check = '<b>'.__('Show modules without alerts').'</b>';
$check .= html_print_checkbox('slides_ids[]', $d['id'], $show_modules, true, false, '', true); $check .= html_print_checkbox('slides_ids[]', $d['id'], $show_modules, true, false, '', true);

View File

@ -389,8 +389,8 @@ function mainAgentsModules()
$filter_groups_label = '<b>'.__('Group').'</b>'; $filter_groups_label = '<b>'.__('Group').'</b>';
$filter_groups = html_print_select_groups(false, 'AR', true, 'group_id', $group_id, '', '', '', true, false, true, '', false, 'width: auto;'); $filter_groups = html_print_select_groups(false, 'AR', true, 'group_id', $group_id, '', '', '', true, false, true, '', false, 'width: auto;');
$filter_recursion_label = '<b>'.__('Recursion').'</b>'; $filter_recursion_label = '</td><td><b>'.__('Recursion').'</b>';
$filter_recursion = html_print_checkbox('recursion', 1, 0, true); $filter_recursion = html_print_checkbox('recursion', 1, 0, true).'</td>';
// Groups module. // Groups module.
$filter_module_groups_label = '<b>'.__('Module group').'</b>'; $filter_module_groups_label = '<b>'.__('Module group').'</b>';
$filter_module_groups = html_print_select_from_sql( $filter_module_groups = html_print_select_from_sql(

View File

@ -53,7 +53,28 @@ foreach ($groups as $id => $name) {
$row = []; $row = [];
$row[0] = __('Groups'); $row[0] = __('Groups');
$row[1] = html_print_select($groups, 'groups[]', $groups_selected, '', '', '', true, true, '', '', ''); $row[1] = '<div class="w290px">'.html_print_select_groups(
// Id_user.
false,
// Privilege.
'AR',
// ReturnAllGroup.
true,
// Name.
'groups[]',
// Selected.
$groups_selected,
// Script.
'',
// Nothing.
'',
// Nothing_value.
0,
// Return.
true,
// Multiple.
true
).'</div>';
$table->data[] = $row; $table->data[] = $row;
$table->colspan[][1] = 3; $table->colspan[][1] = 3;

View File

@ -322,7 +322,16 @@ $table_primary_group = '<div class="label_select"><p class="input_label">'.__('P
$table_primary_group .= '<div class="label_select_parent">'; $table_primary_group .= '<div class="label_select_parent">';
// Cannot change primary group if user have not permission for that group. // Cannot change primary group if user have not permission for that group.
if (isset($groups[$grupo]) || $new_agent) { if (isset($groups[$grupo]) || $new_agent) {
$table_primary_group .= html_print_select_groups(false, 'AR', false, 'grupo', $grupo, '', '', 0, true); $table_primary_group .= html_print_input(
[
'type' => 'select_groups',
'returnAllGroup' => false,
'name' => 'grupo',
'selected' => $grupo,
'return' => true,
'required' => true,
]
);
} else { } else {
$table_primary_group .= groups_get_name($grupo); $table_primary_group .= groups_get_name($grupo);
$table_primary_group .= html_print_input_hidden('grupo', $grupo, true); $table_primary_group .= html_print_input_hidden('grupo', $grupo, true);
@ -424,44 +433,66 @@ if (enterprise_installed()) {
$secondary_groups_selected = enterprise_hook('agents_get_secondary_groups', [$id_agente]); $secondary_groups_selected = enterprise_hook('agents_get_secondary_groups', [$id_agente]);
$adv_secondary_groups_label = '<div class="label_select"><p class="input_label">'.__('Secondary groups').'</p></div>'; $adv_secondary_groups_label = '<div class="label_select"><p class="input_label">'.__('Secondary groups').'</p></div>';
$adv_secondary_groups_left = html_print_select_groups( $adv_secondary_groups_left = html_print_select_groups(
false, // Id_user.
// Use the current user to select the groups. // Use the current user to select the groups.
'AR',
// ACL permission.
false, false,
// Privilege.
// ACL permission.
'AR',
// ReturnAllGroup.
// Not all group. // Not all group.
'secondary_groups', false,
// Name.
// HTML id. // HTML id.
'', 'secondary_groups',
// Selected.
// No select any by default. // No select any by default.
'', '',
// Script.
// Javascript onChange code. // Javascript onChange code.
'', '',
// Nothing.
// Do not user no selected value. // Do not user no selected value.
0, false,
// Nothing_value.
// Do not use no selected value. // Do not use no selected value.
true, 0,
// Return.
// Return HTML (not echo). // Return HTML (not echo).
true, true,
// Multiple.
// Multiple selection. // Multiple selection.
true, true,
// Sort.
// Sorting by default. // Sorting by default.
'', true,
// Class.
// CSS classnames (default). // CSS classnames (default).
false, '',
// Disabled.
// Not disabled (default). // Not disabled (default).
'min-width:170px;',
// Inline styles (default).
false, false,
// Style.
// Inline styles (default).
'min-width:170px;',
// Option_style.
// Option style select (default). // Option style select (default).
false, false,
// Id_group.
// Do not truncate the users tree (default). // Do not truncate the users tree (default).
'id_grupo',
// Key to get as value (default).
false, false,
// Keys_field.
// Key to get as value (default).
'id_grupo',
// Strict_user.
// Not strict user (default). // Not strict user (default).
$secondary_groups_selected['plain'] false,
// Delete_groups.
// Do not show the primary group in this selection. // Do not show the primary group in this selection.
array_merge($secondary_groups_selected['plain'], [$agent['id_grupo']])
// Include_groups.
// Size.
// Simple_multiple_options.
); );
$adv_secondary_groups_arrows = html_print_input_image( $adv_secondary_groups_arrows = html_print_input_image(
@ -489,30 +520,30 @@ if (enterprise_installed()) {
); );
$adv_secondary_groups_right .= html_print_select( $adv_secondary_groups_right .= html_print_select(
$secondary_groups_selected['for_select'],
// Values. // Values.
'secondary_groups_selected', $secondary_groups_selected['for_select'],
// HTML id. // HTML id.
'', 'secondary_groups_selected',
// Selected. // Selected.
'', '',
// Javascript onChange code. // Javascript onChange code.
'', '',
// Nothing selected. // Nothing selected.
0, false,
// Nothing selected. // Nothing selected.
true, 0,
// Return HTML (not echo). // Return HTML (not echo).
true, true,
// Multiple selection. // Multiple selection.
true, true,
// Sort. // Sort.
'', true,
// Class. // Class.
false, '',
// Disabled. // Disabled.
'min-width:170px;' false,
// Style. // Style.
'min-width:170px;'
); );
// Safe operation mode. // Safe operation mode.

View File

@ -173,8 +173,9 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AR') && !check_
$return_all_group = true; $return_all_group = true;
} }
echo '<div class="w250px inline">';
html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false); html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false);
echo '</div>';
echo '<td>'; echo '<td>';
echo __('Show Agents').'&nbsp;'; echo __('Show Agents').'&nbsp;';
$fields = [ $fields = [

View File

@ -645,7 +645,7 @@ $table->data[0][1] = html_print_input_text(
$disabled_in_execution $disabled_in_execution
); );
$table->data[1][0] = __('Group'); $table->data[1][0] = __('Group');
$table->data[1][1] = html_print_select_groups( $table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
false, false,
$access, $access,
true, true,
@ -659,7 +659,7 @@ $table->data[1][1] = html_print_select_groups(
true, true,
'', '',
$disabled_in_execution $disabled_in_execution
); ).'</div>';
$table->data[2][0] = __('Description'); $table->data[2][0] = __('Description');
$table->data[2][1] = html_print_textarea( $table->data[2][1] = html_print_textarea(
'description', 'description',

View File

@ -296,7 +296,9 @@ if (!users_can_manage_group_all('LM')) {
$can_manage_group_all = true; $can_manage_group_all = true;
} }
echo '<div class="inline w250px">';
html_print_select_groups(false, 'LM', $can_manage_group_all, 'id_group', $id_group, false, '', 0, false, false, true, '', false, 'width:100px;'); html_print_select_groups(false, 'LM', $can_manage_group_all, 'id_group', $id_group, false, '', 0, false, false, true, '', false, 'width:100px;');
echo '</div>';
echo '</td><td>'; echo '</td><td>';
echo __('Overwrite'); echo __('Overwrite');
ui_print_help_tip(__('Check this box, if you want to overwrite existing same days.'), false); ui_print_help_tip(__('Check this box, if you want to overwrite existing same days.'), false);

View File

@ -168,7 +168,7 @@ $table->data[1][0] = __('Group');
$own_info = get_user_info($config['id_user']); $own_info = get_user_info($config['id_user']);
$table->data[1][1] = html_print_select_groups( $table->data[1][1] = '<div class="w250px inline">'.html_print_select_groups(
false, false,
'LW', 'LW',
true, true,
@ -182,7 +182,7 @@ $table->data[1][1] = html_print_select_groups(
true, true,
'', '',
$is_central_policies_on_node $is_central_policies_on_node
); ).'</div>';
$table->colspan[1][1] = 2; $table->colspan[1][1] = 2;
$table->data[2][0] = __('Command'); $table->data[2][0] = __('Command');

View File

@ -218,7 +218,7 @@ $table->data['command'][1] = html_print_textarea(
$table->colspan['group'][1] = 3; $table->colspan['group'][1] = 3;
$table->data['group'][0] = __('Group'); $table->data['group'][0] = __('Group');
$table->data['group'][1] = html_print_select_groups( $table->data['group'][1] = '<div class="w250px inline">'.html_print_select_groups(
false, false,
'LM', 'LM',
true, true,
@ -232,7 +232,7 @@ $table->data['group'][1] = html_print_select_groups(
true, true,
'', '',
$is_central_policies_on_node $is_central_policies_on_node
); ).'</div>';
$table->colspan['description'][1] = 3; $table->colspan['description'][1] = 3;
$table->data['description'][0] = __('Description'); $table->data['description'][0] = __('Description');

View File

@ -1099,7 +1099,7 @@ if ($step == 2) {
} }
$table->data[0][1] .= '&nbsp;'; $table->data[0][1] .= '&nbsp;';
$table->data[0][1] .= html_print_select_groups( $table->data[0][1] .= '<div class="w250px inline">'.html_print_select_groups(
false, false,
'AR', 'AR',
$display_all_group, $display_all_group,
@ -1113,7 +1113,7 @@ if ($step == 2) {
true, true,
'', '',
$is_central_policies_on_node $is_central_policies_on_node
); ).'</div>';
$table->data[1][0] = __('Description'); $table->data[1][0] = __('Description');

View File

@ -241,7 +241,7 @@ if ($returnAllGroup === false && $id_group_filter == 0) {
$returnAllGroup = true; $returnAllGroup = true;
} }
$table->data[1][1] = html_print_select_groups( $table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'], $config['id_user'],
$access, $access,
$returnAllGroup, $returnAllGroup,
@ -260,21 +260,21 @@ $table->data[1][1] = html_print_select_groups(
false, false,
'id_grupo', 'id_grupo',
$strict_user $strict_user
); ).'</div>';
$table->data[2][0] = '<b>'.__('Group').'</b>'; $table->data[2][0] = '<b>'.__('Group').'</b>';
$display_all_group = (users_is_admin() || users_can_manage_group_all('AR')); $display_all_group = (users_is_admin() || users_can_manage_group_all('AR'));
$table->data[2][1] = html_print_select_groups( $table->data[2][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'], $config['id_user'],
'AR', 'AR',
$display_all_group, $display_all_group,
'id_group', 'id_group',
$idGroup, $id_group,
'', '',
'', '',
'', '',
true true
); ).'</div>';
$types = get_event_types(); $types = get_event_types();
// Expand standard array to add not_normal (not exist in the array, used only for searches) // Expand standard array to add not_normal (not exist in the array, used only for searches)

View File

@ -145,7 +145,8 @@ if ($id_group) {
$table->data[2][1] = __('You have not access to the parent.').html_print_input_hidden('id_parent', $id_parent, true); $table->data[2][1] = __('You have not access to the parent.').html_print_input_hidden('id_parent', $id_parent, true);
} else { } else {
$table->data[2][1] = html_print_select_groups( $table->data[2][1] = '<div class="w250px inline">';
$table->data[2][1] .= html_print_select_groups(
false, false,
'AR', 'AR',
true, true,
@ -163,9 +164,12 @@ if ($id_group) {
false, false,
$id_group $id_group
); );
$table->data[2][1] .= '</div>';
} }
} else { } else {
$table->data[2][1] = html_print_select_groups(false, 'AR', true, 'id_parent', $id_parent, '', '', '', true); $table->data[2][1] = '<div class="w250px inline">';
$table->data[2][1] .= html_print_select_groups(false, 'AR', true, 'id_parent', $id_parent, '', '', '', true);
$table->data[2][1] .= '</div>';
} }
if ($acl_parent) { if ($acl_parent) {

View File

@ -222,12 +222,14 @@ if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) {
} }
echo "<td style='width: 12%;'><b>".__('Group').'</b></td><td>'; echo "<td style='width: 12%;'><b>".__('Group').'</b></td><td>';
echo '<div class="w250px">';
if ($id_container === '1') { if ($id_container === '1') {
echo html_print_select_groups($config['id_user'], '', $return_all_groups, 'container_id_group', $id_group, '', '', '', true, false, true, '', true); echo html_print_select_groups($config['id_user'], '', $return_all_groups, 'container_id_group', $id_group, '', '', '', true, false, true, '', true);
} else { } else {
echo html_print_select_groups($config['id_user'], '', $return_all_groups, 'container_id_group', $id_group, '', '', '', true, false, true, '', false); echo html_print_select_groups($config['id_user'], '', $return_all_groups, 'container_id_group', $id_group, '', '', '', true, false, true, '', false);
} }
echo '</div>';
echo '</td></tr>'; echo '</td></tr>';
echo '<tr>'; echo '<tr>';
@ -500,7 +502,7 @@ if ($edit_container) {
$data = []; $data = [];
$data[0] = __('Group'); $data[0] = __('Group');
$data[1] = html_print_select_groups($config['id_user'], 'RW', $return_all_groups, 'container_id_group', $id_group, '', '', '', true); $data[1] = '<div class="w250px">'.html_print_select_groups($config['id_user'], 'RW', $return_all_groups, 'container_id_group', $id_group, '', '', '', true).'</div>';
$table->data[] = $data; $table->data[] = $data;
$table->rowclass[] = ''; $table->rowclass[] = '';

View File

@ -307,8 +307,9 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'VR')) {
$return_all_group = true; $return_all_group = true;
} }
echo '<div class="w250px inline">';
html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false); html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false);
echo '</div>';
echo "<td style='width:25%;'>"; echo "<td style='width:25%;'>";
echo __('Group Recursion').'&nbsp;'; echo __('Group Recursion').'&nbsp;';
html_print_checkbox('recursion', 1, $recursion, false, false, 'this.form.submit()'); html_print_checkbox('recursion', 1, $recursion, false, false, 'this.form.submit()');

View File

@ -1264,6 +1264,7 @@ $class = 'databox filters';
<td style="font-weight:bold;"><?php echo __('Group'); ?></td> <td style="font-weight:bold;"><?php echo __('Group'); ?></td>
<td style=""> <td style="">
<?php <?php
echo '<div class="w250px inline padding-right-2-imp">';
if (check_acl($config['id_user'], 0, 'RW')) { if (check_acl($config['id_user'], 0, 'RW')) {
html_print_select_groups( html_print_select_groups(
$config['id_user'], $config['id_user'],
@ -1284,6 +1285,8 @@ $class = 'databox filters';
); );
} }
echo '</div>';
echo '&nbsp;&nbsp;&nbsp;'.__('Recursion').'&nbsp;&nbsp;&nbsp;'.html_print_checkbox_switch( echo '&nbsp;&nbsp;&nbsp;'.__('Recursion').'&nbsp;&nbsp;&nbsp;'.html_print_checkbox_switch(
'recursion', 'recursion',
1, 1,

View File

@ -92,17 +92,7 @@ $table->data['group'][0] = __('Group');
$write_groups = users_get_groups_for_select(false, 'AR', true, true, false, 'id_grupo'); $write_groups = users_get_groups_for_select(false, 'AR', true, true, false, 'id_grupo');
html_print_select_groups(
$config['id_user'],
'AR',
true,
'id_group',
$idGroup,
'',
'',
'',
true
);
// If the report group is not among the RW groups (special permission) we add it // If the report group is not among the RW groups (special permission) we add it
@ -110,17 +100,19 @@ $write_groups = users_get_groups_for_select(false, 'AR', true, true, false, 'id_
$write_groups[$idGroupReport] = groups_get_name($idGroupReport); $write_groups[$idGroupReport] = groups_get_name($idGroupReport);
} }
$table->data['group'][1] = html_print_select( $table->data['group'][1] = '<div class="w290px inline">';
$write_groups, $table->data['group'][1] .= html_print_select_groups(
$config['id_user'],
'AR',
true,
'id_group', 'id_group',
$idGroupReport, $idGroupReport,
false,
'', '',
'', '',
true, '',
false, true
false
); );
$table->data['group'][1] .= '</div>';
if ($report_id_user == $config['id_user'] if ($report_id_user == $config['id_user']
|| is_user_admin($config['id_user']) || is_user_admin($config['id_user'])
@ -147,8 +139,9 @@ $write_groups = users_get_groups_for_select(false, 'AR', true, true, false, 'id_
$style = ''; $style = '';
} }
$table->data['access'][1] .= '<span style="'.$style.'" class="access_subform" id="group_edit"> $table->data['access'][1] .= '<span style="'.$style.'" class="access_subform" id="group_edit">';
'.html_print_select_groups( $table->data['access'][1] .= '<div class="w290px inline">';
$table->data['access'][1] .= html_print_select_groups(
false, false,
'RW', 'RW',
false, false,
@ -158,8 +151,9 @@ $write_groups = users_get_groups_for_select(false, 'AR', true, true, false, 'id_
'', '',
'', '',
true true
).' );
</span>'; $table->data['access'][1] .= '</div>';
$table->data['access'][1] .= '</span>';
} }
if ($enterpriseEnable) { if ($enterpriseEnable) {
@ -200,14 +194,11 @@ $write_groups = users_get_groups_for_select(false, 'AR', true, true, false, 'id_
<script type="text/javascript"> <script type="text/javascript">
function change_type_access(select_item) { function change_type_access(select_item) {
$(".access_subform").hide(); $(".access_subform").hide();
switch ($(select_item).val()) { if ($(select_item).val() == "group_edit") {
case 'group_view': $("#group_edit").show()
break; } else {
case 'group_edit': $("#group_edit").hide()
$("#group_edit").show();
break;
case 'user_edit':
break;
} }
} }
</script> </script>

View File

@ -136,7 +136,7 @@ if ($action == 'new') {
$table->data[1][0] = __('Group:'); $table->data[1][0] = __('Group:');
$table->data[1][1] = html_print_select_groups( $table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'], $config['id_user'],
'RW', 'RW',
true, true,
@ -146,7 +146,7 @@ $table->data[1][1] = html_print_select_groups(
'', '',
'', '',
true true
); ).'</div>';
$backgrounds_list = list_files( $backgrounds_list = list_files(
$config['homedir'].'/images/console/background/', $config['homedir'].'/images/console/background/',
'jpg', 'jpg',

View File

@ -381,7 +381,7 @@ if (is_metaconsole()) {
$table->rowstyle['all_3'] = 'display: none;'; $table->rowstyle['all_3'] = 'display: none;';
$table->data['all_3'][0] = __('Groups'); $table->data['all_3'][0] = __('Groups');
$table->colspan['all_3'][1] = '3'; $table->colspan['all_3'][1] = '3';
$table->data['all_3'][1] = html_print_select_groups( $table->data['all_3'][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'], $config['id_user'],
'AR', 'AR',
true, true,
@ -391,7 +391,7 @@ $table->data['all_3'][1] = html_print_select_groups(
'', '',
0, 0,
true true
); ).'</div>';
$table->rowstyle['all_one_item_per_agent'] = 'display: none'; $table->rowstyle['all_one_item_per_agent'] = 'display: none';

View File

@ -176,7 +176,9 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
$data[0] .= '<input type="text" name="subject" size="35" value="'.$subject.'">'; $data[0] .= '<input type="text" name="subject" size="35" value="'.$subject.'">';
$data[1] = __('Group').'<br>'; $data[1] = __('Group').'<br>';
$data[1] .= '<div class="w250px">';
$data[1] .= html_print_select_groups($config['id_user'], 'ER', users_can_manage_group_all(), 'id_group', $id_group, '', '', 0, true, false, false, ''); $data[1] .= html_print_select_groups($config['id_user'], 'ER', users_can_manage_group_all(), 'id_group', $id_group, '', '', 0, true, false, false, '');
$data[1] .= '</div>';
$data[2] = __('Modal screen').'<br>'; $data[2] = __('Modal screen').'<br>';
$data[2] .= html_print_checkbox_extended('modal', 1, $modal, false, '', 'style="margin-top: 5px;margin-bottom: 7px;"', true); $data[2] .= html_print_checkbox_extended('modal', 1, $modal, false, '', 'style="margin-top: 5px;margin-bottom: 7px;"', true);

View File

@ -776,6 +776,7 @@ if ($create_alert || $update_alert) {
// Group // Group
echo '<tr id="tr-group"><td class="datos2">'.__('Group').'</td><td class="datos2">'; echo '<tr id="tr-group"><td class="datos2">'.__('Group').'</td><td class="datos2">';
echo '<div class="w250px">';
html_print_select_groups( html_print_select_groups(
$config['id_user'], $config['id_user'],
'AR', 'AR',
@ -796,6 +797,7 @@ if ($create_alert || $update_alert) {
'id_grupo', 'id_grupo',
false false
); );
echo '</div>';
echo '</td></tr>'; echo '</td></tr>';
// Trap type // Trap type

View File

@ -934,7 +934,6 @@ class HostDevices extends Wizard
'selected' => $this->task['id_group'], 'selected' => $this->task['id_group'],
'return' => true, 'return' => true,
'class' => 'discovery_list_input', 'class' => 'discovery_list_input',
'size' => 9,
'simple_multiple_options' => true, 'simple_multiple_options' => true,
] ]
); );

View File

@ -0,0 +1,71 @@
<?php
/**
* Ajax secondary controller for groups.
*
* @category Ajax secondary controller page.
* @package Pandora FMS
* @subpackage Opensource
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
global $config;
use PandoraFMS\Group;
// Only logged users have access to this endpoint.
check_login();
if (! check_acl($config['id_user'], 0, 'AR')) {
db_pandora_audit(
'ACL Violation',
'Trying to access credential store'
);
if (is_ajax()) {
echo json_encode(['error' => 'noaccess']);
} else {
include 'general/noaccess.php';
}
exit;
}
// AJAX controller.
if (is_ajax()) {
$method = get_parameter('method');
if (method_exists('PandoraFMS\Group', $method) === true) {
if (Group::ajaxMethod($method) === true) {
Group::{$method}();
} else {
Group::error('Unavailable method.');
}
} else {
Group::error('Method not found. ['.$method.']');
}
// Stop any execution.
exit;
} else {
// Run.
$cs->run();
}

View File

@ -766,16 +766,15 @@ class CredentialStore extends Wizard
'inputs' => [ 'inputs' => [
[ [
'label' => __('Group'), 'label' => __('Group'),
'type' => 'select', 'type' => 'select_groups',
'id' => 'filter_id_group', 'id' => 'filter_id_group',
'name' => 'filter_id_group', 'name' => 'filter_id_group',
'options' => users_get_groups_for_select( 'privilege' => 'AR',
$config['id_user'], 'type' => 'select_groups',
'AR', 'nothing' => false,
true, 'selected' => (defined($id_group_filter) ? $id_group_filter : 0),
true, 'return' => true,
false 'size' => '80%',
),
], ],
[ [
'label' => __('Free search'), 'label' => __('Free search'),
@ -856,6 +855,7 @@ class CredentialStore extends Wizard
'id' => 'id_group', 'id' => 'id_group',
'input_class' => 'flex-row', 'input_class' => 'flex-row',
'type' => 'select_groups', 'type' => 'select_groups',
'returnAllGroup' => true,
'selected' => $values['id_group'], 'selected' => $values['id_group'],
'return' => true, 'return' => true,
'class' => 'w50p', 'class' => 'w50p',

View File

@ -504,6 +504,7 @@ class CustomNetScan extends Wizard
'type' => 'select_groups', 'type' => 'select_groups',
'selected' => $this->task['id_group'], 'selected' => $this->task['id_group'],
'return' => true, 'return' => true,
'size' => '400px',
], ],
]; ];

View File

@ -341,7 +341,7 @@ function groups_get_children($parent, $ignorePropagate=false)
/** /**
* XXX: This is not working. Expects 'propagate' on CHILD not on PARENT!!! * @deprecated This is not working. Expects 'propagate' on CHILD not on PARENT!!!
* *
* Return a array of id_group of childrens (to branches down) * Return a array of id_group of childrens (to branches down)
* *
@ -575,15 +575,19 @@ function groups_get_id_recursive($id_parent, $all=false)
function groups_flatten_tree_groups($tree, $deep) function groups_flatten_tree_groups($tree, $deep)
{ {
if (is_array($tree) === true) {
foreach ($tree as $key => $group) { foreach ($tree as $key => $group) {
$return[$key] = $group; $return[$key] = $group;
unset($return[$key]['branch']); unset($return[$key]['branch']);
$return[$key]['deep'] = $deep; $return[$key]['deep'] = $deep;
if (!empty($group['branch'])) { if (empty($group['branch']) === false) {
$return = ($return + groups_flatten_tree_groups($group['branch'], ($deep + 1))); $return = ($return + groups_flatten_tree_groups($group['branch'], ($deep + 1)));
} }
} }
} else {
$return = [];
}
return $return; return $return;
} }
@ -618,7 +622,7 @@ function groups_get_groups_tree_recursive($groups, $trash=0, $trash2=0)
$tree[$group['parent']]['branch'][$key] = &$tree[$key]; $tree[$group['parent']]['branch'][$key] = &$tree[$key];
} }
// Depends on the All group we give different format // Depends on the All group we give different format.
if (isset($groups[0])) { if (isset($groups[0])) {
$tree = [$tree[0]]; $tree = [$tree[0]];
} else { } else {

View File

@ -410,25 +410,32 @@ function html_print_select_style($fields, $name, $selected='', $style='', $scrip
/** /**
* Prints the groups of user of fields in a popup menu of a form. * Print or return selector for groups.
* *
* @param string User id * @param string $id_user User id.
* @param string The privilege to evaluate * @param string $privilege The privilege to evaluate.
* @param boolean $returnAllGroup Flag the return group, by default true. * @param boolean $returnAllGroup Flag the return group, (true).
* @param boolean $returnAllColumns Flag to return all columns of groups. * @param boolean $name Name of input field.
* @param array Array with dropdown values. Example: $fields["value"] = "label" * @param array $selected Array with dropdown values. Example:
* @param string Select form name * $fields["value"] = "label".
* @param variant Current selected value. Can be a single value or an * @param string $script Javascript onChange code.
* array of selected values (in combination with multiple) * @param mixed $nothing Label when nothing is selected.
* @param string Javascript onChange code. * @param array $nothing_value Value when nothing is selected.
* @param string Label when nothing is selected. * @param string $return Return string or dump to output.
* @param variant Value when nothing is selected * @param boolean $multiple Enable multiple select.
* @param bool Whether to return an output string or echo now (optional, echo by default). * @param mixed $sort Sort values or not (default false).
* @param bool Set the input to allow multiple selections (optional, single selection by default). * @param boolean $class CSS classes to apply.
* @param bool Whether to sort the options or not (optional, unsorted by default). * @param boolean $disabled Disabled or enabled.
* @param string $style The string of style. * @param boolean $style CSS inline style.
* @param integer $id_group The id of node that must do not show the children and own. * @param string $option_style CSS inline style in array format.
* @param string $keys_field The field of the group used in the array keys. By default ID * @param array $id_group Groups to be manually added.
* @param string $keys_field Field to be used as array key, (id).
* @param boolean $strict_user Strict.
* @param array $delete_groups Remove groups from select.
* @param array $include_groups Add groups to select.
* @param string $size Style, size (width) of element.
* @param boolean $simple_multiple_options Discovery simple multiple inputs.
* @param boolean $required Required input.
* *
* @return string HTML code if return parameter is true. * @return string HTML code if return parameter is true.
*/ */
@ -436,14 +443,14 @@ function html_print_select_groups(
$id_user=false, $id_user=false,
$privilege='AR', $privilege='AR',
$returnAllGroup=true, $returnAllGroup=true,
$name, $name=null,
$selected='', $selected='',
$script='', $script='',
$nothing='', $nothing='',
$nothing_value=0, $nothing_value=0,
$return=false, $return=false,
$multiple=false, $multiple=false,
$sort=true, $sort=false,
$class='', $class='',
$disabled=false, $disabled=false,
$style=false, $style=false,
@ -454,39 +461,68 @@ function html_print_select_groups(
$delete_groups=false, $delete_groups=false,
$include_groups=false, $include_groups=false,
$size=false, $size=false,
$simple_multiple_options=false $simple_multiple_options=false,
$required=false
) { ) {
global $config; $output = '';
$fields = users_get_groups_for_select( if (is_ajax()) {
$id_user, $output .= '<script src="';
$privilege, $output .= ui_get_full_url(
$returnAllGroup, 'include/javascript/select2.min.js',
true, false,
$id_group, false,
$keys_field false
); );
$output .= '" type="text/javascript"></script>';
if ($delete_groups && is_array($delete_groups)) { $output .= '<link rel="stylesheet" href="';
foreach ($delete_groups as $value) { $output .= ui_get_full_url(
unset($fields[$value]); 'include/styles/select2.min.css',
false,
false,
false
);
$output .= '"/>';
} else {
ui_require_css_file('select2.min');
ui_require_javascript_file('select2.min');
}
if ($name === null) {
static $idcounter = [];
if (isset($idcounter[$name]) === true) {
$idcounter[$name]++;
} else {
$idcounter[$name] = 0;
}
$name = 'group_select'.$idcounter[$name];
}
$fields = [];
// Preload selector.
if (is_array($selected) === false) {
if (empty($selected) === false) {
$fields = [ $selected => groups_get_name($selected) ];
} else if ($returnAllGroup === true && $multiple === false) {
$fields = [ $selected => groups_get_name(null, true) ];
}
} else {
foreach ($selected as $k) {
$fields[$k] = groups_get_name($k);
} }
} }
if (is_array($include_groups)) { if (is_array($delete_groups) === true) {
$field = []; $json_exclusions = json_encode($delete_groups);
foreach ($include_groups as $value) {
$field[$value] = $fields[$value];
} }
$fields = array_intersect($fields, $field); if (is_array($include_groups) === true) {
$json_inclusions = json_encode($include_groups);
} }
if ($strict_user) { $output .= html_print_select(
$fields = users_get_strict_mode_groups($config['id_user'], $returnAllGroup);
}
$output = html_print_select(
$fields, $fields,
$name, $name,
$selected, $selected,
@ -495,7 +531,7 @@ function html_print_select_groups(
$nothing_value, $nothing_value,
$return, $return,
$multiple, $multiple,
false, $sort,
$class, $class,
$disabled, $disabled,
$style, $style,
@ -504,9 +540,82 @@ function html_print_select_groups(
false, false,
'', '',
false, false,
$simple_multiple_options $simple_multiple_options,
$required
); );
if (empty($size) === true) {
$size = '100%';
}
ob_start();
?>
<style type="text/css">
.select2-search__field {
background: url('<?php echo ui_get_full_url('images/zoom.png'); ?>') no-repeat;
background-position: right 10px center;
background-size: 1em;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('select[name="<?php echo $name; ?>"]').each(
function() {
$(this).select2({
multiple: <?php echo ($multiple) ? 'true' : 'false'; ?>,
placeholder: "<?php echo __('Please select...'); ?>",
debug: 0,
width: '<?php echo $size; ?>',
templateResult: function(node) {
if (!node.id) {
return node.text;
}
return $('<span style="padding-left:' + (5 * node.level) + 'px;">' + node.text + '</span>');
},
ajax: {
delay: 500,
method: 'post',
url: '<?php echo ui_get_full_url('ajax.php'); ?>',
dataType: 'json',
data: function (params) {
var query = {
search: params.term,
page: 'include/ajax/group',
method: 'getGroupsForSelect',
id_user: '<?php echo $id_user; ?>',
privilege: '<?php echo $privilege; ?>',
exclusions: '<?php echo $json_exclusions; ?>',
inclusions: '<?php echo $json_inclusions; ?>',
step: params.page || 1,
strict: "<?php echo $strict_user; ?>",
returnAllGroup: <?php echo (int) $returnAllGroup; ?>
}
return query;
}
}
});
}
);
<?php
if (empty($fields) === true) {
?>
$('select[name="<?php echo $name; ?>"]').val(null).trigger("change");
$('select[name="<?php echo $name; ?>"] option[value=""]').each(function() {
$(this).remove();
});
<?php
}
?>
});
</script>
<?php
$output .= ob_get_clean();
if ($return) { if ($return) {
return $output; return $output;
} else { } else {
@ -553,7 +662,8 @@ function html_print_select(
$modal=false, $modal=false,
$message='', $message='',
$select_all=false, $select_all=false,
$simple_multiple_options=false $simple_multiple_options=false,
$required=false
) { ) {
$output = "\n"; $output = "\n";
@ -603,7 +713,11 @@ function html_print_select(
$styleText = 'style="'.$style.'"'; $styleText = 'style="'.$style.'"';
} }
$output .= '<select id="'.$id.'" name="'.$name.'"'.$attributes.' '.$styleText.'>'; if ($required) {
$required = 'required';
}
$output .= '<select '.$required.' id="'.$id.'" name="'.$name.'"'.$attributes.' '.$styleText.'>';
if ($nothing !== false) { if ($nothing !== false) {
if ($nothing != '' || empty($fields)) { if ($nothing != '' || empty($fields)) {
@ -4271,7 +4385,8 @@ function html_print_input($data, $wrapper='div', $input_only=false)
((isset($data['delete_groups']) === true) ? $data['delete_groups'] : false), ((isset($data['delete_groups']) === true) ? $data['delete_groups'] : false),
((isset($data['include_groups']) === true) ? $data['include_groups'] : false), ((isset($data['include_groups']) === true) ? $data['include_groups'] : false),
((isset($data['size']) === true) ? $data['size'] : false), ((isset($data['size']) === true) ? $data['size'] : false),
((isset($data['simple_multiple_options']) === true) ? $data['simple_multiple_options'] : false) ((isset($data['simple_multiple_options']) === true) ? $data['simple_multiple_options'] : false),
((isset($data['required']) === true) ? $data['required'] : false)
); );
break; break;

View File

@ -323,7 +323,7 @@ function profile_print_profile_table($id)
$data['group'] = html_print_select_groups( $data['group'] = html_print_select_groups(
$config['id_user'], $config['id_user'],
'UM', 'UM',
users_is_admin($config['id_user']), users_can_manage_group_all('UM'),
'assign_group', 'assign_group',
-1, -1,
'', '',

View File

@ -116,17 +116,30 @@ function users_get_all_model_groups()
* *
* @return array A list of the groups the user has certain privileges. * @return array A list of the groups the user has certain privileges.
*/ */
function users_get_groups_for_select($id_user, $privilege='AR', $returnAllGroup=true, $returnAllColumns=false, $id_groups=null, $keys_field='id_grupo') function users_get_groups_for_select(
{ $id_user,
$privilege='AR',
$returnAllGroup=true,
$returnAllColumns=false,
$id_groups=null,
$keys_field='id_grupo',
$ajax_format=false
) {
if ($id_groups === false) { if ($id_groups === false) {
$id_groups = null; $id_groups = null;
} }
$user_groups = users_get_groups($id_user, $privilege, $returnAllGroup, $returnAllColumns, null); $user_groups = users_get_groups(
$id_user,
$privilege,
$returnAllGroup,
$returnAllColumns,
null
);
if ($id_groups !== null) { if ($id_groups !== null) {
$childrens = groups_get_childrens($id_groups); $children = groups_get_children($id_groups);
foreach ($childrens as $child) { foreach ($children as $child) {
unset($user_groups[$child['id_grupo']]); unset($user_groups[$child['id_grupo']]);
} }
@ -136,7 +149,7 @@ function users_get_groups_for_select($id_user, $privilege='AR', $returnAllGroup=
if (empty($user_groups)) { if (empty($user_groups)) {
$user_groups_tree = []; $user_groups_tree = [];
} else { } else {
// First group it's needed to retrieve its parent group // First group it's needed to retrieve its parent group.
$first_group = array_slice($user_groups, 0, 1); $first_group = array_slice($user_groups, 0, 1);
$first_group = reset($first_group); $first_group = reset($first_group);
$parent_group = $first_group['parent']; $parent_group = $first_group['parent'];
@ -149,13 +162,28 @@ function users_get_groups_for_select($id_user, $privilege='AR', $returnAllGroup=
foreach ($user_groups_tree as $group) { foreach ($user_groups_tree as $group) {
$groupName = ui_print_truncate_text($group['nombre'], GENERIC_SIZE_TEXT, false, true, false); $groupName = ui_print_truncate_text($group['nombre'], GENERIC_SIZE_TEXT, false, true, false);
if ($ajax_format === false) {
$fields[$group[$keys_field]] = str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;', $group['deep']).$groupName; $fields[$group[$keys_field]] = str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;', $group['deep']).$groupName;
} else {
$tmp['id'] = $group[$keys_field];
$tmp['text'] = io_safe_output($groupName);
$tmp['level'] = $group['deep'];
$fields[] = $tmp;
}
} }
return $fields; return $fields;
} }
/**
* Extract ancestors for given group.
*
* @param integer $group_id Target group.
* @param array $groups All groups.
*
* @return array
*/
function get_group_ancestors($group_id, $groups) function get_group_ancestors($group_id, $groups)
{ {
if ($group_id == 0) { if ($group_id == 0) {
@ -249,13 +277,14 @@ function groups_combine_acl($acl_group_a, $acl_group_b)
/** /**
* Get all the groups a user has reading privileges. * Get all the groups a user has reading privileges.
* *
* @param string $id_user User id * @param string $id_user User id.
* @param string $privilege The privilege to evaluate, and it is false then no check ACL. * @param string $privilege The privilege to evaluate, and it is false then no check ACL.
* @param boolean $returnAllGroup Flag the return group, by default true. * @param boolean $returnAllGroup Flag the return group, by default true.
* @param boolean $returnAllColumns Flag to return all columns of groups. * @param boolean $returnAllColumns Flag to return all columns of groups.
* @param array $id_groups The list of group to scan to bottom child. By default null. * @param array $id_groups The list of group to scan to bottom child. By default null.
* @param string $keys_field The field of the group used in the array keys. By default ID * @param string $keys_field The field of the group used in the array keys. By default ID.
* @param boolean $cache Set it to false to not use cache * @param boolean $cache Set it to false to not use cache.
* @param string $term Return only groups matching keyword '$term'.
* *
* @return array A list of the groups the user has certain privileges. * @return array A list of the groups the user has certain privileges.
*/ */
@ -266,13 +295,14 @@ function users_get_groups(
$returnAllColumns=false, $returnAllColumns=false,
$id_groups=null, $id_groups=null,
$keys_field='id_grupo', $keys_field='id_grupo',
$cache=true $cache=true,
$search=''
) { ) {
static $group_cache = []; static $group_cache = [];
// Added users_group_cache to avoid unnecessary proccess on massive calls... // Added users_group_cache to avoid unnecessary proccess on massive calls...
static $users_group_cache = []; static $users_group_cache = [];
$users_group_cache_key = $id_user.'|'.$privilege.'|'.$returnAllGroup.'|'.$returnAllColumns; $users_group_cache_key = $id_user.'|'.$privilege.'|'.$returnAllGroup.'|'.$returnAllColumns.'|'.$search;
if (empty($id_user)) { if (empty($id_user)) {
global $config; global $config;
@ -284,24 +314,45 @@ function users_get_groups(
} }
// Check the group cache first. // Check the group cache first.
if (array_key_exists($id_user, $group_cache) && $cache) { if (array_key_exists($users_group_cache_key, $group_cache) && $cache) {
$forest_acl = $group_cache[$id_user]; $forest_acl = $group_cache[$users_group_cache_key];
} else { } else {
// Admin. // Admin.
if (is_user_admin($id_user)) { if (is_user_admin($id_user)) {
$forest_acl = db_get_all_rows_sql('SELECT * FROM tgrupo ORDER BY nombre'); if (empty($search) === false) {
$filter = sprintf(
' WHERE lower(tgrupo.nombre) like lower("%%%s%%")',
$search
);
} }
$sql = sprintf(
'SELECT * FROM tgrupo %s ORDER BY nombre',
$filter
);
$forest_acl = db_get_all_rows_sql($sql);
}
// Per-group permissions. // Per-group permissions.
else { else {
$query = 'SELECT * FROM tgrupo ORDER BY nombre'; $query = 'SELECT * FROM tgrupo ORDER BY nombre';
$raw_groups = db_get_all_rows_sql($query); $raw_groups = db_get_all_rows_sql($query);
if (empty($search) === false) {
$filter = sprintf(
' AND lower(tgrupo.nombre) like lower("%%%s%%")',
$search
);
}
$query = sprintf( $query = sprintf(
"SELECT tgrupo.*, tperfil.*, tusuario_perfil.tags, tusuario_perfil.no_hierarchy FROM tgrupo, tusuario_perfil, tperfil "SELECT tgrupo.*, tperfil.*, tusuario_perfil.tags, tusuario_perfil.no_hierarchy FROM tgrupo, tusuario_perfil, tperfil
WHERE (tgrupo.id_grupo = tusuario_perfil.id_grupo OR tusuario_perfil.id_grupo = 0) WHERE (tgrupo.id_grupo = tusuario_perfil.id_grupo OR tusuario_perfil.id_grupo = 0)
AND tusuario_perfil.id_perfil = tperfil.id_perfil AND tusuario_perfil.id_perfil = tperfil.id_perfil
AND tusuario_perfil.id_usuario = '%s' ORDER BY nombre", AND tusuario_perfil.id_usuario = '%s' %s ORDER BY nombre",
$id_user $id_user,
$filter
); );
$raw_forest = db_get_all_rows_sql($query); $raw_forest = db_get_all_rows_sql($query);
if ($raw_forest === false) { if ($raw_forest === false) {
@ -309,7 +360,6 @@ function users_get_groups(
} }
foreach ($raw_forest as $g) { foreach ($raw_forest as $g) {
// XXX, following code must be remade (TAG)
users_get_explode_tags($g); users_get_explode_tags($g);
if (!isset($forest_acl[$g['id_grupo']])) { if (!isset($forest_acl[$g['id_grupo']])) {
@ -354,7 +404,7 @@ function users_get_groups(
} }
// Update the group cache. // Update the group cache.
$group_cache[$id_user] = $forest_acl; $group_cache[$users_group_cache_key] = $forest_acl;
} }
$user_groups = []; $user_groups = [];
@ -620,6 +670,13 @@ function users_get_strict_mode_groups($id_user, $return_group_all)
} }
/**
* Use carefully, it consumes a lot of memory.
*
* @param array $group Group array.
*
* @return void
*/
function users_get_explode_tags(&$group) function users_get_explode_tags(&$group)
{ {
if (empty($group['tags'])) { if (empty($group['tags'])) {

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Verwyders asseblief "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Voer asseblief "+(e.minimum-e.input.length)+" of meer karakters"},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var n="Kies asseblief net "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"},removeAllItems:function(){return"Verwyder alle items"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(n){return"الرجاء حذف "+(n.input.length-n.maximum)+" عناصر"},inputTooShort:function(n){return"الرجاء إضافة "+(n.minimum-n.input.length)+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(n){return"تستطيع إختيار "+n.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"},removeAllItems:function(){return"قم بإزالة كل العناصر"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/az",[],function(){return{inputTooLong:function(n){return n.input.length-n.maximum+" simvol silin"},inputTooShort:function(n){return n.minimum-n.input.length+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(n){return"Sadəcə "+n.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"},removeAllItems:function(){return"Bütün elementləri sil"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bg",[],function(){return{inputTooLong:function(n){var e=n.input.length-n.maximum,u="Моля въведете с "+e+" по-малко символ";return e>1&&(u+="a"),u},inputTooShort:function(n){var e=n.minimum-n.input.length,u="Моля въведете още "+e+" символ";return e>1&&(u+="a"),u},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(n){var e="Можете да направите до "+n.maximum+" ";return n.maximum>1?e+="избора":e+="избор",e},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"},removeAllItems:function(){return"Премахнете всички елементи"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bn",[],function(){return{errorLoading:function(){return"ফলাফলগুলি লোড করা যায়নি।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।";return 1!=e&&(u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।"),u},inputTooShort:function(n){return n.minimum-n.input.length+" টি অক্ষর অথবা অধিক অক্ষর লিখুন।"},loadingMore:function(){return"আরো ফলাফল লোড হচ্ছে ..."},maximumSelected:function(n){var e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।";return 1!=n.maximum&&(e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।"),e},noResults:function(){return"কোন ফলাফল পাওয়া যায়নি।"},searching:function(){return"অনুসন্ধান করা হচ্ছে ..."}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/bs",[],function(){function e(e,n,r,t){return e%10==1&&e%100!=11?n:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(n){var r=n.input.length-n.maximum,t="Obrišite "+r+" simbol";return t+=e(r,"","a","a")},inputTooShort:function(n){var r=n.minimum-n.input.length,t="Ukucajte bar još "+r+" simbol";return t+=e(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(n){var r="Možete izabrati samo "+n.maximum+" stavk";return r+=e(n.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Uklonite sve stavke"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Si us plau, elimina "+n+" car";return r+=1==n?"àcter":"àcters"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Si us plau, introdueix "+n+" car";return r+=1==n?"àcter":"àcters"},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var n="Només es pot seleccionar "+e.maximum+" element";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"},removeAllItems:function(){return"Treu tots els elements"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/cs",[],function(){function e(e,n){switch(e){case 2:return n?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadejte o jeden znak méně.":t<=4?"Prosím, zadejte o "+e(t,!0)+" znaky méně.":"Prosím, zadejte o "+t+" znaků méně."},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadejte ještě jeden znak.":t<=4?"Prosím, zadejte ještě další "+e(t,!0)+" znaky.":"Prosím, zadejte ještě dalších "+t+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(n){var t=n.maximum;return 1==t?"Můžete zvolit jen jednu položku.":t<=4?"Můžete zvolit maximálně "+e(t,!1)+" položky.":"Můžete zvolit maximálně "+t+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"},removeAllItems:function(){return"Odstraňte všechny položky"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){return"Angiv venligst "+(e.input.length-e.maximum)+" tegn mindre"},inputTooShort:function(e){return"Angiv venligst "+(e.minimum-e.input.length)+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var n="Du kan kun vælge "+e.maximum+" emne";return 1!=e.maximum&&(n+="r"),n},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){return"Bitte "+(e.input.length-e.maximum)+" Zeichen weniger eingeben"},inputTooShort:function(e){return"Bitte "+(e.minimum-e.input.length)+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var n="Sie können nur "+e.maximum+" Element";return 1!=e.maximum&&(n+="e"),n+=" auswählen"},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"},removeAllItems:function(){return"Entferne alle Elemente"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/dsb",[],function(){var n=["znamuško","znamušce","znamuška","znamuškow"],e=["zapisk","zapiska","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Pšosym lašuj "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Pšosym zapódaj nanejmjenjej "+a+" "+u(a,n)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(n){return"Móžoš jano "+n.maximum+" "+u(n.maximum,e)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(n){var e=n.input.length-n.maximum,u="Παρακαλώ διαγράψτε "+e+" χαρακτήρ";return 1==e&&(u+="α"),1!=e&&(u+="ες"),u},inputTooShort:function(n){return"Παρακαλώ συμπληρώστε "+(n.minimum-n.input.length)+" ή περισσότερους χαρακτήρες"},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(n){var e="Μπορείτε να επιλέξετε μόνο "+n.maximum+" επιλογ";return 1==n.maximum&&(e+="ή"),1!=n.maximum&&(e+="ές"),e},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"},removeAllItems:function(){return"Καταργήστε όλα τα στοιχεία"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Please delete "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var n="You can only select "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Por favor, elimine "+n+" car";return r+=1==n?"ácter":"acteres"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Por favor, introduzca "+n+" car";return r+=1==n?"ácter":"acteres"},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var n="Sólo puede seleccionar "+e.maximum+" elemento";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Eliminar todos los elementos"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var n=e.input.length-e.maximum,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" vähem"},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" rohkem"},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var n="Saad vaid "+e.maximum+" tulemus";return 1==e.maximum?n+="e":n+="t",n+=" valida"},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"},removeAllItems:function(){return"Eemalda kõik esemed"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gutxiago"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gehiago"},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return 1===e.maximum?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"},removeAllItems:function(){return"Kendu elementu guztiak"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(n){return"لطفاً "+(n.input.length-n.maximum)+" کاراکتر را حذف نمایید"},inputTooShort:function(n){return"لطفاً تعداد "+(n.minimum-n.input.length)+" کاراکتر یا بیشتر وارد نمایید"},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(n){return"شما تنها می‌توانید "+n.maximum+" آیتم را انتخاب نمایید"},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."},removeAllItems:function(){return"همه موارد را حذف کنید"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(n){return"Ole hyvä ja anna "+(n.input.length-n.maximum)+" merkkiä vähemmän"},inputTooShort:function(n){return"Ole hyvä ja anna "+(n.minimum-n.input.length)+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(n){return"Voit valita ainoastaan "+n.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"},removeAllItems:function(){return"Poista kaikki kohteet"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var n=e.input.length-e.maximum;return"Supprimez "+n+" caractère"+(n>1?"s":"")},inputTooShort:function(e){var n=e.minimum-e.input.length;return"Saisissez au moins "+n+" caractère"+(n>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"},removeAllItems:function(){return"Supprimer tous les éléments"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var n=e.input.length-e.maximum;return 1===n?"Elimine un carácter":"Elimine "+n+" caracteres"},inputTooShort:function(e){var n=e.minimum-e.input.length;return 1===n?"Engada un carácter":"Engada "+n+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return 1===e.maximum?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Elimina todos os elementos"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="נא למחוק ";return r+=1===e?"תו אחד":e+" תווים"},inputTooShort:function(n){var e=n.minimum-n.input.length,r="נא להכניס ";return r+=1===e?"תו אחד":e+" תווים",r+=" או יותר"},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(n){var e="באפשרותך לבחור עד ";return 1===n.maximum?e+="פריט אחד":e+=n.maximum+" פריטים",e},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"},removeAllItems:function(){return"הסר את כל הפריטים"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(n){var e=n.input.length-n.maximum,r=e+" अक्षर को हटा दें";return e>1&&(r=e+" अक्षरों को हटा दें "),r},inputTooShort:function(n){return"कृपया "+(n.minimum-n.input.length)+" या अधिक अक्षर दर्ज करें"},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(n){return"आप केवल "+n.maximum+" आइटम का चयन कर सकते हैं"},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."},removeAllItems:function(){return"सभी वस्तुओं को हटा दें"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hr",[],function(){function n(n){var e=" "+n+" znak";return n%10<5&&n%10>0&&(n%100<5||n%100>19)?n%10>1&&(e+="a"):e+="ova",e}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(e){return"Unesite "+n(e.input.length-e.maximum)},inputTooShort:function(e){return"Unesite još "+n(e.minimum-e.input.length)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(n){return"Maksimalan broj odabranih stavki je "+n.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Ukloni sve stavke"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hsb",[],function(){var n=["znamješko","znamješce","znamješka","znamješkow"],e=["zapisk","zapiskaj","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Prošu zhašej "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Prošu zapodaj znajmjeńša "+a+" "+u(a,n)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(n){return"Móžeš jenož "+n.maximum+" "+u(n.maximum,e)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){return"Túl hosszú. "+(e.input.length-e.maximum)+" karakterrel több, mint kellene."},inputTooShort:function(e){return"Túl rövid. Még "+(e.minimum-e.input.length)+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"},removeAllItems:function(){return"Távolítson el minden elemet"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(n){return"Խնդրում ենք հեռացնել "+(n.input.length-n.maximum)+" նշան"},inputTooShort:function(n){return"Խնդրում ենք մուտքագրել "+(n.minimum-n.input.length)+" կամ ավել նշաններ"},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(n){return"Դուք կարող եք ընտրել առավելագույնը "+n.maximum+" կետ"},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"},removeAllItems:function(){return"Հեռացնել բոլոր տարրերը"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(n){return"Hapuskan "+(n.input.length-n.maximum)+" huruf"},inputTooShort:function(n){return"Masukkan "+(n.minimum-n.input.length)+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(n){return"Anda hanya dapat memilih "+n.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Hapus semua item"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/is",[],function(){return{inputTooLong:function(n){var t=n.input.length-n.maximum,e="Vinsamlegast styttið texta um "+t+" staf";return t<=1?e:e+"i"},inputTooShort:function(n){var t=n.minimum-n.input.length,e="Vinsamlegast skrifið "+t+" staf";return t>1&&(e+="i"),e+=" í viðbót"},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(n){return"Þú getur aðeins valið "+n.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"},removeAllItems:function(){return"Fjarlægðu öll atriði"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Per favore cancella "+n+" caratter";return t+=1!==n?"i":"e"},inputTooShort:function(e){return"Per favore inserisci "+(e.minimum-e.input.length)+" o più caratteri"},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var n="Puoi selezionare solo "+e.maximum+" element";return 1!==e.maximum?n+="i":n+="o",n},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"},removeAllItems:function(){return"Rimuovi tutti gli oggetti"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(n){return n.input.length-n.maximum+" 文字を削除してください"},inputTooShort:function(n){return"少なくとも "+(n.minimum-n.input.length)+" 文字を入力してください"},loadingMore:function(){return"読み込み中…"},maximumSelected:function(n){return n.maximum+" 件しか選択できません"},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"},removeAllItems:function(){return"すべてのアイテムを削除"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ka",[],function(){return{errorLoading:function(){return"მონაცემების ჩატვირთვა შეუძლებელია."},inputTooLong:function(n){return"გთხოვთ აკრიფეთ "+(n.input.length-n.maximum)+" სიმბოლოთი ნაკლები"},inputTooShort:function(n){return"გთხოვთ აკრიფეთ "+(n.minimum-n.input.length)+" სიმბოლო ან მეტი"},loadingMore:function(){return"მონაცემების ჩატვირთვა…"},maximumSelected:function(n){return"თქვენ შეგიძლიათ აირჩიოთ არაუმეტეს "+n.maximum+" ელემენტი"},noResults:function(){return"რეზულტატი არ მოიძებნა"},searching:function(){return"ძიება…"},removeAllItems:function(){return"ამოიღე ყველა ელემენტი"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(n){return"សូមលុបចេញ "+(n.input.length-n.maximum)+" អក្សរ"},inputTooShort:function(n){return"សូមបញ្ចូល"+(n.minimum-n.input.length)+" អក្សរ រឺ ច្រើនជាងនេះ"},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(n){return"អ្នកអាចជ្រើសរើសបានតែ "+n.maximum+" ជម្រើសប៉ុណ្ណោះ"},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."},removeAllItems:function(){return"លុបធាតុទាំងអស់"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(n){return"너무 깁니다. "+(n.input.length-n.maximum)+" 글자 지워주세요."},inputTooShort:function(n){return"너무 짧습니다. "+(n.minimum-n.input.length)+" 글자 더 입력해주세요."},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(n){return"최대 "+n.maximum+"개까지만 선택 가능합니다."},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"},removeAllItems:function(){return"모든 항목 삭제"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/lt",[],function(){function n(n,e,i,t){return n%10==1&&(n%100<11||n%100>19)?e:n%10>=2&&n%10<=9&&(n%100<11||n%100>19)?i:t}return{inputTooLong:function(e){var i=e.input.length-e.maximum,t="Pašalinkite "+i+" simbol";return t+=n(i,"į","ius","ių")},inputTooShort:function(e){var i=e.minimum-e.input.length,t="Įrašykite dar "+i+" simbol";return t+=n(i,"į","ius","ių")},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(e){var i="Jūs galite pasirinkti tik "+e.maximum+" element";return i+=n(e.maximum,"ą","us","ų")},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"},removeAllItems:function(){return"Pašalinti visus elementus"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/lv",[],function(){function e(e,n,u,i){return 11===e?n:e%10==1?u:i}return{inputTooLong:function(n){var u=n.input.length-n.maximum,i="Lūdzu ievadiet par "+u;return(i+=" simbol"+e(u,"iem","u","iem"))+" mazāk"},inputTooShort:function(n){var u=n.minimum-n.input.length,i="Lūdzu ievadiet vēl "+u;return i+=" simbol"+e(u,"us","u","us")},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(n){var u="Jūs varat izvēlēties ne vairāk kā "+n.maximum;return u+=" element"+e(n.maximum,"us","u","us")},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"},removeAllItems:function(){return"Noņemt visus vienumus"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/mk",[],function(){return{inputTooLong:function(n){var e=(n.input.length,n.maximum,"Ве молиме внесете "+n.maximum+" помалку карактер");return 1!==n.maximum&&(e+="и"),e},inputTooShort:function(n){var e=(n.minimum,n.input.length,"Ве молиме внесете уште "+n.maximum+" карактер");return 1!==n.maximum&&(e+="и"),e},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(n){var e="Можете да изберете само "+n.maximum+" ставк";return 1===n.maximum?e+="а":e+="и",e},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"},removeAllItems:function(){return"Отстрани ги сите предмети"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(n){return"Sila hapuskan "+(n.input.length-n.maximum)+" aksara"},inputTooShort:function(n){return"Sila masukkan "+(n.minimum-n.input.length)+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(n){return"Anda hanya boleh memilih "+n.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Keluarkan semua item"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){return"Vennligst fjern "+(e.input.length-e.maximum)+" tegn"},inputTooShort:function(e){return"Vennligst skriv inn "+(e.minimum-e.input.length)+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ne",[],function(){return{errorLoading:function(){return"नतिजाहरु देखाउन सकिएन।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="कृपया "+e+" अक्षर मेटाउनुहोस्।";return 1!=e&&(u+="कृपया "+e+" अक्षरहरु मेटाउनुहोस्।"),u},inputTooShort:function(n){return"कृपया बाँकी रहेका "+(n.minimum-n.input.length)+" वा अरु धेरै अक्षरहरु भर्नुहोस्।"},loadingMore:function(){return"अरु नतिजाहरु भरिँदैछन् …"},maximumSelected:function(n){var e="तँपाई "+n.maximum+" वस्तु मात्र छान्न पाउँनुहुन्छ।";return 1!=n.maximum&&(e="तँपाई "+n.maximum+" वस्तुहरु मात्र छान्न पाउँनुहुन्छ।"),e},noResults:function(){return"कुनै पनि नतिजा भेटिएन।"},searching:function(){return"खोजि हुँदैछ…"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){return"Gelieve "+(e.input.length-e.maximum)+" karakters te verwijderen"},inputTooShort:function(e){return"Gelieve "+(e.minimum-e.input.length)+" of meer karakters in te voeren"},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var n=1==e.maximum?"kan":"kunnen",r="Er "+n+" maar "+e.maximum+" item";return 1!=e.maximum&&(r+="s"),r+=" worden geselecteerd"},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"},removeAllItems:function(){return"Verwijder alle items"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/pl",[],function(){var n=["znak","znaki","znaków"],e=["element","elementy","elementów"],r=function(n,e){return 1===n?e[0]:n>1&&n<=4?e[1]:n>=5?e[2]:void 0};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Usuń "+t+" "+r(t,n)},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Podaj przynajmniej "+t+" "+r(t,n)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(n){return"Możesz zaznaczyć tylko "+n.maximum+" "+r(n.maximum,e)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"},removeAllItems:function(){return"Usuń wszystkie przedmioty"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="د مهربانۍ لمخي "+e+" توری ړنګ کړئ";return 1!=e&&(r=r.replace("توری","توري")),r},inputTooShort:function(n){return"لږ تر لږه "+(n.minimum-n.input.length)+" يا ډېر توري وليکئ"},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(n){var e="تاسو يوازي "+n.maximum+" قلم په نښه کولای سی";return 1!=n.maximum&&(e=e.replace("قلم","قلمونه")),e},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."},removeAllItems:function(){return"ټول توکي لرې کړئ"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Apague "+n+" caracter";return 1!=n&&(r+="es"),r},inputTooShort:function(e){return"Digite "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var n="Você só pode selecionar "+e.maximum+" ite";return 1==e.maximum?n+="m":n+="ns",n},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var r=e.input.length-e.maximum,n="Por favor apague "+r+" ";return n+=1!=r?"caracteres":"caractere"},inputTooShort:function(e){return"Introduza "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var r="Apenas pode seleccionar "+e.maximum+" ";return r+=1!=e.maximum?"itens":"item"},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return 1!==t&&(n+="e"),n},inputTooShort:function(e){return"Vă rugăm să introduceți "+(e.minimum-e.input.length)+" sau mai multe caractere"},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",1!==e.maximum&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"},removeAllItems:function(){return"Eliminați toate elementele"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ru",[],function(){function n(n,e,r,u){return n%10<5&&n%10>0&&n%100<5||n%100>20?n%10>1?r:e:u}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Пожалуйста, введите на "+r+" символ";return u+=n(r,"","a","ов"),u+=" меньше"},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Пожалуйста, введите ещё хотя бы "+r+" символ";return u+=n(r,"","a","ов")},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(e){var r="Вы можете выбрать не более "+e.maximum+" элемент";return r+=n(e.maximum,"","a","ов")},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"},removeAllItems:function(){return"Удалить все элементы"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadajte o jeden znak menej":t>=2&&t<=4?"Prosím, zadajte o "+e[t](!0)+" znaky menej":"Prosím, zadajte o "+t+" znakov menej"},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadajte ešte jeden znak":t<=4?"Prosím, zadajte ešte ďalšie "+e[t](!0)+" znaky":"Prosím, zadajte ešte ďalších "+t+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(n){return 1==n.maximum?"Môžete zvoliť len jednu položku":n.maximum>=2&&n.maximum<=4?"Môžete zvoliť najviac "+e[n.maximum](!1)+" položky":"Môžete zvoliť najviac "+n.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"},removeAllItems:function(){return"Odstráňte všetky položky"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Prosim zbrišite "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Prosim vpišite še "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var n="Označite lahko največ "+e.maximum+" predmet";return 2==e.maximum?n+="a":1!=e.maximum&&(n+="e"),n},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"},removeAllItems:function(){return"Odstranite vse elemente"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Të lutem fshi "+n+" karakter";return 1!=n&&(t+="e"),t},inputTooShort:function(e){return"Të lutem shkruaj "+(e.minimum-e.input.length)+" ose më shumë karaktere"},loadingMore:function(){return"Duke ngarkuar më shumë rezultate…"},maximumSelected:function(e){var n="Mund të zgjedhësh vetëm "+e.maximum+" element";return 1!=e.maximum&&(n+="e"),n},noResults:function(){return"Nuk u gjet asnjë rezultat"},searching:function(){return"Duke kërkuar…"},removeAllItems:function(){return"Hiq të gjitha sendet"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr-Cyrl",[],function(){function n(n,e,r,u){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:u}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Обришите "+r+" симбол";return u+=n(r,"","а","а")},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Укуцајте бар још "+r+" симбол";return u+=n(r,"","а","а")},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(e){var r="Можете изабрати само "+e.maximum+" ставк";return r+=n(e.maximum,"у","е","и")},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr",[],function(){function n(n,e,r,t){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(e){var r=e.input.length-e.maximum,t="Obrišite "+r+" simbol";return t+=n(r,"","a","a")},inputTooShort:function(e){var r=e.minimum-e.input.length,t="Ukucajte bar još "+r+" simbol";return t+=n(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(e){var r="Možete izabrati samo "+e.maximum+" stavk";return r+=n(e.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(n){return"Vänligen sudda ut "+(n.input.length-n.maximum)+" tecken"},inputTooShort:function(n){return"Vänligen skriv in "+(n.minimum-n.input.length)+" eller fler tecken"},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(n){return"Du kan max välja "+n.maximum+" element"},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"},removeAllItems:function(){return"Ta bort alla objekt"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(n){return"โปรดลบออก "+(n.input.length-n.maximum)+" ตัวอักษร"},inputTooShort:function(n){return"โปรดพิมพ์เพิ่มอีก "+(n.minimum-n.input.length)+" ตัวอักษร"},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(n){return"คุณสามารถเลือกได้ไม่เกิน "+n.maximum+" รายการ"},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"},removeAllItems:function(){return"ลบรายการทั้งหมด"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){return e.input.length-e.maximum+" harp bozuň."},inputTooShort:function(e){return"Ýene-de iň az "+(e.minimum-e.input.length)+" harp ýazyň."},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){return"Diňe "+e.maximum+" sanysyny saýlaň."},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(n){return n.input.length-n.maximum+" karakter daha girmelisiniz"},inputTooShort:function(n){return"En az "+(n.minimum-n.input.length)+" karakter daha girmelisiniz"},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(n){return"Sadece "+n.maximum+" seçim yapabilirsiniz"},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"},removeAllItems:function(){return"Tüm öğeleri kaldır"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/uk",[],function(){function n(n,e,u,r){return n%100>10&&n%100<15?r:n%10==1?e:n%10>1&&n%10<5?u:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(e){return"Будь ласка, видаліть "+(e.input.length-e.maximum)+" "+n(e.maximum,"літеру","літери","літер")},inputTooShort:function(n){return"Будь ласка, введіть "+(n.minimum-n.input.length)+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(e){return"Ви можете вибрати лише "+e.maximum+" "+n(e.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"},removeAllItems:function(){return"Видалити всі елементи"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/vi",[],function(){return{inputTooLong:function(n){return"Vui lòng xóa bớt "+(n.input.length-n.maximum)+" ký tự"},inputTooShort:function(n){return"Vui lòng nhập thêm từ "+(n.minimum-n.input.length)+" ký tự trở lên"},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(n){return"Chỉ có thể chọn được "+n.maximum+" lựa chọn"},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"},removeAllItems:function(){return"Xóa tất cả các mục"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(n){return"请删除"+(n.input.length-n.maximum)+"个字符"},inputTooShort:function(n){return"请再输入至少"+(n.minimum-n.input.length)+"个字符"},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(n){return"最多只能选择"+n.maximum+"个项目"},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"},removeAllItems:function(){return"删除所有项目"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(n){return"請刪掉"+(n.input.length-n.maximum)+"個字元"},inputTooShort:function(n){return"請再輸入"+(n.minimum-n.input.length)+"個字元"},loadingMore:function(){return"載入中…"},maximumSelected:function(n){return"你只能選擇最多"+n.maximum+"項"},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"},removeAllItems:function(){return"刪除所有項目"}}}),n.define,n.require}();

File diff suppressed because one or more lines are too long

View File

@ -268,6 +268,11 @@ class SystemGroupStatusWidget extends Widget
} }
// Restrict access to group. // Restrict access to group.
$selected_groups = [];
if ($values['groupId']) {
$selected_groups = explode(',', $values['groupId'][0]);
}
$inputs[] = [ $inputs[] = [
'label' => __('Groups'), 'label' => __('Groups'),
'arguments' => [ 'arguments' => [
@ -275,7 +280,7 @@ class SystemGroupStatusWidget extends Widget
'name' => 'groupId[]', 'name' => 'groupId[]',
'returnAllGroup' => true, 'returnAllGroup' => true,
'privilege' => 'ER', 'privilege' => 'ER',
'selected' => explode(',', $values['groupId'][0]), 'selected' => $selected_groups,
'return' => true, 'return' => true,
'multiple' => true, 'multiple' => true,
], ],

View File

@ -38,6 +38,13 @@ require_once $config['homedir'].'/include/functions_groups.php';
class Group extends Entity class Group extends Entity
{ {
/**
* List of available ajax methods.
*
* @var array
*/
private static $ajaxMethods = ['getGroupsForSelect'];
/** /**
* Builds a PandoraFMS\Group object from a group id. * Builds a PandoraFMS\Group object from a group id.
@ -79,7 +86,7 @@ class Group extends Entity
public function getChildren( public function getChildren(
bool $ids_only=false, bool $ids_only=false,
bool $ignorePropagationState=false bool $ignorePropagationState=false
) { ):array {
$available_groups = \groups_get_children( $available_groups = \groups_get_children(
$this->id_grupo(), $this->id_grupo(),
$ignorePropagationState $ignorePropagationState
@ -98,20 +105,108 @@ class Group extends Entity
} }
/**
* Retrieves a list of groups fitered.
*
* @param array $filter Filters to be applied.
*
* @return array With all results or false if error.
* @throws Exception On error.
*/
private static function search(array $filter):array
{
// Default values.
if (empty($filter['id_user']) === true) {
// By default query current user groups.
$filter['id_user'] = false;
} else if (!\users_is_admin()) {
// Override user queried if user is not an admin.
$filter['id_user'] = false;
}
if (empty($filter['id_user']) === true) {
$filter['id_user'] = false;
}
if (empty($filter['keys_field']) === true) {
$filter['keys_field'] = 'id_grupo';
}
if (isset($filter['returnAllColumns']) === false) {
$filter['returnAllColumns'] = true;
}
$groups = \users_get_groups(
$filter['id_user'],
$filter['privilege'],
$filter['returnAllGroup'],
// Return all columns.
$filter['returnAllColumns'],
// Field id_groups is not being used anymore.
null,
$filter['keys_field'],
// Cache.
true,
// Search term.
$filter['search']
);
if (is_array($groups) === false) {
return [];
}
return $groups;
}
/**
* Returns an hierarchical ordered array.
*
* @param array $groups All groups available.
*
* @return array Groups ordered.
*/
private static function prepareGroups(array $groups):array
{
$return = [];
$groups = \groups_get_groups_tree_recursive($groups);
foreach ($groups as $k => $v) {
$return[] = [
'id' => $k,
'text' => \io_safe_output(
\ui_print_truncate_text(
$v['nombre'],
GENERIC_SIZE_TEXT,
false,
true,
false
)
),
'level' => $v['deep'],
];
}
return $return;
}
/** /**
* Saves current group definition to database. * Saves current group definition to database.
* *
* @return mixed Affected rows of false in case of error. * @return mixed Affected rows of false in case of error.
* @throws \Exception On error.
*/ */
public function save() public function save()
{ {
global $config; global $config;
if (isset($config['centralized_management']) if (isset($config['centralized_management']) === true
&& $config['centralized_management'] > 0 && $config['centralized_management'] > 0
) { ) {
throw new \Exception( throw new \Exception(
get_class($this).' error, cannot be modified in a centralized management environment.' get_class($this).' error, cannot be modified while centralized management environment.'
); );
} }
@ -132,4 +227,123 @@ class Group extends Entity
} }
/**
* Return error message to target.
*
* @param string $msg Error message.
*
* @return void
*/
public static function error(string $msg)
{
echo json_encode(['error' => $msg]);
}
/**
* Verifies target method is allowed to be called using AJAX call.
*
* @param string $method Method to be invoked via AJAX.
*
* @return boolean Available (true), or not (false).
*/
public static function ajaxMethod(string $method):bool
{
return in_array($method, self::$ajaxMethods) === true;
}
/**
* This method is being invoked by select2 to improve performance while
* installation has a lot of groups (more than 5k).
*
* Security applied in controller include/ajax/group.php.
*
* @return void
* @throws \Exception On error.
*/
public static function getGroupsForSelect()
{
$id_user = get_parameter('id_user', false);
$privilege = get_parameter('privilege', 'AR');
$returnAllGroup = get_parameter('returnAllGroup', false);
$id_group = get_parameter('id_group', false);
$keys_field = get_parameter('keys_field', 'id_grupo');
$search = get_parameter('search', '');
$step = get_parameter('step', 1);
$limit = get_parameter('limit', false);
$exclusions = get_parameter('exclusions', '[]');
$inclusions = get_parameter('inclusions', '[]');
if (empty($id_user) === true) {
$id_user = false;
}
$groups = self::search(
[
'id_user' => $id_user,
'privilege' => $privilege,
'returnAllGroup' => $returnAllGroup,
'returnAllColumns' => true,
'id_group' => $id_group,
'keys_field' => $keys_field,
'search' => $search,
]
);
$exclusions = json_decode(\io_safe_output($exclusions));
if (empty($exclusions) === false) {
foreach ($exclusions as $ex) {
unset($groups[$ex]);
}
}
$inclusions = json_decode(\io_safe_output($inclusions));
if (empty($inclusions) === false) {
foreach ($inclusions as $g) {
if (empty($groups[$g]) === true) {
$groups[$g] = \groups_get_name($g);
}
}
}
$return = self::prepareGroups($groups);
if (is_array($return) === false) {
return;
}
// Use global block size configuration.
global $config;
$limit = $config['block_size'];
$offset = (($step - 1) * $limit);
// Pagination over effective groups retrieved.
// Calculation is faster than transference.
$count = count($return);
if (is_numeric($offset) === true && $offset >= 0) {
if (is_numeric($limit) === true && $limit > 0) {
$return = array_splice($return, $offset, $limit);
}
}
if ($step > 2) {
$processed = (($step - 2) * $limit);
} else {
$processed = 0;
}
$current_ammount = (count($return) + $processed);
echo json_encode(
[
'results' => $return,
'pagination' => [
'more' => $current_ammount < $count,
],
]
);
}
} }

View File

@ -5,7 +5,7 @@ div.criticity {
text-align: center; text-align: center;
border-radius: 5px; border-radius: 5px;
font-size: 0.8em; font-size: 0.8em;
padding: 3px; padding: 5px;
margin: 0; margin: 0;
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
@ -32,7 +32,7 @@ form.flex-row ul {
width: 30%; width: 30%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: baseline; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
align-content: center; align-content: center;
justify-content: space-between; justify-content: space-between;
@ -124,6 +124,7 @@ table.dataTable tbody td {
max-width: 450px; max-width: 450px;
} }
.filter_input .select2,
.filter_input_little > select, .filter_input_little > select,
.filter_input_little > input, .filter_input_little > input,
.filter_input > select, .filter_input > select,
@ -310,16 +311,3 @@ div.multi-response-buttons {
width: 100%; width: 100%;
text-align: right; text-align: right;
} }
div.criticity {
width: 150px;
height: 2em;
color: #fff;
text-align: center;
border-radius: 5px;
font-size: 0.8em;
padding: 5px;
margin: 0;
display: table-cell;
vertical-align: middle;
}

View File

@ -23,11 +23,17 @@
} }
.multi-select-container .filter input, .multi-select-container .filter input,
.multi-select-container .filter select { .multi-select-container .filter select,
.multi-select-container .filter .select2 {
float: right; float: right;
width: 50%; width: 50%;
text-align: left; text-align: left;
} }
.multi-select-container .filter .select2 {
width: 50% !important;
}
.multi-select-container .filter input[type="checkbox"] { .multi-select-container .filter input[type="checkbox"] {
width: auto; width: auto;
} }

View File

@ -453,6 +453,18 @@ select:-internal-list-box {
width: 120px; width: 120px;
max-width: 120px; max-width: 120px;
} }
.w240px {
width: 240px;
max-width: 240px;
}
.w250px {
width: 250px;
max-width: 250px;
}
.w290px {
width: 290px;
max-width: 290px;
}
.mw120px { .mw120px {
min-width: 120px; min-width: 120px;
} }
@ -474,6 +486,12 @@ select:-internal-list-box {
.w20px { .w20px {
width: 20px; width: 20px;
} }
.nowrap {
white-space: nowrap;
}
.inline {
display: inline-block;
}
.w10p { .w10p {
width: 10%; width: 10%;
} }
@ -565,10 +583,12 @@ select:-internal-list-box {
justify-content: space-between; justify-content: space-between;
align-content: center; align-content: center;
} }
.flex-nowrap {
flex-wrap: nowrap;
}
.flex-row-baseline { .flex-row-baseline {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap;
align-items: baseline; align-items: baseline;
} }
@ -590,11 +610,6 @@ select:-internal-list-box {
.flex-start { .flex-start {
justify-content: flex-start; justify-content: flex-start;
} }
.nowrap {
flex-wrap: nowrap;
}
.padding-2 { .padding-2 {
padding: 2em; padding: 2em;
} }
@ -604,6 +619,12 @@ select:-internal-list-box {
.padding-6 { .padding-6 {
padding: 6em; padding: 6em;
} }
.padding-right-2 {
padding-right: 2em;
}
.padding-right-2-imp {
padding-right: 2em !important;
}
.margin-right-1 { .margin-right-1 {
margin-right: 1em; margin-right: 1em;
} }
@ -6151,3 +6172,7 @@ form#form-filter-interfaces ul li.select-interfaces {
flex-direction: row-reverse; flex-direction: row-reverse;
justify-content: flex-end; justify-content: flex-end;
} }
li .select2 {
max-width: 400px !important;
}

File diff suppressed because one or more lines are too long

View File

@ -213,7 +213,7 @@ echo '<form method="post" action="?sec=view&sec2=operation/agentes/estado_agente
echo '<table cellpadding="4" cellspacing="4" class="databox filters" width="100%" style="font-weight: bold; margin-bottom: 10px;">'; echo '<table cellpadding="4" cellspacing="4" class="databox filters" width="100%" style="font-weight: bold; margin-bottom: 10px;">';
echo '<tr><td style="white-space:nowrap;">'; echo '<tr><td class="nowrap mw250px padding-right-2-imp">';
echo __('Group').'&nbsp;'; echo __('Group').'&nbsp;';
@ -221,17 +221,17 @@ $groups = users_get_groups(false, $access);
html_print_select_groups(false, $access, true, 'group_id', $group_id, 'this.form.submit()', '', '', false, false, true, '', false); html_print_select_groups(false, $access, true, 'group_id', $group_id, 'this.form.submit()', '', '', false, false, true, '', false);
echo '</td><td style="white-space:nowrap;">'; echo '</td><td class="nowrap">';
echo __('Recursion').'&nbsp;'; echo __('Recursion').'&nbsp;';
html_print_checkbox('recursion', 1, $recursion, false, false, 'this.form.submit()'); html_print_checkbox('recursion', 1, $recursion, false, false, 'this.form.submit()');
echo '</td><td style="white-space:nowrap;">'; echo '</td><td class="nowrap">';
echo __('Search').'&nbsp;'; echo __('Search').'&nbsp;';
html_print_input_text('search', $search, '', 15); html_print_input_text('search', $search, '', 15);
echo '</td><td style="white-space:nowrap;">'; echo '</td><td class="nowrap">';
$fields = []; $fields = [];
$fields[AGENT_STATUS_NORMAL] = __('Normal'); $fields[AGENT_STATUS_NORMAL] = __('Normal');
@ -244,12 +244,12 @@ $fields[AGENT_STATUS_NOT_INIT] = __('Not init');
echo __('Status').'&nbsp;'; echo __('Status').'&nbsp;';
html_print_select($fields, 'status', $status, 'this.form.submit()', __('All'), AGENT_STATUS_ALL, false, false, true, '', false, 'width: 90px;'); html_print_select($fields, 'status', $status, 'this.form.submit()', __('All'), AGENT_STATUS_ALL, false, false, true, '', false, 'width: 90px;');
echo '</td><td style="white-space:nowrap;">'; echo '</td><td class="nowrap">';
echo __('Search in custom fields').'&nbsp;'; echo __('Search in custom fields').'&nbsp;';
html_print_input_text('search_custom', $search_custom, '', 15); html_print_input_text('search_custom', $search_custom, '', 15);
echo '</td><td style="white-space:nowrap;">'; echo '</td><td class="nowrap">';
html_print_submit_button( html_print_submit_button(
__('Search'), __('Search'),

View File

@ -227,7 +227,7 @@ if (empty($export_btn) || $show_form) {
$groups = users_get_groups($config['id_user'], 'RR', users_can_manage_group_all()); $groups = users_get_groups($config['id_user'], 'RR', users_can_manage_group_all());
$table->data[0][1] = html_print_select_groups( $table->data[0][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'], $config['id_user'],
'RR', 'RR',
true, true,
@ -241,7 +241,7 @@ if (empty($export_btn) || $show_form) {
true, true,
'', '',
false false
); ).'</div>';
// Agent selector. // Agent selector.
$table->data[1][0] = '<b>'.__('Source agent').'</b>'; $table->data[1][0] = '<b>'.__('Source agent').'</b>';

View File

@ -266,17 +266,26 @@ if ($not_found) {
); );
$table->data[1][0] = __('Group'); $table->data[1][0] = __('Group');
$table->data[1][1] = html_print_select_groups( $table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
// Id_user.
$config['id_user'], $config['id_user'],
// Privilege.
'AR', 'AR',
// ReturnAllGroup.
true, true,
// Name.
'id_group_map', 'id_group_map',
// Selected.
$id_group_map, $id_group_map,
// Script.
'', '',
// Nothing.
'', '',
// Nothing_value.
'', '',
// Return.
true true
); ).'</div>';
$table->data[2][0] = __('Node radius'); $table->data[2][0] = __('Node radius');
$table->data[2][1] = html_print_input_text( $table->data[2][1] = html_print_input_text(
@ -333,7 +342,7 @@ if ($not_found) {
$table->data['source_data_ip_mask'][1] = html_print_input_text('ip_mask', $ip_mask, '', 20, 255, true, $disabled_source); $table->data['source_data_ip_mask'][1] = html_print_input_text('ip_mask', $ip_mask, '', 20, 255, true, $disabled_source);
$table->data['source_data_group'][0] = __('Source group'); $table->data['source_data_group'][0] = __('Source group');
$table->data['source_data_group'][1] = html_print_select_groups( $table->data['source_data_group'][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'], $config['id_user'],
'AR', 'AR',
true, true,
@ -343,7 +352,7 @@ if ($not_found) {
'', '',
'', '',
true true
); ).'</div>';
$table->data['source_data_group'][1] .= html_print_image( $table->data['source_data_group'][1] .= html_print_image(
'images/error.png', 'images/error.png',
true, true,

View File

@ -878,24 +878,17 @@ if (is_metaconsole() !== true) {
*/ */
// Group. // Group.
$user_groups_array = users_get_groups_for_select( $data = html_print_input(
$config['id_user'], [
$access, 'name' => 'id_group_filter',
true, 'returnAllGroup' => true,
true, 'privilege' => 'AR',
false 'type' => 'select_groups',
); 'selected' => (defined($id_group_filter) ? $id_group_filter : 0),
$data = html_print_select( 'nothing' => false,
$user_groups_array, 'return' => true,
'id_group_filter', 'size' => '80%',
$id_group_filter, ]
'',
'',
0,
true,
false,
false,
'w130'
); );
$in = '<div class="filter_input"><label>'.__('Group').'</label>'; $in = '<div class="filter_input"><label>'.__('Group').'</label>';
$in .= $data.'</div>'; $in .= $data.'</div>';

View File

@ -37,9 +37,11 @@ if (! check_acl($config['id_user'], 0, 'ER') && ! check_acl($config['id_user'],
} }
$agents = agents_get_group_agents(0, false, 'none', false, true); $agents = agents_get_group_agents(0, false, 'none', false, true);
ob_start('ui_process_page_head');
ob_start();
echo '<html>'; echo '<html>';
echo '<head>'; echo '<head>';
echo '<title>'.__('Sound Events').'</title>'; echo '<title>'.__('Sound Events').'</title>';
?> ?>
<style type='text/css'> <style type='text/css'>
@ -100,8 +102,6 @@ $table->data[0][3] .= html_print_image('images/tick_sound_events.png', true, ['i
html_print_table($table); html_print_table($table);
?> ?>
<script src="../../include/javascript/jquery.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var group = 0; var group = 0;
var alert_fired = true; var alert_fired = true;
@ -265,5 +265,11 @@ $(document).ready (function () {
<?php <?php
echo '</body>'; echo '</body>';
while (@ob_end_flush()) {
// Dumping...
continue;
}
echo '</html>'; echo '</html>';

View File

@ -354,7 +354,9 @@ if ($count_total >= 1) {
echo '</td></tr><tr><td colspan=3>'; echo '</td></tr><tr><td colspan=3>';
echo '<b>'.__('Groups:').'</b>'.'&nbsp;&nbsp;'; echo '<b>'.__('Groups:').'</b>'.'&nbsp;&nbsp;';
echo '<div class="w250px inline">';
html_print_select_groups($config['id_user'], 'IR', true, 'grupo', $grupo, 'javascript:this.form.submit();', '', '', false, false, false, 'w155'); html_print_select_groups($config['id_user'], 'IR', true, 'grupo', $grupo, 'javascript:this.form.submit();', '', '', false, false, false, 'w155');
echo '</div>';
// echo "&nbsp;&nbsp;&nbsp;&nbsp;"; // echo "&nbsp;&nbsp;&nbsp;&nbsp;";
echo '</td></tr><tr><td colspan=3>'; echo '</td></tr><tr><td colspan=3>';

Some files were not shown because too many files have changed in this diff Show More