getMessage()) ); } } $table = new StdClass(); $table->width = '100%'; $table->class = 'databox filters'; $table->data = []; $table->rowspan = []; $table->colspan = []; $table->data[0][0] = __('Token label'); $table->data[0][1] = html_print_input_text( 'label', $token['label'], '', 50, 255, true ); if ((bool) users_is_admin() === true) { $table->data[0][2] = __('User'); $user_users = users_get_user_users( $config['id_user'], 'AR', true ); $table->data[0][3] = html_print_select( $user_users, 'idUser', $config['id_user'], '', '', 0, true ); } $expiration_date = null; $expiration_time = null; if (empty($token['validity']) === false) { $array_date = explode(' ', io_safe_output($token['validity'])); if (is_array($array_date) === true) { $expiration_date = $array_date[0]; if (isset($array_date[1]) === true && empty($array_date[1]) === false ) { $expiration_time = $array_date[1]; } } } $table->data[1][0] = __('Expiration'); $table->data[1][1] = html_print_input_text( 'date-expiration', $expiration_date, '', 50, 255, true ).html_print_input_hidden('today_date', date('Y-m-d'), true); $table->data[1][2] = __('Expiration Time'); $table->data[1][3] = html_print_input_text( 'time-expiration', $expiration_time, '', 50, 255, true ).html_print_input_hidden('today_time', date('H:i:s'), true); echo '
'; html_print_table($table); $actionButtons = []; if (empty($id_token) === true) { $actionButtons[] = html_print_submit_button( __('Create'), 'next', false, ['icon' => 'wand'], true ); html_print_input_hidden('create_token', 1); } else { $actionButtons[] = html_print_submit_button( __('Update'), 'next', false, ['icon' => 'update'], true ); html_print_input_hidden('id_token', $id_token); html_print_input_hidden('update_token', 1); } $actionButtons[] = html_print_go_back_button( ui_get_full_url($url_list), ['button_class' => ''], true ); html_print_action_buttons( implode('', $actionButtons), ['type' => 'form_action'] ); echo '
'; ui_include_time_picker(); ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/'); ?>