width = '100%';
$table->class = 'databox filters';
if (is_metaconsole() === true) {
$table->head[0] = ($id) ? __('Update Command') : __('Create Command');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
}
$table->style = [];
if (is_metaconsole() === false) {
$table->style[0] = 'font-weight: bold';
$table->style[2] = 'font-weight: bold';
$table->style[4] = 'font-weight: bold';
}
$table->size = [];
$table->size[0] = '20%';
$table->data = [];
$table->colspan['name'][1] = 3;
$table->data['name'][0] = __('Name');
$table->data['name'][2] = html_print_input_text(
'name',
$name,
'',
35,
255,
true,
false,
false,
'',
'',
'',
'',
false,
'',
'',
'',
$is_central_policies_on_node
);
$table->colspan['command'][1] = 3;
$table->data['command'][0] = __('Command');
$table->data['command'][1] = html_print_textarea(
'command',
8,
30,
$command,
'',
true,
'',
$is_central_policies_on_node
);
$table->colspan['group'][1] = 3;
$table->data['group'][0] = __('Group');
$table->data['group'][1] = '
'.html_print_select_groups(
false,
'LM',
true,
'id_group',
$id_group,
false,
'',
0,
true,
false,
true,
'',
$is_central_policies_on_node
).'
';
$table->colspan['description'][1] = 3;
$table->data['description'][0] = __('Description');
$table->data['description'][1] = html_print_textarea(
'description',
10,
30,
$description,
'',
true,
'',
$is_central_policies_on_node
);
for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
$table->data['field'.$i][0] = sprintf(__('Field %s description'), $i);
if (empty($fields_descriptions) === false) {
$field_description = $fields_descriptions[($i - 1)];
} else {
$field_description = '';
}
$table->data['field'.$i][1] = html_print_input_text(
'field'.$i.'_description',
$field_description,
'',
30,
255,
true,
false,
false,
'',
'',
'',
'',
false,
'',
'',
'',
$is_central_policies_on_node
);
$table->data['field'.$i][2] = sprintf(__('Field %s values'), $i);
$table->data['field'.$i][2] .= ui_print_help_tip(
__('value1,tag1;value2,tag2;value3,tag3'),
true
);
if (empty($fields_values) === false) {
$field_values = $fields_values[($i - 1)];
} else {
$field_values = '';
}
if (empty($fields_hidden) === false) {
$selected = (bool) $fields_hidden[($i - 1)];
} else {
$selected = false;
}
$table->data['field'.$i][3] = html_print_input_text(
'field'.$i.'_values',
$field_values,
'',
55,
255,
true,
false,
false,
'',
'field_value',
'',
'',
false,
'',
'',
'',
$is_central_policies_on_node
);
$table->data['field'.$i][4] = __('Hide');
$table->data['field'.$i][5] = html_print_checkbox_extended(
'field'.$i.'_hide',
1,
$selected,
$is_central_policies_on_node,
'cursor: \'pointer\'',
'class="hide_inputs"',
true
);
}
echo '';
enterprise_hook('close_meta_frame');
?>