Finish adding manufacturer field to components, add a bit of customization to /public

master
Skylar Ittner 4 years ago
parent 55c95c6a86
commit 8f9ed05e8d

@ -79,6 +79,7 @@ switch ($VARS['action']) {
}
$component->setCapacity($VARS['capacity']);
$component->setModel($VARS['model']);
$component->setManufacturer($VARS['manufacturer']);
$component->setPrice($VARS['price'] * 1.0);
$component->setPrivateNotes($VARS['privatenotes']);
$component->setPublicNotes($VARS['publicnotes']);

@ -147,6 +147,12 @@ $machine = new Machine($machineid);
<?php
}
if (!empty($c->getManufacturer())) {
?>
<b><?php $Strings->get("Manufacturer"); ?></b>: <?php echo htmlspecialchars($c->getManufacturer()); ?><br />
<?php
}
if (!empty($c->getTestedDate())) {
?>
<b><?php $Strings->get("Tested On"); ?></b>: <?php echo date($SETTINGS["datetime_format"], strtotime($c->getTestedDate())); ?><br />

@ -113,7 +113,7 @@ if (isset($_GET["backgroundcolor"]) && !empty($_GET["backgroundcolor"]) && preg_
</div>
<?php if (!isset($_GET["embed"])) { ?>
<p>
Enter a Netsyms machine ID number, serial number, or tracking code.
Enter a <?php echo $SETTINGS["branding"]["machineidnumber"]; ?>, serial number, or tracking code.
</p>
<form method="GET">
<input type="text" name="id" class="form-control" placeholder="Number" required />
@ -143,7 +143,7 @@ if (isset($_GET["backgroundcolor"]) && !empty($_GET["backgroundcolor"]) && preg_
?>
<?php if (!isset($_GET["embed"])) { ?>
<p>
Enter a Netsyms machine ID number, serial number, or tracking code.
Enter a <?php echo $SETTINGS["branding"]["machineidnumber"]; ?>, serial number, or tracking code.
</p>
<form method="GET">
<input type="text" name="id" class="form-control" placeholder="Number" required />
@ -290,6 +290,12 @@ if (isset($_GET["backgroundcolor"]) && !empty($_GET["backgroundcolor"]) && preg_
<?php
}
if (!empty($c->getManufacturer())) {
?>
<b><?php $Strings->get("Manufacturer"); ?></b>: <?php echo htmlspecialchars($c->getManufacturer()); ?><br />
<?php
}
if (!empty($c->getPublicNotes())) {
?>
<div>
@ -335,7 +341,7 @@ if (isset($_GET["backgroundcolor"]) && !empty($_GET["backgroundcolor"]) && preg_
Look up another machine:
</p>
<form method="GET">
<input type="text" name="id" class="form-control" placeholder="Machine ID Number" required />
<input type="text" name="id" class="form-control" placeholder="<?php echo $SETTINGS["branding"]["shortmachineid"]; ?>" required />
<button type="submit" class="btn btn-primary btn-block mt-2">Get Info</button>
</form>
</div>

@ -36,6 +36,9 @@ $SETTINGS = [
],
// Name of the app.
"site_title" => "MachineManager",
"branding" => [
"machineidnumber" => "Netsyms machine ID number"
],
// Settings for connecting to the AccountHub server.
"accounthub" => [
// URL for the API endpoint

Loading…
Cancel
Save