fixed create user and add profile

This commit is contained in:
daniel 2023-03-17 10:09:11 +01:00
parent bb794d603b
commit f83acb99f0
4 changed files with 13 additions and 30 deletions

View File

@ -1645,9 +1645,13 @@ if ($new_user === true) {
html_print_input_hidden('json_profile', $json_profile); html_print_input_hidden('json_profile', $json_profile);
} }
echo '</div>';
echo '</form>'; echo '</form>';
// User Profile definition table. (Only where user is not creating).
if ($new_user === false && ((bool) check_acl($config['id_user'], 0, 'UM') === true)) {
profile_print_profile_table($id, io_safe_output($json_profile), false, ($is_err === true));
}
echo '</div>'; echo '</div>';
$actionButtons = []; $actionButtons = [];

View File

@ -803,7 +803,6 @@ foreach ($info as $user_id => $user_info) {
); );
} }
$data[4] .= '<br/>';
$data[4] .= '<br/>'; $data[4] .= '<br/>';
$total_profile++; $total_profile++;

View File

@ -763,23 +763,3 @@ html_print_div(
); );
html_print_table($userManagementTable); html_print_table($userManagementTable);
// User Profile definition table. (Only where user is not creating).
if ($new_user === false && ((bool) check_acl($config['id_user'], 0, 'UM') === true)) {
profile_print_profile_table($id, io_safe_output($json_profile), false, ($is_err === true));
}
?>
<!--
<script>
paint_qrcode(
"
<?php
// echo ui_get_full_url('mobile/index.php?page=agent&id='.$id_agente);
?>
",
"#qr_code_agent_view",
128,
128
);
</script>
-->

View File

@ -192,7 +192,7 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
$table->width = '100%'; $table->width = '100%';
$table->class = 'info_table'; $table->class = 'info_table';
echo '<div id="edit_user_profiles" class="floating_form white_box">'; echo '<div id="edit_user_profiles" class="max_floating_element_size white_box">';
echo '<p class="subsection_header_title padding-lft-10">'.$title.'</p>'; echo '<p class="subsection_header_title padding-lft-10">'.$title.'</p>';
$table->data = []; $table->data = [];
@ -312,12 +312,12 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
true, true,
[ [
'onclick' => 'delete_profile(event, this)', 'onclick' => 'delete_profile(event, this)',
'class' => 'invert_filter', 'class' => 'main_menu_icon invert_filter',
] ]
); );
} else { } else {
$data['actions'] = '<form method="post" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">'; $data['actions'] = '<form method="post" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">';
$data['actions'] .= html_print_input_image('del', 'images/delete.svg', 1, 'width:40px; height: 28px', true); $data['actions'] .= html_print_input_image('del', 'images/delete.svg', 1, '', true, ['class' => 'main_menu_icon invert_filter']);
$data['actions'] .= html_print_input_hidden('delete_profile', 1, true); $data['actions'] .= html_print_input_hidden('delete_profile', 1, true);
$data['actions'] .= html_print_input_hidden('id_user_profile', $profile['id_up'], true); $data['actions'] .= html_print_input_hidden('id_user_profile', $profile['id_up'], true);
$data['actions'] .= html_print_input_hidden('id_user', $id, true); $data['actions'] .= html_print_input_hidden('id_user', $id, true);
@ -391,7 +391,7 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
$data['last_hierarchy'] = html_print_checkbox('no_hierarchy', 1, false, true); $data['last_hierarchy'] = html_print_checkbox('no_hierarchy', 1, false, true);
$data['last_actions'] = html_print_input_image('add', 'images/validate.svg', 1, 'width: 40px; height: 28px', true); $data['last_actions'] = html_print_input_image('add', 'images/validate.svg', 1, '', true, ['class' => 'main_menu_icon invert_filter']);
$data['last_actions'] .= html_print_input_hidden('id', $id, true); $data['last_actions'] .= html_print_input_hidden('id', $id, true);
$data['last_actions'] .= html_print_input_hidden('add_profile', 1, true); $data['last_actions'] .= html_print_input_hidden('add_profile', 1, true);
$data['last_actions'] .= '</form>'; $data['last_actions'] .= '</form>';