Prepare combo list reload with revisions and fix box/storage in webgui
This commit is contained in:
1 parent
ee947b772f
commit
aee50ecb4f
17 files changed
+128
-43
No files matched your search
+46
-22
@@ -64,6 +64,19 @@ define('DD_INVENTORY_CATEGORY', 13);
|
||||
define('DD_BBN_VESSELDATA', 14);
|
||||
define('DD_MEASUREMENT_CATEGORY', 15);
|
||||
|
||||
// table indices which are used for combo lists
|
||||
define('TBL_VESSEL', 1);
|
||||
define('TBL_USERS', 2);
|
||||
define('TBL_COMPANIES', 3);
|
||||
define('TBL_STORAGE', 4);
|
||||
define('TBL_BOXES', 5);
|
||||
define('TBL_EQUIPMENT', 6);
|
||||
// define('TBL_INVENTORY', 7);
|
||||
define('TBL_PROJECTS', 8);
|
||||
define('TBL_CABLES', 9);
|
||||
define('TBL_FUSES', 10);
|
||||
define('TBL_TAGS', 11);
|
||||
|
||||
// ========== PAGE START CODE =================================================
|
||||
|
||||
// global version string
|
||||
@@ -840,27 +853,30 @@ function form_get_action() {
|
||||
return strtolower($submit);
|
||||
}
|
||||
|
||||
function form_create_input($fieldname, $label, $value) {
|
||||
function form_create_numeric($fieldname, $label, $value=NULL, $float=NULL) {
|
||||
// TODO WIP
|
||||
echo '<div class="mb-3">', "\n";
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
function form_create_text($fieldname, $label, $value) {
|
||||
// TODO WIP
|
||||
function form_create_text($fieldname, $label, $value=NULL, $maxlen=NULL) {
|
||||
// create generic text entry with assigned label
|
||||
// TODO maxlength, required, errortext
|
||||
echo '<div class="mb-3">', "\n";
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
function form_create_check($fieldname, $label, $checked) {
|
||||
// create single checkbox with assigned label
|
||||
echo '<div class="mb-3">', "\n";
|
||||
echo '<input type="checkbox" class="form-check-input" name="', $fieldname, '" id="', $fieldname, '"';
|
||||
if ($checked) {
|
||||
echo ' checked';
|
||||
echo '<label for="', $fieldname, '" class="form-label">', $label, "</label>\n";
|
||||
echo '<input type="text" class="form-control" id="', $fieldname, '" name="', $fieldname;
|
||||
if ($value !== NULL) {
|
||||
echo ' value="', $value, '"';
|
||||
}
|
||||
echo ">\n";
|
||||
echo '<label for="', $fieldname, '">', $label, "</label>\n";
|
||||
echo '">', "\n";
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
function form_create_textarea($fieldname, $label, $value) {
|
||||
// TBD
|
||||
echo '<div class="mb-3">', "\n";
|
||||
echo '<textarea>';
|
||||
echo '</textarea>', "\n";
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
@@ -879,6 +895,22 @@ function form_create_select($fieldname, $label, $optlist, $selval=NULL, $multipl
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
function form_create_option($fieldname, $label) {
|
||||
// TBD
|
||||
}
|
||||
|
||||
function form_create_check($fieldname, $label, $checked) {
|
||||
// create single checkbox with assigned label
|
||||
echo '<div class="mb-3">', "\n";
|
||||
echo '<input type="checkbox" class="form-check-input" name="', $fieldname, '" id="', $fieldname, '"';
|
||||
if ($checked) {
|
||||
echo ' checked';
|
||||
}
|
||||
echo ">\n";
|
||||
echo '<label for="', $fieldname, '">', $label, "</label>\n";
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
function form_create_checks($fieldname, $label, $optlist, $selected = []) {
|
||||
// create multiple combined checkboxes with title
|
||||
echo '<fieldset class="mb-3">';
|
||||
@@ -897,14 +929,6 @@ function form_create_checks($fieldname, $label, $optlist, $selected = []) {
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
// TODO DEPRECATED for touch multiple adjacent buttuns are not well suited.
|
||||
function form_action_buttons($script, $id) {
|
||||
echo "<td>";
|
||||
echo '<a title="', _('View'), '" href="', $script, '?f=view&id=', $id, '"><i class="bi-eye"></i></a>', "\n";
|
||||
echo '<a title="', _('Edit'), '" href="', $script, '?f=edit&id=', $id, '"><i class="bi-pencil"></i></a>', "\n";
|
||||
echo "</td>\n";
|
||||
}
|
||||
|
||||
function form_add_button($script, $id=NULL, $idname='id') {
|
||||
echo '<div class="container-fluid px-0 my-3">', "\n";
|
||||
echo '<a href="', $script, '?f=add';
|
||||
|
||||
Reference in new issue
Block a user