The Return of the Quick Prints!
This commit is contained in:
parent
df96729396
commit
142d2b54e1
@ -227,6 +227,21 @@ function ewasteClistHandler() {
|
|||||||
displayPdf(bUrl);
|
displayPdf(bUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quickPrintContactHandler() {
|
||||||
|
/** @type Array<LineItem> */
|
||||||
|
const lineArray = new Array();
|
||||||
|
lineArray.push(new LineItem('', standard, false));
|
||||||
|
const bUrl = generateFile(lineArray, true, true);
|
||||||
|
displayPdf(bUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
function quickPrintPasswordReqHandler() {
|
||||||
|
/** @type Array<LineItem> */
|
||||||
|
const lineArray = prepPasswordReqs();
|
||||||
|
const bUrl = generateFile(lineArray, true, true);
|
||||||
|
displayPdf(bUrl);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {String} password
|
* @param {String} password
|
||||||
@ -361,6 +376,16 @@ function prepEwasteClist(hostname) {
|
|||||||
return lineArray;
|
return lineArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function prepPasswordReqs() {
|
||||||
|
const s = strings.tempPassword;
|
||||||
|
const lineArray = [];
|
||||||
|
|
||||||
|
for (const reqLine of s.pwRequirements) {
|
||||||
|
lineArray.push(new LineItem(reqLine.text, reqLine.fontInfo, false));
|
||||||
|
}
|
||||||
|
return lineArray;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {Array<LineItem>} lineArray
|
* @param {Array<LineItem>} lineArray
|
||||||
@ -524,7 +549,20 @@ document.getElementById('ewasteClistBtn').addEventListener('click', () => {
|
|||||||
alert(`An error occurred while generating the PDF: ${error.message}`);
|
alert(`An error occurred while generating the PDF: ${error.message}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
document.getElementById('quickPrintContactBtn').addEventListener('click', () => {
|
||||||
|
try {
|
||||||
|
quickPrintContactHandler();
|
||||||
|
} catch (error) {
|
||||||
|
alert(`An error occurred while generating the PDF: ${error.message}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
document.getElementById('quickPrintPasswordReqBtn').addEventListener('click', () => {
|
||||||
|
try {
|
||||||
|
quickPrintPasswordReqHandler();
|
||||||
|
} catch (error) {
|
||||||
|
alert(`An error occurred while generating the PDF: ${error.message}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// #############################################################
|
// #############################################################
|
||||||
// Function Calls
|
// Function Calls
|
||||||
|
|||||||
@ -82,6 +82,29 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Quick Prints -->
|
||||||
|
<div class="bg-white dark:bg-gray-800 p-5 rounded-lg shadow-lg">
|
||||||
|
<!-- Title -->
|
||||||
|
<h1 class="dark:text-gray-300 text-2xl font-bold text-center mb-4">Quick Prints</h1>
|
||||||
|
<!-- Buttons -->
|
||||||
|
<div class="flex flex-col space-y-4">
|
||||||
|
<!-- ITS Contact Info -->
|
||||||
|
<button type="submit"
|
||||||
|
id="quickPrintContactBtn"
|
||||||
|
style="background-color: #4b7839;"
|
||||||
|
class="dark:bg-indigo-600 dark:hover:bg-indigo-700 w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50">
|
||||||
|
ITS Contact Info
|
||||||
|
</button>
|
||||||
|
<!-- Password Requirements -->
|
||||||
|
<button type="submit"
|
||||||
|
id="quickPrintPasswordReqBtn"
|
||||||
|
style="background-color: #4b7839;"
|
||||||
|
class="dark:bg-indigo-600 dark:hover:bg-indigo-700 w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50">
|
||||||
|
Password Requirements
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Right column -->
|
<!-- Right column -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user