Webgui code improvements and fixes
This commit is contained in:
1 parent
dacf32b401
commit
5fe9a52f15
14 files changed
+205
-311
No files matched your search
+10
-1
@@ -15,6 +15,7 @@ $pagetitle=_('Inventory');
|
||||
|
||||
$id = gpc_get_int($_REQUEST, 'id', 0);
|
||||
|
||||
$opt_conttype = db_load_enum('inventory', 'conttype', true, true);
|
||||
$opt_storage = db_get_opt_storage($user->vid);
|
||||
$opt_box = db_get_opt_box($user->vid);
|
||||
$opt_invcond = db_load_enum('inventory', 'invcond', true, true);
|
||||
@@ -288,6 +289,10 @@ elseif ($action == ACT_ADD):
|
||||
echo '<h2>', _('Add Inventory'), "</h2>\n";
|
||||
?>
|
||||
<form method="post" action="<?=$g_scriptname?>">
|
||||
<?php
|
||||
form_create_text('invname', _('Name'), 80, NULL, TRUE, TRUE);
|
||||
form_create_numeric('number', _('Number'), 0, 9999, 1);
|
||||
/*
|
||||
<div class="mb-3">
|
||||
<label for="invname" class="form-label"><?=_('Name')?></label>
|
||||
<input type="text" class="form-control" id="invname" name="invname" autofocus>
|
||||
@@ -303,7 +308,9 @@ echo '<h2>', _('Add Inventory'), "</h2>\n";
|
||||
<option value="box"><?=_('Box')?></option>
|
||||
</select>
|
||||
</div>
|
||||
<?php
|
||||
*/
|
||||
form_create_select('conttype', _('Container type'), $opt_conttype, 'storage');
|
||||
|
||||
// load current filter setting for storage default setting
|
||||
$flt = db_get_filter($user->id, 201, ['stor','cond','txt']);
|
||||
form_create_select('sid', _('Storage'), $g_opt_none + $opt_storage, $flt->stor);
|
||||
@@ -430,6 +437,8 @@ $opt_conttype = db_load_enum('inventory', 'conttype', true, true);
|
||||
form_create_select('conttype', _('Container type'), $opt_conttype, $inventory->conttype);
|
||||
form_create_select('sid', _('Storage'), $g_opt_none + $opt_storage, $inventory->sid);
|
||||
form_create_select('boxid', _('Box'), $g_opt_none + $opt_box, $inventory->boxid);
|
||||
|
||||
// form_create_numeric
|
||||
?>
|
||||
<div class="mb-3">
|
||||
<label for="price" class="form-label"><?=sprintf(_('Price, %s'), $g_lconv['currency_symbol']); ?></label>
|
||||
|
||||
Reference in new issue
Block a user