Minor bug fix for the Skylar Grant redirect site. Also changed the ui slightly for the text boxes

This commit is contained in:
Isaac Godin 2026-01-09 10:54:10 -05:00
parent fa25f3856e
commit 6dabf32d2b
3 changed files with 176 additions and 155 deletions

5
.gitignore vendored
View File

@ -133,3 +133,8 @@ dist
.yarn/install-state.gz
.pnp.*
edits.txt

View File

@ -31,6 +31,9 @@ const standard = new FontInfo('Helvetica', 12);
const standardBold = new FontInfo('Helvetica', 12, 'Bold');
/** @type {FontInfo} */
const monospace = new FontInfo('Courier', 16, 'Bold');
/** @type {FontInfo} */
const smallBold = new FontInfo('Courier', 12, 'Bold');
// #############################################################
// Strings to use generating the PDF
@ -82,9 +85,16 @@ function setVersionNumber() {
function tempPasswordHandler() {
// Grab the form values
const username = document.getElementById('tempPwUsername').value;
let username = document.getElementById('tempPwUsername').value;
const password = document.getElementById('tempPwPassword').value;
//Going to test and see if having @mainecc.edu auto added is better or if pasting the full email instead is better.
if (password.trim() === '') {
alert('Please enter a temporary password.');
return;
@ -163,7 +173,7 @@ function prepTempPassword(password, username) {
if (username) {
if (!(username.toLowerCase().endsWith(strings.global.domain))) username += strings.global.domain;
lineArray.push(new LineItem(s.unLabel.text, s.unLabel.fontInfo, false));
lineArray.push(new LineItem(username, monospace, true));
lineArray.push(new LineItem(username, smallBold, true));
}
lineArray.push(new LineItem(s.pwLabel.text, s.pwLabel.fontInfo, false));

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -8,15 +8,20 @@
</head>
<body class="bg-gray-100 leading-normal tracking-normal dark:bg-gray-900">
<!-- Logo -->
<div class="flex justify-center mt-6">
<a href="https://www.mccs.me.edu/">
<img src="./assets/images/itslogo_color.png" alt="ITS Logo" class="h-24 w-auto">
</a>
</div>
<!-- Title -->
<div class="flex flex-col justify-center mt-6">
<h1 class="dark:text-gray-300 text-4xl font-bold text-center">ITS Thermal Printer</h1><br />
<h4 class="dark:text-gray-300 text-lg text-center">v<span id="versionNumber"></span> Developed for MCCS by <a href="https://git.vfsh.dev/helpd_admin/it-thermal/src/branch/client-only" class="text-blue-700">Skylar Grant</a></h4>
<h4 class="dark:text-gray-300 text-lg text-center">v<span id="versionNumber"></span> Developed for MCCS by <a href="https://git.vfsh.dev/sgrant/mccs-thermal" class="text-blue-700">Skylar Grant</a></h4>
</div>
<!-- Parent container to hold flex columns -->
<div class="flex justify-center mt-10 space-x-6">
<!-- Left column -->
@ -54,8 +59,9 @@
<!-- Fields -->
<div>
<!-- Notes -->
<!-- max size added and removed resizing -->
<label for="customNoteTextArea" class="dark:text-gray-300 block text-md font-medium text-gray-700">Notes:</label>
<textarea id="customNoteTextArea" name="customNoteTextArea" cols="35" rows="10" required
<textarea id="customNoteTextArea" name="customNoteTextArea" cols="35" rows="10" required maxlength="500" style="resize: none;"
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 ml-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"></textarea>
</div>
<!-- Submit Button -->
@ -126,7 +132,7 @@
</div>
<!-- Notes field -->
<label for="dtnotes" class="dark:text-gray-300 block text-md font-medium text-gray-700">Notes: (optional)</label>
<textarea id="dtnotes" name="dtnotes" cols="35" rows="4"
<textarea id="dtnotes" name="dtnotes" cols="35" rows="6" required maxlength="300" style="resize: none;"
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 ml-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"></textarea>
</div>
<!-- Submit Button -->
@ -161,4 +167,4 @@
<script src="./assets/ITThermal.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
</body>
</html>
</html>