Settings page finished, filter gui improved
This commit is contained in:
+21
-8
@@ -185,7 +185,7 @@ form_view_buttons($g_scriptname, $id);
|
|||||||
|
|
||||||
// Inventory in box
|
// Inventory in box
|
||||||
// WIP
|
// WIP
|
||||||
$sql = "SELECT invid, invname, weight FROM inventory WHERE conttype='box' AND boxid=?";
|
$sql = "SELECT invid, invname, weight, number FROM inventory WHERE conttype='box' AND boxid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
$sth->execute([$id]);
|
$sth->execute([$id]);
|
||||||
$res = $sth->fetchAll();
|
$res = $sth->fetchAll();
|
||||||
@@ -195,21 +195,34 @@ $weight_total = 0.0;
|
|||||||
if ($res) {
|
if ($res) {
|
||||||
echo '<table class="table table-striped">', "\n";
|
echo '<table class="table table-striped">', "\n";
|
||||||
echo "<thead>\n";
|
echo "<thead>\n";
|
||||||
echo "<tr>";
|
echo '<tr>';
|
||||||
|
echo '<th>#</th>';
|
||||||
echo '<th>', _('Inventory'), "</th>";
|
echo '<th>', _('Inventory'), "</th>";
|
||||||
|
echo '<th>', _('Number'), "</th>";
|
||||||
echo '<th>', _('Weight'), "</th>";
|
echo '<th>', _('Weight'), "</th>";
|
||||||
echo "<td></td>";
|
echo "</thead>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
$i = 1;
|
||||||
foreach ($res as $row) {
|
foreach ($res as $row) {
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td>", $row['invname'], "</td>\n";
|
echo '<td>', $i++, ' ';
|
||||||
echo "<td>", format_float($row['weight'], 2, 'kg'), "</td>\n";
|
echo '<a class="text-nowrap" title="', _('View'), '" href="inventory.php?f=view&id=', $row['invid'], '"><i class="bi bi-eye ms-2"></i></a>';
|
||||||
form_action_buttons('inventory.php', $row['invid']);
|
echo "</td>\n";
|
||||||
|
echo '<td>', $row['invname'], "</td>\n";
|
||||||
|
echo '<td>', $row['number'], "</td>\n";
|
||||||
|
echo '<td>';
|
||||||
|
$weight_item = $row['weight'] * $row['number'];
|
||||||
|
if ($weight_item > 0) {
|
||||||
|
$weight_total += $weight_item;
|
||||||
|
echo format_float($weight_item, 2, 'kg');
|
||||||
|
} else {
|
||||||
|
echo '-';
|
||||||
|
}
|
||||||
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
$weight_total += $row['weight'];
|
|
||||||
}
|
}
|
||||||
echo "<tfoot>";
|
echo "<tfoot>";
|
||||||
echo '<tr><td></td><td>', format_float($weight_total, 2, 'kg'), '</td>', "\n";
|
echo '<tr><td colspan="3"></td><td>', format_float($weight_total, 2, 'kg'), '</td>', "\n";
|
||||||
echo "</tfoot>\n";
|
echo "</tfoot>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+13
-6
@@ -264,9 +264,17 @@ echo '<tr><th scope="row">', _('Street'),"</th><td>", $company->street, "</td></
|
|||||||
echo '<tr><th scope="row">', _('Zip, City'),"</th><td>", $company->zip, ' ', $company->city, "</td></tr>\n";
|
echo '<tr><th scope="row">', _('Zip, City'),"</th><td>", $company->zip, ' ', $company->city, "</td></tr>\n";
|
||||||
echo '<tr><th scope="row">', _('Country'),"</th><td>", $company->country, "</td></tr>\n";
|
echo '<tr><th scope="row">', _('Country'),"</th><td>", $company->country, "</td></tr>\n";
|
||||||
echo '<tr><th scope="row">', _('Contact'),"</th><td>", $company->contact, "</td></tr>\n";
|
echo '<tr><th scope="row">', _('Contact'),"</th><td>", $company->contact, "</td></tr>\n";
|
||||||
echo '<tr><th scope="row">', _('Phone'),"</th><td>", $company->phone, "</td></tr>\n";
|
|
||||||
echo '<tr><th scope="row">', _('Email'),"</th><td>", $company->email, "</td></tr>\n";
|
echo '<tr><th scope="row">', _('Phone'),"</th><td>";
|
||||||
echo '<tr><th scope="row">', _('Web'),"</th><td>", $company->web, "</td></tr>\n";
|
echo make_phonelink($company->phone),' ', $company->phone, "</td></tr>\n";
|
||||||
|
|
||||||
|
echo '<tr><th scope="row">', _('Email'),"</th><td>";
|
||||||
|
echo make_maillink($company->email),' ', $company->email, "</td></tr>\n";
|
||||||
|
|
||||||
|
echo '<tr><th scope="row">', _('Web'),"</th><td>";
|
||||||
|
// echo '<a title="', _('Go to website'), '" href="',
|
||||||
|
echo make_weblink($company->web), ' ', $company->web, "</td></tr>\n";
|
||||||
|
|
||||||
echo '<tr><th scope="row">', _('Customer no.'),"</th><td>", $company->customerno, "</td></tr>\n";
|
echo '<tr><th scope="row">', _('Customer no.'),"</th><td>", $company->customerno, "</td></tr>\n";
|
||||||
echo '<tr><th scope="row">', _('Contract no.'),"</th><td>", $company->contractno, "</td></tr>\n";
|
echo '<tr><th scope="row">', _('Contract no.'),"</th><td>", $company->contractno, "</td></tr>\n";
|
||||||
echo '<tr><th scope="row">', _('Remarks'),"</th><td>", $company->remarks, "</td></tr>\n";
|
echo '<tr><th scope="row">', _('Remarks'),"</th><td>", $company->remarks, "</td></tr>\n";
|
||||||
@@ -292,14 +300,13 @@ if ($sth->rowCount() > 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// show referenced invoices
|
// show referenced invoices
|
||||||
|
|
||||||
$sql = "SELECT docid, refid, filename, title "
|
$sql = "SELECT docid, refid, filename, title "
|
||||||
. "FROM docref AS r JOIN document AS d USING (docid) "
|
. "FROM docref AS r JOIN document AS d USING (docid) "
|
||||||
. "WHERE reftype='company' AND refid=?";
|
. "WHERE r.reftype='company' AND r.refid=? AND d.doctype='invoice'";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
$sth->execute([$id]);
|
$sth->execute([$id]);
|
||||||
if ($sth->rowCount() > 0) {
|
if ($sth->rowCount() > 0) {
|
||||||
echo "<p>Invoices:</p>\n";
|
echo "<p>", _('Invoices'), ":</p>\n";
|
||||||
echo "<ul>\n";
|
echo "<ul>\n";
|
||||||
foreach ($sth->fetchAll() as $row) {
|
foreach ($sth->fetchAll() as $row) {
|
||||||
echo "<li>";
|
echo "<li>";
|
||||||
|
|||||||
+19
-5
@@ -313,9 +313,11 @@ $opt_special = array(
|
|||||||
<form method="post" action="<?=$g_scriptname?>">
|
<form method="post" action="<?=$g_scriptname?>">
|
||||||
<div id="filter" class="card">
|
<div id="filter" class="card">
|
||||||
<div class="card-header"><i class="bi bi-funnel me-2"></i>Filter</div>
|
<div class="card-header"><i class="bi bi-funnel me-2"></i>Filter</div>
|
||||||
<div class="card-body">
|
<div class="card-body d-flex flex-wrap gap-3">
|
||||||
|
|
||||||
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<label for="flt_doctype">Type</label>
|
<label for="flt_doctype">Type</label>
|
||||||
<select id="flt_doctype" name="flt_doctype">
|
<select class="form-select" id="flt_doctype" name="flt_doctype">
|
||||||
<?php
|
<?php
|
||||||
foreach ($opt_special + $opt_doctype as $k => $v) {
|
foreach ($opt_special + $opt_doctype as $k => $v) {
|
||||||
echo '<option value="', $k,'"';
|
echo '<option value="', $k,'"';
|
||||||
@@ -326,8 +328,11 @@ foreach ($opt_special + $opt_doctype as $k => $v) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<label for="flt_reftype"><?=_('Ref.-Type')?></label>
|
</div>
|
||||||
<select id="flt_reftype" name="flt_reftype">
|
|
||||||
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
|
<label for="flt_reftype"><?=_('Reference')?></label>
|
||||||
|
<select class="form-select" id="flt_reftype" name="flt_reftype">
|
||||||
<?php
|
<?php
|
||||||
$opt_special['none'] = _('― none ―');
|
$opt_special['none'] = _('― none ―');
|
||||||
foreach ($opt_special + $opt_reftype as $k => $v) {
|
foreach ($opt_special + $opt_reftype as $k => $v) {
|
||||||
@@ -339,11 +344,20 @@ foreach ($opt_special + $opt_reftype as $k => $v) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<label for="flt_txt">Text</label>
|
<label for="flt_txt">Text</label>
|
||||||
<input type="text" name="flt_txt" size="15" maxlength="30" value="<?=$flt->txt?>">
|
<input type="text" class="form-control" name="flt_txt" size="15" maxlength="30" value="<?=$flt->txt ?>">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-footer">
|
||||||
<button name="submit[filter]" class="btn btn-sm btn-primary" title="<?=_('Apply')?>"><?=_('Go')?></button>
|
<button name="submit[filter]" class="btn btn-sm btn-primary" title="<?=_('Apply')?>"><?=_('Go')?></button>
|
||||||
<button name="submit[freset]" class="btn btn-sm btn-secondary float-end" title="<?=_('Reset filter to defaults')?>"><?=_('Clear')?></button>
|
<button name="submit[freset]" class="btn btn-sm btn-secondary float-end" title="<?=_('Reset filter to defaults')?>"><?=_('Clear')?></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
+51
-15
@@ -36,6 +36,8 @@ switch ($submit = form_get_action()) {
|
|||||||
$flt['manuf'] = gpc_get_int($_POST, 'flt_manuf');
|
$flt['manuf'] = gpc_get_int($_POST, 'flt_manuf');
|
||||||
$flt['supp'] = gpc_get_int($_POST, 'flt_supp');
|
$flt['supp'] = gpc_get_int($_POST, 'flt_supp');
|
||||||
$flt['txt'] = gpc_get_string($_POST, 'flt_txt');
|
$flt['txt'] = gpc_get_string($_POST, 'flt_txt');
|
||||||
|
$allowed = db_load_enum('equipment', 'flags');
|
||||||
|
$flt['flags'] = gpc_get_set($_POST, 'flt_flags', $allowed);
|
||||||
db_save_filter($flt, 200);
|
db_save_filter($flt, 200);
|
||||||
$action = ACT_DEFAULT;
|
$action = ACT_DEFAULT;
|
||||||
break;
|
break;
|
||||||
@@ -144,10 +146,10 @@ switch ($submit = form_get_action()) {
|
|||||||
if ($factor < 1) {
|
if ($factor < 1) {
|
||||||
$width = (int)($width * $factor);
|
$width = (int)($width * $factor);
|
||||||
$height = (int)($height * $factor);
|
$height = (int)($height * $factor);
|
||||||
$g_message->add(sprintf(_('Image sacled down to %dx%d'), $width, $height));
|
$g_message->add(sprintf(_('Image scaled down to %dx%d'), $width, $height));
|
||||||
if ($file_mimetype == 'image/jpeg') {
|
if ($file_mimetype == 'image/jpeg') {
|
||||||
$orig = imagecreatefromjpeg($file_tmp);
|
$orig = imagecreatefromjpeg($file_tmp);
|
||||||
$scaled = imagescale($orig, (int)($width * $factor), (int)($height * $factor), IMG_BICUBIC);
|
$scaled = imagescale($orig, $width, $height, IMG_BICUBIC);
|
||||||
imagejpeg($scaled, $file_tmp, 85);
|
imagejpeg($scaled, $file_tmp, 85);
|
||||||
} else if ($file_mimetype == 'image/png') {
|
} else if ($file_mimetype == 'image/png') {
|
||||||
$orig = imagecreatefrompng($file_tmp);
|
$orig = imagecreatefrompng($file_tmp);
|
||||||
@@ -155,7 +157,7 @@ switch ($submit = form_get_action()) {
|
|||||||
$g_error->Add("imagecreatefrompng failed");
|
$g_error->Add("imagecreatefrompng failed");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$scaled = imagescale($orig, (int)($width * $factor), (int)($height * $factor), IMG_BICUBIC);
|
$scaled = imagescale($orig, $width, $height, IMG_BICUBIC);
|
||||||
if (!$scaled) {
|
if (!$scaled) {
|
||||||
$g_error->Add("imagescale failed");
|
$g_error->Add("imagescale failed");
|
||||||
break;
|
break;
|
||||||
@@ -231,7 +233,6 @@ if ($action == ACT_DEFAULT):
|
|||||||
page_caption_search($pagetitle);
|
page_caption_search($pagetitle);
|
||||||
|
|
||||||
$flt = db_get_filter($user->id, 200);
|
$flt = db_get_filter($user->id, 200);
|
||||||
|
|
||||||
$sort = array(
|
$sort = array(
|
||||||
1 => 'ename',
|
1 => 'ename',
|
||||||
2 => 'ename DESC'
|
2 => 'ename DESC'
|
||||||
@@ -261,12 +262,21 @@ if (strlen($flt->txt) > 1) {
|
|||||||
$w[] = '(ename LIKE :txt OR model LIKE :txt OR remarks LIKE :txt)';
|
$w[] = '(ename LIKE :txt OR model LIKE :txt OR remarks LIKE :txt)';
|
||||||
$p[':txt'] = '%'.$flt->txt.'%';
|
$p[':txt'] = '%'.$flt->txt.'%';
|
||||||
}
|
}
|
||||||
// TODO flags (ordered, removed, deleted)
|
// condition for multiple flags is OR
|
||||||
// if (strlen($flt->flags) > 0) {
|
$parts = ["flags=''", 'flags IS NULL'];
|
||||||
// }
|
foreach ($flt->flags as $f) {
|
||||||
|
$parts[] = "FIND_IN_SET('$f', flags)";
|
||||||
|
}
|
||||||
|
if (!empty($parts)) {
|
||||||
|
if (count($parts) > 1) {
|
||||||
|
$w[] = '(' . join(' OR ', $parts) . ')';
|
||||||
|
} else {
|
||||||
|
$w[] = $parts[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$where = join(' AND ', $w);
|
$where = join(' AND ', $w);
|
||||||
$order = ' ORDER BY ename';
|
$order = ' ORDER BY ename';
|
||||||
|
|
||||||
// get total record count for pagination and limit
|
// get total record count for pagination and limit
|
||||||
$sth = $pdo->prepare("SELECT COUNT(*) FROM equipment WHERE " . $where);
|
$sth = $pdo->prepare("SELECT COUNT(*) FROM equipment WHERE " . $where);
|
||||||
try {
|
try {
|
||||||
@@ -314,12 +324,13 @@ filter_create_select('flt_supp', _('Supplier'), $g_opt_all + $opt_none_male + $o
|
|||||||
?>
|
?>
|
||||||
<div class="d-flex flex-nowrap gap-2">
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<label for="flt_txt"><?=_('Text')?></label>
|
<label for="flt_txt"><?=_('Text')?></label>
|
||||||
<input type="text" name="flt_txt" size="15" maxlength="30" value="<?=$flt->txt ?>">
|
<input type="text" class="form-control" name="flt_txt" maxlength="30" value="<?=$flt->txt ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex flex-nowrap gap-2">
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<?php
|
<?php
|
||||||
$enum_data = db_load_enum('equipment', 'flags', true, true, false);
|
$opt_flags = db_load_enum('equipment', 'flags', true, true, false);
|
||||||
form_create_checks('flags', _('Flags'), $enum_data, []);
|
filter_create_checks('flt_flags', _('Flags'), $opt_flags, $flt->flags ?? []);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -455,7 +466,7 @@ echo '<div class="col">', "\n";
|
|||||||
|
|
||||||
echo '<div class="card">', "\n";
|
echo '<div class="card">', "\n";
|
||||||
echo '<div class="card-header">', _('Images and documents'), "</div>\n";
|
echo '<div class="card-header">', _('Images and documents'), "</div>\n";
|
||||||
echo '<div class="card-body">', "\n";
|
echo '<div class="card-body d-flex flex-wrap gap-3">', "\n";
|
||||||
|
|
||||||
$sql = "SELECT d.docid, d.doctype, d.title "
|
$sql = "SELECT d.docid, d.doctype, d.title "
|
||||||
. "FROM docref AS r INNER JOIN document AS d using (docid) "
|
. "FROM docref AS r INNER JOIN document AS d using (docid) "
|
||||||
@@ -468,13 +479,19 @@ $res = $sth->fetchAll();
|
|||||||
$doccount = 0;
|
$doccount = 0;
|
||||||
foreach ($res as $row) {
|
foreach ($res as $row) {
|
||||||
$doccount += 1;
|
$doccount += 1;
|
||||||
|
echo '<div class="border rounded p-2 d-flex flex-column" style="width: 150px;">';
|
||||||
if ($row['doctype'] == 'picture') {
|
if ($row['doctype'] == 'picture') {
|
||||||
echo '<a href="dl.php?id=', $row['docid'], '">';
|
echo '<a href="dl.php?id=', $row['docid'], '">';
|
||||||
// echo '<img width="120" src="doc/pic-', $row['hash'], '.', $row['extension'],'">';
|
// echo '<img width="120" src="doc/pic-', $row['hash'], '.', $row['extension'],'">';
|
||||||
echo '<img width="120" src="dl.php?id=', $row['docid'], '" alt="', $row['title'], '">';
|
echo '<img class="img-fluid rounded mb-2" width="120" src="dl.php?id=', $row['docid'], '" alt="', $row['title'], '">';
|
||||||
echo "</a>\n";
|
echo "</a>\n";
|
||||||
|
// additionally direct download and go to document details page
|
||||||
|
echo '<div class="d-flex justify-content-between mt-auto">';
|
||||||
|
echo '<a href="documents.php?f=view&id=', $row['docid'], '" title="Download image"> <i class="bi bi-eye"></i></a>';
|
||||||
|
echo '<a href="dl.php?id=', $row['docid'], '" title="View document"><i class="bi bi-download"></i></a>';
|
||||||
|
echo '</div>';
|
||||||
} elseif ($row['doctype'] == 'drawing') {
|
} elseif ($row['doctype'] == 'drawing') {
|
||||||
echo "<p>Drawing: ", $row['title'], "<br>";
|
echo "<p>Drawing:<br>", $row['title'], "<br>";
|
||||||
echo '<a href="dl.php?id=', $row['docid'], '">';
|
echo '<a href="dl.php?id=', $row['docid'], '">';
|
||||||
echo '<img width="180" src="dl.php?id=', $row['docid'], '">';
|
echo '<img width="180" src="dl.php?id=', $row['docid'], '">';
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
@@ -485,7 +502,7 @@ foreach ($res as $row) {
|
|||||||
// echo $row['title'];
|
// echo $row['title'];
|
||||||
echo "</a>\n";
|
echo "</a>\n";
|
||||||
} elseif ($row['doctype'] == 'manual') {
|
} elseif ($row['doctype'] == 'manual') {
|
||||||
echo "<p>Manual: ";
|
echo "<p>Manual:<br>";
|
||||||
echo '<a href="documents.php?f=view&id=', $row['docid'], '">';
|
echo '<a href="documents.php?f=view&id=', $row['docid'], '">';
|
||||||
echo $row['title'];
|
echo $row['title'];
|
||||||
echo "</a></p>\n";
|
echo "</a></p>\n";
|
||||||
@@ -493,6 +510,7 @@ foreach ($res as $row) {
|
|||||||
// unknown document type
|
// unknown document type
|
||||||
echo "<span>Unknown document type:", $row['doctype'], "</span>\n";
|
echo "<span>Unknown document type:", $row['doctype'], "</span>\n";
|
||||||
}
|
}
|
||||||
|
echo "</div>\n";
|
||||||
}
|
}
|
||||||
if ($doccount == 0) {
|
if ($doccount == 0) {
|
||||||
echo _('No referenced documents'), "\n";
|
echo _('No referenced documents'), "\n";
|
||||||
@@ -581,6 +599,24 @@ if ($sth->rowCount() > 0) {
|
|||||||
echo '<p>', _('No spare parts found.'), "<p>\n";
|
echo '<p>', _('No spare parts found.'), "<p>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Document preview
|
||||||
|
?>
|
||||||
|
<div class="modal fade" id="imageModal" tabindex="-1" aria-labelledby="imageModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-centered custom-image-modal">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
TITLE
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
IMAGE
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
|
||||||
elseif ($action == ACT_EDIT):
|
elseif ($action == ACT_EDIT):
|
||||||
// ========== VARIANT: edit single record =====================================
|
// ========== VARIANT: edit single record =====================================
|
||||||
|
|
||||||
|
|||||||
+101
-4
@@ -364,11 +364,28 @@ function db_exec_insert($table, $params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function db_exec_update($table, $params, $pk) {
|
function db_exec_update($table, $params, $pk) {
|
||||||
// TODO primary key with multiple fields: $pk is an array
|
// primary key can be a single field name or multiple fields: $pk is an array
|
||||||
global $pdo;
|
global $pdo;
|
||||||
global $g_error;
|
global $g_error;
|
||||||
$fields = join(',', array_map(function($s) { return ltrim($s, ':') . '=' . $s; }, array_keys($params)));
|
// remove primary key fields from list of fields to update
|
||||||
$sql = "UPDATE $table SET $fields WHERE $pk=:$pk";
|
if (is_array($pk)) {
|
||||||
|
if (count($pk) == 1) {
|
||||||
|
$pk = $pk[0];
|
||||||
|
$fields = $params;
|
||||||
|
unset($fields[':'.$pk]);
|
||||||
|
$where = "$pk=:$pk";
|
||||||
|
} else {
|
||||||
|
$pkparams = array_map(fn($value) => ':' . $value, $pk);
|
||||||
|
$fields = array_diff_key($params, array_flip($pkparams));
|
||||||
|
$where = join(' AND ', array_map(fn($s) => "$s=:$s", $pk));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$fields = $params;
|
||||||
|
unset($fields[':'.$pk]);
|
||||||
|
$where = "$pk=:$pk";
|
||||||
|
}
|
||||||
|
$fieldlist = join(',', array_map(fn($s) => ltrim($s, ':') . '=' . $s, array_keys($fields)));
|
||||||
|
$sql = "UPDATE $table SET $fieldlist WHERE $where";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
try {
|
try {
|
||||||
$sth->execute($params);
|
$sth->execute($params);
|
||||||
@@ -503,6 +520,7 @@ function db_load_enum($table, $column, $lookup=false, $as_dict=false, $check_nul
|
|||||||
// if lookup is true the name lookup and translaton is applied
|
// if lookup is true the name lookup and translaton is applied
|
||||||
// if as_dict is true the enum value is returned as the array key
|
// if as_dict is true the enum value is returned as the array key
|
||||||
// if check_null is true the nullable-check is applied and returned
|
// if check_null is true the nullable-check is applied and returned
|
||||||
|
// works also for set datatype
|
||||||
global $pdo;
|
global $pdo;
|
||||||
$sql = "SELECT TRIM(TRAILING ')' FROM SUBSTRING(column_type,6)), is_nullable "
|
$sql = "SELECT TRIM(TRAILING ')' FROM SUBSTRING(column_type,6)), is_nullable "
|
||||||
. "FROM information_schema.columns "
|
. "FROM information_schema.columns "
|
||||||
@@ -903,6 +921,7 @@ function form_create_checks($fieldname, $label, $optlist, $selected) {
|
|||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO DEPRECATED for touch multiple adjacent buttuns are not well suited.
|
||||||
function form_action_buttons($script, $id) {
|
function form_action_buttons($script, $id) {
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
echo '<a title="', _('View'), '" href="', $script, '?f=view&id=', $id, '"><i class="bi-eye"></i></a>', "\n";
|
echo '<a title="', _('View'), '" href="', $script, '?f=view&id=', $id, '"><i class="bi-eye"></i></a>', "\n";
|
||||||
@@ -980,7 +999,7 @@ function filter_create_select($fieldname, $label, $optlist, $selval=NULL, $multi
|
|||||||
} */
|
} */
|
||||||
echo '<div class="d-flex flex-nowrap gap-2">', "\n";
|
echo '<div class="d-flex flex-nowrap gap-2">', "\n";
|
||||||
echo '<label for="', $fieldname,'">', $label,'</label>', "\n";
|
echo '<label for="', $fieldname,'">', $label,'</label>', "\n";
|
||||||
echo '<select id="', $fieldname, '" name="', $fieldname, '"', $multiple ? ' multiple' : '', ">\n";
|
echo '<select class="form-select" id="', $fieldname, '" name="', $fieldname, '"', $multiple ? ' multiple' : '', ">\n";
|
||||||
foreach ($optlist as $k => $v) {
|
foreach ($optlist as $k => $v) {
|
||||||
echo '<option value="', $k, '"';
|
echo '<option value="', $k, '"';
|
||||||
if ($k == $selval) {
|
if ($k == $selval) {
|
||||||
@@ -992,6 +1011,24 @@ function filter_create_select($fieldname, $label, $optlist, $selval=NULL, $multi
|
|||||||
echo "</div>";
|
echo "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function filter_create_checks($fieldname, $label, $optlist, $selected = []) {
|
||||||
|
// TODO WIP
|
||||||
|
echo '<fieldset class="mb-3">';
|
||||||
|
echo '<legend class="fs-6 mb-1 border-bottom pb-1">', $label, "</legend>\n";
|
||||||
|
echo '<div class="d-flex flex-wrap gap-3">';
|
||||||
|
foreach ($optlist as $k => $v) {
|
||||||
|
echo '<div class="form-check">';
|
||||||
|
$checked = in_array($k, $selected, true) ? ' checked' : '';
|
||||||
|
echo '<label class="form-check-label">';
|
||||||
|
echo '<input type="checkbox" class="form-check-input" name="', $fieldname, '[', $k, ']"', $checked, '>';
|
||||||
|
echo $v;
|
||||||
|
echo '</label>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
echo '</div>';
|
||||||
|
echo '</fieldset>';
|
||||||
|
}
|
||||||
|
|
||||||
// ========== FORMAT FUNCTIONS ================================================
|
// ========== FORMAT FUNCTIONS ================================================
|
||||||
|
|
||||||
function format_float($val, $decimals = 2, $suffix = '') {
|
function format_float($val, $decimals = 2, $suffix = '') {
|
||||||
@@ -1202,6 +1239,66 @@ function pdf_get_preview($docid) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function make_weblink($dest) {
|
||||||
|
$dest = trim($dest);
|
||||||
|
if ($dest === '') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$scheme = strtolower((string) parse_url($dest, PHP_URL_SCHEME));
|
||||||
|
if ($scheme === '') {
|
||||||
|
$dest = 'https://' . $dest;
|
||||||
|
} elseif (!in_array($scheme, ['http', 'https'], true)) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return '<a href="' . $dest . '"><i class="bi-globe"></i></a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function make_maillink($dest) {
|
||||||
|
$dest = trim($dest);
|
||||||
|
if ($dest === '') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$scheme = strtolower((string) parse_url($dest, PHP_URL_SCHEME));
|
||||||
|
if ($scheme === '') {
|
||||||
|
$dest = 'mailto:' . $dest;
|
||||||
|
} elseif ($scheme !== 'mailto') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return '<a href="' . $dest . '"><i class="bi-envelope"></i></a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function make_phonelink($dest) {
|
||||||
|
$dest = normalize_phone_e164($dest);
|
||||||
|
if ($dest === '') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$scheme = strtolower((string) parse_url($dest, PHP_URL_SCHEME));
|
||||||
|
if ($scheme === '') {
|
||||||
|
$dest = 'tel:' . $dest;
|
||||||
|
} elseif ($scheme !== 'tel') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return '<a href="' . $dest . '"><i class="bi-telephone"></i></a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalize_phone_e164($phone) {
|
||||||
|
$phone = trim($phone);
|
||||||
|
if ($phone === '') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$phone = preg_replace('/[^\d+]/', '', $phone);
|
||||||
|
if (str_starts_with($phone, '+')) {
|
||||||
|
return $phone;
|
||||||
|
}
|
||||||
|
if (str_starts_with($phone, '00')) {
|
||||||
|
return '+' . substr($phone, 2);
|
||||||
|
}
|
||||||
|
if (str_starts_with($phone, '0')) {
|
||||||
|
$phone = substr($phone, 1);
|
||||||
|
}
|
||||||
|
return '+49' . $phone;
|
||||||
|
}
|
||||||
|
|
||||||
// ========== MENU FUNCTIONS ==================================================
|
// ========== MENU FUNCTIONS ==================================================
|
||||||
|
|
||||||
$g_menu = Array (
|
$g_menu = Array (
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ $opt_special = array(
|
|||||||
?>
|
?>
|
||||||
<div class="d-flex flex-nowrap gap-2">
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<label for="flt_stor"><?=_('Storage')?></label>
|
<label for="flt_stor"><?=_('Storage')?></label>
|
||||||
<select id="flt_stor" name="flt_stor">
|
<select class="form-select" id="flt_stor" name="flt_stor">
|
||||||
<?php
|
<?php
|
||||||
foreach ($opt_special + $opt_storage as $k => $v) {
|
foreach ($opt_special + $opt_storage as $k => $v) {
|
||||||
echo '<option value="', $k,'"';
|
echo '<option value="', $k,'"';
|
||||||
@@ -202,7 +202,7 @@ foreach ($opt_special + $opt_storage as $k => $v) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="d-flex flex-nowrap gap-2">
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<label for="flt_cond"><?=_('Condition')?></label>
|
<label for="flt_cond"><?=_('Condition')?></label>
|
||||||
<select id="flt_cond" name="flt_cond">
|
<select class="form-select" id="flt_cond" name="flt_cond">
|
||||||
<?php
|
<?php
|
||||||
$opt_special = array(
|
$opt_special = array(
|
||||||
-2 => _('― all ―'),
|
-2 => _('― all ―'),
|
||||||
@@ -219,7 +219,7 @@ foreach ($opt_special + $opt_invcond as $k => $v) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="d-flex flex-nowrap gap-2">
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<label for="flt_txt">Text</label>
|
<label for="flt_txt">Text</label>
|
||||||
<input type="text" name="flt_txt" size="15" maxlength="30" value="<?=$flt->txt ?>">
|
<input type="text" class="form-control" name="flt_txt" size="15" maxlength="30" value="<?=$flt->txt ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
|
|||||||
@@ -110,3 +110,15 @@ function gpc_get_enum(&$GPC, $varname, $values, $default = NULL) {
|
|||||||
}
|
}
|
||||||
return $GPC[$varname];
|
return $GPC[$varname];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function gpc_get_set(&$GPC, $varname, $allowed, $as_string = false, $default = []) {
|
||||||
|
if (!isset($GPC[$varname])) {
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
$selected = array_intersect($allowed, array_keys($GPC[$varname]));
|
||||||
|
if ($as_string) {
|
||||||
|
return implode(',', $selected);
|
||||||
|
} else {
|
||||||
|
return array_values($selected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ $opt_special = array(
|
|||||||
<div class="card-body d-flex flex-wrap gap-3">
|
<div class="card-body d-flex flex-wrap gap-3">
|
||||||
<div class="d-flex flex-nowrap gap-2">
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<label for="flt_equip"><?=_('Equipment')?></label>
|
<label for="flt_equip"><?=_('Equipment')?></label>
|
||||||
<select id="flt_equip" name="flt_equip">
|
<select class="form-select" id="flt_equip" name="flt_equip">
|
||||||
<?php
|
<?php
|
||||||
foreach ($opt_special + $opt_equipment as $k => $v) {
|
foreach ($opt_special + $opt_equipment as $k => $v) {
|
||||||
echo '<option value="', $k,'"';
|
echo '<option value="', $k,'"';
|
||||||
@@ -107,7 +107,7 @@ foreach ($opt_special + $opt_equipment as $k => $v) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="d-flex flex-nowrap gap-2">
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<label for="flt_txt">Text</label>
|
<label for="flt_txt">Text</label>
|
||||||
<input type="text" name="flt_txt" size="15" maxlength="30" value="<?=$flt->txt ?? ''?>">
|
<input type="text" class="form-control" name="flt_txt" maxlength="30" value="<?=$flt->txt ?? ''?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
|
|||||||
+1
-1
@@ -104,7 +104,7 @@ Auswahl an anderen Stellen im Programm benötigt.</p>
|
|||||||
|
|
||||||
<h3>Dokumente</h3>
|
<h3>Dokumente</h3>
|
||||||
<p>Ein Dokument kann mehrfach zugeordnet werden. Z.B. einem
|
<p>Ein Dokument kann mehrfach zugeordnet werden. Z.B. einem
|
||||||
Ausrüstungsgegenstand und gleichzeitig einem Projekt oder einer Aufgabe.</p>
|
Ausrüstungsgegenstand und gleichzeitig einer Firma, einem Projekt oder einer Aufgabe.</p>
|
||||||
<p>Es stehen verschiedene Dokumentarten zur Verfügung:</p>
|
<p>Es stehen verschiedene Dokumentarten zur Verfügung:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Fotos bzw. Bilder als png- oder jpg-Dateien</li>
|
<li>Fotos bzw. Bilder als png- oder jpg-Dateien</li>
|
||||||
|
|||||||
+15
-4
@@ -15,6 +15,7 @@ $id = gpc_get_int($_REQUEST, 'id', 0);
|
|||||||
|
|
||||||
$opt_mtype = db_load_enum('measurement', 'mtype', true, false);
|
$opt_mtype = db_load_enum('measurement', 'mtype', true, false);
|
||||||
$opt_unit = db_get_options(8);
|
$opt_unit = db_get_options(8);
|
||||||
|
// TODO use enum function
|
||||||
$opt_accuracy = array(
|
$opt_accuracy = array(
|
||||||
'unknown' => _('Unknown'),
|
'unknown' => _('Unknown'),
|
||||||
'precise' => _('Precise'),
|
'precise' => _('Precise'),
|
||||||
@@ -55,6 +56,7 @@ switch ($submit = form_get_action()) {
|
|||||||
|
|
||||||
case 'insert':
|
case 'insert':
|
||||||
$p[':mname'] = gpc_get_string($_POST, 'mname');
|
$p[':mname'] = gpc_get_string($_POST, 'mname');
|
||||||
|
$p[':mtype'] = gpc_get_string($_POST, 'mtype');
|
||||||
$p[':note'] = gpc_get_string($_POST, 'note');
|
$p[':note'] = gpc_get_string($_POST, 'note');
|
||||||
$p[':nval'] = gpc_get_int($_POST, 'nval'); // 1 to 3 dimensions
|
$p[':nval'] = gpc_get_int($_POST, 'nval'); // 1 to 3 dimensions
|
||||||
$p[':val1'] = gpc_get_int($_POST, 'val1');
|
$p[':val1'] = gpc_get_int($_POST, 'val1');
|
||||||
@@ -79,6 +81,7 @@ switch ($submit = form_get_action()) {
|
|||||||
case 'update':
|
case 'update':
|
||||||
$p[':mid'] = $id;
|
$p[':mid'] = $id;
|
||||||
$p[':mname'] = gpc_get_string($_POST, 'mname');
|
$p[':mname'] = gpc_get_string($_POST, 'mname');
|
||||||
|
$p[':mtype'] = gpc_get_string($_POST, 'mtype');
|
||||||
$p[':nval'] = gpc_get_int($_POST, 'nval'); // 1 to 3 dimensions
|
$p[':nval'] = gpc_get_int($_POST, 'nval'); // 1 to 3 dimensions
|
||||||
$p[':val1'] = gpc_get_int($_POST, 'val1');
|
$p[':val1'] = gpc_get_int($_POST, 'val1');
|
||||||
$p[':val2'] = NULL;
|
$p[':val2'] = NULL;
|
||||||
@@ -171,6 +174,7 @@ $res = $sth->fetchAll();
|
|||||||
echo '<table class="table table-striped">', "\n";
|
echo '<table class="table table-striped">', "\n";
|
||||||
echo "<thead>\n";
|
echo "<thead>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
|
echo '<th>#</th>';
|
||||||
echo '<th>', _('Measurement'), "</th>";
|
echo '<th>', _('Measurement'), "</th>";
|
||||||
echo '<th>', _('Note'), "</th>";
|
echo '<th>', _('Note'), "</th>";
|
||||||
echo '<th class="text-end">', _('Measured'), "</th>";
|
echo '<th class="text-end">', _('Measured'), "</th>";
|
||||||
@@ -179,16 +183,20 @@ echo '<th>', _('Accuracy'), "</th>";
|
|||||||
echo "<th></th>";
|
echo "<th></th>";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</thead>\n";
|
echo "</thead>\n";
|
||||||
|
$i = 0;
|
||||||
foreach ($res as $row) {
|
foreach ($res as $row) {
|
||||||
|
$i++;
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
|
echo '<td>', $i;
|
||||||
|
echo '<a class="text-nowrap" title="', _('View'), '" href="', $g_scriptname, '?f=view&id=', $row['mid'], '"><i class="bi bi-eye ms-2"></i></a>';
|
||||||
|
echo "</td>\n";
|
||||||
echo "<td>", $row['mname'], "</td>\n";
|
echo "<td>", $row['mname'], "</td>\n";
|
||||||
echo "<td>", $row['note'], "</td>\n";
|
echo "<td>", $row['note'], "</td>\n";
|
||||||
echo '<td class="text-end">', format_vals($row['nval'], $row['val1'], $row['val2'], $row['val3']), "</td>\n";
|
echo '<td class="text-end">', format_vals($row['nval'], $row['val1'], $row['val2'], $row['val3']), "</td>\n";
|
||||||
echo "<td>", $opt_unit[$row['unit']], "</td>\n";
|
echo "<td>", $opt_unit[$row['unit']], "</td>\n";
|
||||||
echo "<td>", $opt_accuracy[$row['accuracy']], "</td>\n";
|
echo "<td>", $opt_accuracy[$row['accuracy']], "</td>\n";
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
// Action buttons
|
echo '<a class="text-nowrap" title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['mid'], '"><i class="bi bi-pencil ms-2"></i></a>';
|
||||||
form_action_buttons($g_scriptname, $row['mid']);
|
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
@@ -216,6 +224,7 @@ echo '<h2>', _('Add measurement'), "</h2>\n";
|
|||||||
<input type="text" class="form-control" id="note" name="note">
|
<input type="text" class="form-control" id="note" name="note">
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
form_create_select('mtype', _('Type'), $opt_mtype);
|
||||||
form_create_select('nval', _('Dimensions'), $opt_dimensions);
|
form_create_select('nval', _('Dimensions'), $opt_dimensions);
|
||||||
?>
|
?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@@ -245,7 +254,7 @@ form_create_select('eid', _('Equipment'), $opt_equipment, $id);
|
|||||||
elseif ($action == ACT_VIEW):
|
elseif ($action == ACT_VIEW):
|
||||||
// ========== VARIANT: view single record =====================================
|
// ========== VARIANT: view single record =====================================
|
||||||
|
|
||||||
$sql = "SELECT mname, unit, nval, val1, val2, val3, accuracy, mdate, note, eid "
|
$sql = "SELECT mname, mtype, unit, nval, val1, val2, val3, accuracy, mdate, note, eid "
|
||||||
. "FROM measurement "
|
. "FROM measurement "
|
||||||
. "WHERE mid=?";
|
. "WHERE mid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -256,6 +265,7 @@ echo '<h2>', _('Measurement'), "</h2>\n";
|
|||||||
|
|
||||||
echo '<table class="table">', "\n";
|
echo '<table class="table">', "\n";
|
||||||
echo '<tr><th style="width:20%">', _('Name'),"</th><td>", $measurement->mname, "</td></tr>\n";
|
echo '<tr><th style="width:20%">', _('Name'),"</th><td>", $measurement->mname, "</td></tr>\n";
|
||||||
|
echo '<tr><th>', _('Type'),"</th><td>", $opt_mtype[$measurement->mtype], "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Unit'),"</th><td>", $opt_unit[$measurement->unit], "</td></tr>\n";
|
echo '<tr><th>', _('Unit'),"</th><td>", $opt_unit[$measurement->unit], "</td></tr>\n";
|
||||||
echo '<tr><th>', _('Values'),"</th><td>$measurement->nval</td></tr>\n";
|
echo '<tr><th>', _('Values'),"</th><td>$measurement->nval</td></tr>\n";
|
||||||
echo '<tr><th>', _('Value 1'),"</th><td>$measurement->val1</td></tr>\n";
|
echo '<tr><th>', _('Value 1'),"</th><td>$measurement->val1</td></tr>\n";
|
||||||
@@ -273,7 +283,7 @@ form_view_buttons($g_scriptname, $id);
|
|||||||
elseif ($action == ACT_EDIT):
|
elseif ($action == ACT_EDIT):
|
||||||
// ========== VARIANT: edit single record =====================================
|
// ========== VARIANT: edit single record =====================================
|
||||||
|
|
||||||
$sql = "SELECT mname, nval, val1, val2, val3, unit, accuracy, note, eid "
|
$sql = "SELECT mname, mtype, nval, val1, val2, val3, unit, accuracy, note, eid "
|
||||||
. "FROM measurement "
|
. "FROM measurement "
|
||||||
. "WHERE mid=?";
|
. "WHERE mid=?";
|
||||||
$sth = $pdo->prepare($sql);
|
$sth = $pdo->prepare($sql);
|
||||||
@@ -293,6 +303,7 @@ echo '<h2>', _('Edit measurement'), "</h2>\n";
|
|||||||
<input type="text" class="form-control" id="note" name="note" value="<?=$measurement->note ?>">
|
<input type="text" class="form-control" id="note" name="note" value="<?=$measurement->note ?>">
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
form_create_select('mtype', _('Type'), $opt_mtype, $measurement->mtype);
|
||||||
form_create_select('nval', _('Dimensions'), $opt_dimensions, $measurement->nval);
|
form_create_select('nval', _('Dimensions'), $opt_dimensions, $measurement->nval);
|
||||||
?>
|
?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
|||||||
+2
-2
@@ -159,14 +159,14 @@ $res = $sth->fetchAll();
|
|||||||
<div class="card-body d-flex flex-wrap gap-3">
|
<div class="card-body d-flex flex-wrap gap-3">
|
||||||
<div class="d-flex flex-nowrap gap-2">
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<label for="flt_name">Name</label>
|
<label for="flt_name">Name</label>
|
||||||
<input type="text" name="flt_name" size="15" maxlength="30" value="<?=$flt->name;?>">
|
<input type="text" class="form-control" name="flt_name" size="15" maxlength="30" value="<?=$flt->name;?>">
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
filter_create_select('flt_state[]', _('State'), $g_opt_all + $opt_state, $flt->state, FALSE);
|
filter_create_select('flt_state[]', _('State'), $g_opt_all + $opt_state, $flt->state, FALSE);
|
||||||
?>
|
?>
|
||||||
<div class="d-flex flex-nowrap gap-2">
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<label for="flt_remarks">Text</label>
|
<label for="flt_remarks">Text</label>
|
||||||
<input type="text" name="flt_remarks" size="15" maxlength="30" value="<?=$flt->remarks ?>">
|
<input type="text" class="form-control" name="flt_remarks" size="15" maxlength="30" value="<?=$flt->remarks ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ filter_create_select('flt_cat', _('Category'), $g_opt_all + $g_opt_none + $opt_c
|
|||||||
?>
|
?>
|
||||||
<div class="d-flex flex-nowrap gap-2">
|
<div class="d-flex flex-nowrap gap-2">
|
||||||
<label for="flt_txt">Text</label>
|
<label for="flt_txt">Text</label>
|
||||||
<input type="text" name="flt_txt" size="15" maxlength="30" value="<?=$flt->txt;?>">
|
<input type="text" class="form-control" name="flt_txt" maxlength="30" value="<?=$flt->txt;?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
|
|||||||
Reference in New Issue
Block a user