Work on webgui and add flags to equipment
This commit is contained in:
+26
-2
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/******************************************************************************
|
||||
* YMS - Yacht Management Software
|
||||
* Copyright (C) 2024 Thomas Hooge
|
||||
* Copyright (C) 2024-2025 Thomas Hooge
|
||||
*
|
||||
* SPDX-License-Identifier: WTFPL
|
||||
******************************************************************************/
|
||||
@@ -607,7 +607,31 @@ foreach ($opt_company as $k => $v) {
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
// Vessel options
|
||||
// Do not include vessel that has already been referenced in the list!
|
||||
$opt_vessel = array();
|
||||
$sql = "SELECT vid, vesselname FROM vessel ORDER BY vesselname";
|
||||
$sth = $pdo->query($sql);
|
||||
foreach ($sth->fetchAll() as $row) {
|
||||
if (!in_array($row['vid'], $vids)) {
|
||||
$opt_vessel[$row['vid']] = $row['vesselname'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form class="mb-3" method="post" action="<?=$g_scriptname?>">
|
||||
<input type="hidden" name="id" value="<?=$id?>">
|
||||
<input type="hidden" name="reftype" value="vessel">
|
||||
<label for="vid"><?=_('Vessel')?></label>
|
||||
<select name="refid" id="vid">
|
||||
<?php
|
||||
foreach ($opt_vessel as $k => $v) {
|
||||
echo '<option value="', $k, '">', $v, "</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<button class="btn btn-sm btn-secondary" name="submit[addref]">Referenzieren</button>
|
||||
</form>
|
||||
<?php
|
||||
elseif ($action == ACT_EDIT):
|
||||
// ========== VARIANT: edit single record =====================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user