Note max length++, convert note newlines to <br> for display

master
Skylar Ittner 4 years ago
parent 0e8eac75c1
commit 9eb42dbee4

@ -37,8 +37,8 @@ foreach ($events as $e) {
$form->addInput("event", "", "select", true, null, $eventselect, "Event", "fas fa-list");
$form->addInput("date", date("Y-m-d"), "date", true, null, null, "Date", "fas fa-calendar");
$form->addInput("time", date("H:i"), "time", true, null, null, "Time", "fas fa-clock");
$form->addInput("privatenotes", "", "textarea", false, null, null, "Private Notes", "fas fa-comment-dots", 6);
$form->addInput("publicnotes", "", "textarea", false, null, null, "Public Notes", "far fa-comment-dots", 6);
$form->addInput("privatenotes", "", "textarea", false, null, null, "Private Notes", "fas fa-comment-dots", 6, 0, 10000);
$form->addInput("publicnotes", "", "textarea", false, null, null, "Public Notes", "far fa-comment-dots", 6, 0, 10000);
$form->addButton("Save", "fas fa-save", null, "submit", "savebtn");

@ -42,8 +42,8 @@ $form->addInput("phone", $client->getPhone(), "tel", false, null, null, "Phone",
$form->addInput("email", $client->getEmail(), "email", false, null, null, "Email", "fas fa-envelope");
$form->addInput("billingaddress", $client->getBillingAddress(), "textarea", false, null, null, "Billing Address", "fas fa-file-invoice", 6);
$form->addInput("mailingaddress", $client->getMailingAddress(), "textarea", false, null, null, "Mailing Address", "fas fa-mail-bulk", 6);
$form->addInput("privatenotes", $client->getPrivateNotes(), "textarea", false, null, null, "Private Notes", "fas fa-comment-dots", 6);
$form->addInput("publicnotes", $client->getPublicNotes(), "textarea", false, null, null, "Public Notes", "far fa-comment-dots", 6);
$form->addInput("privatenotes", $client->getPrivateNotes(), "textarea", false, null, null, "Private Notes", "fas fa-comment-dots", 6, 0, 10000);
$form->addInput("publicnotes", $client->getPublicNotes(), "textarea", false, null, null, "Public Notes", "far fa-comment-dots", 6, 0, 10000);
$form->addButton("Save", "fas fa-save", null, "submit", "savebtn");

@ -76,8 +76,8 @@ $form->addInput("capacity", $component->getCapacity(), "text", false, null, null
$form->addInput("model", $component->getModel(), "text", false, null, null, "Model", "fas fa-hashtag", 4, 0, 200);
$form->addInput("manufacturer", $component->getManufacturer(), "text", false, null, null, "Manufacturer", "fas fa-industry", 4, 0, 200);
$form->addInput("price", $component->getPrice(), "number", false, null, null, "Price", "fas fa-money-bill-wave");
$form->addInput("privatenotes", $component->getPrivateNotes(), "textarea", false, null, null, "Private Notes", "fas fa-comment-dots");
$form->addInput("publicnotes", $component->getPublicNotes(), "textarea", false, null, null, "Public Notes", "far fa-comment-dots");
$form->addInput("privatenotes", $component->getPrivateNotes(), "textarea", false, null, null, "Private Notes", "fas fa-comment-dots", 6, 0, 10000);
$form->addInput("publicnotes", $component->getPublicNotes(), "textarea", false, null, null, "Public Notes", "far fa-comment-dots", 6, 0, 10000);
$form->addButton("Save", "fas fa-save", null, "submit", "savebtn");
$form->addButton("Back", "fas fa-arrow-left", "./app.php?page=viewmachine&id=" . $machine->getID(), "", null, null, "", "btn btn-info ml-2");

@ -60,8 +60,8 @@ $form->addInput("manufacturer", $machine->getManufacturer(), "text", false, null
$form->addInput("condition", $machine->getCondition(), "number", false, null, null, "Condition", "fas fa-star-half-alt");
$form->addInput("price", $machine->getPrice(), "number", false, null, null, "Price", "fas fa-money-bill-wave");
$form->addInput("privatenotes", $machine->getPrivateNotes(), "textarea", false, null, null, "Private Notes", "fas fa-comment-dots");
$form->addInput("publicnotes", $machine->getPublicNotes(), "textarea", false, null, null, "Public Notes", "far fa-comment-dots");
$form->addInput("privatenotes", $machine->getPrivateNotes(), "textarea", false, null, null, "Private Notes", "fas fa-comment-dots", 6, 0, 10000);
$form->addInput("publicnotes", $machine->getPublicNotes(), "textarea", false, null, null, "Public Notes", "far fa-comment-dots", 6, 0, 10000);
$form->addButton("Save", "fas fa-save", null, "submit", "savebtn");

@ -87,14 +87,14 @@ $machine = new Machine($machineid);
if (!empty($machine->getPrivateNotes())) {
?>
<div class="list-group-item">
<b><?php $Strings->get("Private Notes"); ?></b>: <?php echo htmlspecialchars($machine->getPrivateNotes()); ?>
<b><?php $Strings->get("Private Notes"); ?></b>:<br><div class="ml-3"><?php echo str_replace("\n", "\n<br>", htmlspecialchars($machine->getPrivateNotes())); ?></div>
</div>
<?php
}
if (!empty($machine->getPublicNotes())) {
?>
<div class="list-group-item">
<b><?php $Strings->get("Public Notes"); ?></b>: <?php echo htmlspecialchars($machine->getPublicNotes()); ?>
<b><?php $Strings->get("Public Notes"); ?></b>:<br><div class="ml-3"><?php echo str_replace("\n", "\n<br>", htmlspecialchars($machine->getPublicNotes())); ?></div>
</div>
<?php
}
@ -115,10 +115,10 @@ $machine = new Machine($machineid);
echo "<b>" . $h->getName() . "</b> on " . date($SETTINGS["datetime_format"], strtotime($h->getDate())) . "<br />\n";
echo "<b>Technician:</b> " . htmlspecialchars((new User($h->getTechUID()))->getName()) . "<br />\n";
if (!empty($h->getPublicNotes())) {
echo "<div><b>Public Notes:</b><br /><div class=\"ml-3\">" . htmlspecialchars($h->getPublicNotes()) . "</div></div>";
echo "<div><b>Public Notes:</b><br /><div class=\"ml-3\">" . str_replace("\n", "\n<br>", htmlspecialchars($h->getPublicNotes())) . "</div></div>";
}
if (!empty($h->getPrivateNotes())) {
echo "<div><b>Private Notes:</b><br /><div class=\"ml-3\">" . htmlspecialchars($h->getPrivateNotes()) . "</div></div>";
echo "<div><b>Private Notes:</b><br /><div class=\"ml-3\">" . str_replace("\n", "\n<br>", htmlspecialchars($h->getPrivateNotes())) . "</div></div>";
}
echo "\n</div>\n";
}
@ -187,7 +187,7 @@ $machine = new Machine($machineid);
?>
<div>
<b>Public Notes:</b><br />
<div class="ml-3"><?php echo htmlspecialchars($c->getPublicNotes()); ?></div>
<div class="ml-3"><?php echo str_replace("\n", "\n<br>", htmlspecialchars($c->getPublicNotes())); ?></div>
</div>
<?php
}
@ -196,7 +196,7 @@ $machine = new Machine($machineid);
?>
<div>
<b>Private Notes:</b><br />
<div class="ml-3"><?php echo htmlspecialchars($c->getPrivateNotes()); ?></div>
<div class="ml-3"><?php echo str_replace("\n", "\n<br>", htmlspecialchars($c->getPrivateNotes())); ?></div>
</div>
<?php } ?>
</div>

@ -266,7 +266,7 @@ if (isset($_GET["backgroundcolor"]) && !empty($_GET["backgroundcolor"]) && preg_
if (!empty($machine->getPublicNotes())) {
?>
<div class="list-group-item">
<b><?php $Strings->get("Notes"); ?></b>: <?php echo htmlspecialchars($machine->getPublicNotes()); ?>
<b><?php $Strings->get("Notes"); ?></b>: <?php echo str_replace("\n", "\n<br>", htmlspecialchars($machine->getPublicNotes())); ?>
</div>
<?php
}

Loading…
Cancel
Save