Added max length of remarks tetx box in approve and hold and reject form
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled

This commit is contained in:
dhanabalan
2026-04-13 08:35:26 +05:30
parent 27ec4148ae
commit 15dea86f9e
3 changed files with 42 additions and 3 deletions

View File

@@ -24,7 +24,7 @@
<!-- Remark Textbox --> <!-- Remark Textbox -->
<div style="margin-top: 20px; text-align: left;"> <div style="margin-top: 20px; text-align: left;">
<label for="remark" style="font-size: 14px; color: #333;">Remark</label> <label for="remark" style="font-size: 14px; color: #333;">Remark</label>
<textarea id="remark" style="width:100%; height:100px; padding:10px; margin-top:5px; border:1px solid #ddd; border-radius:5px;"></textarea> <textarea id="remark" maxlength="60" style="width:100%; height:100px; padding:10px; margin-top:5px; border:1px solid #ddd; border-radius:5px;"></textarea>
</div> </div>
<!-- Buttons --> <!-- Buttons -->
@@ -60,6 +60,19 @@
const remark = document.getElementById("remark").value.trim(); const remark = document.getElementById("remark").value.trim();
const id = document.getElementById("requestId").value; const id = document.getElementById("requestId").value;
const level = document.getElementById("level").value; const level = document.getElementById("level").value;
const errorDiv = document.getElementById("remarkError");
if (remark == "") {
errorDiv.innerText = "Remark is mandatory.";
errorDiv.style.display = "block";
return;
}
if (remark.length > 60) {
errorDiv.innerText = "Remark must be within 60 characters.";
errorDiv.style.display = "block";
return;
}
fetch('/characteristic/approve-save', { fetch('/characteristic/approve-save', {
method: 'POST', method: 'POST',

View File

@@ -24,7 +24,7 @@
<!-- Remark Textbox --> <!-- Remark Textbox -->
<div style="margin-top: 20px; text-align: left;"> <div style="margin-top: 20px; text-align: left;">
<label for="remark" style="font-size: 14px; color: #333;">Remark <span style="color:red;">*</span></label> <label for="remark" style="font-size: 14px; color: #333;">Remark <span style="color:red;">*</span></label>
<textarea id="remark" style="width:100%; height:100px; padding:10px; margin-top:5px; border:1px solid #ddd; border-radius:5px;"></textarea> <textarea id="remark" maxlength="60" style="width:100%; height:100px; padding:10px; margin-top:5px; border:1px solid #ddd; border-radius:5px;"></textarea>
<div id="remarkError" style="color:red; font-size:12px; display:none; margin-top:5px;"> <div id="remarkError" style="color:red; font-size:12px; display:none; margin-top:5px;">
Remark is mandatory. Remark is mandatory.
</div> </div>
@@ -64,6 +64,19 @@
const remark = document.getElementById("remark").value.trim(); const remark = document.getElementById("remark").value.trim();
const id = document.getElementById("requestId").value; const id = document.getElementById("requestId").value;
const level = document.getElementById("level").value; const level = document.getElementById("level").value;
const errorDiv = document.getElementById("remarkError");
if (remark == "") {
errorDiv.innerText = "Remark is mandatory.";
errorDiv.style.display = "block";
return;
}
if (remark.length > 60) {
errorDiv.innerText = "Remark must be within 60 characters.";
errorDiv.style.display = "block";
return;
}
fetch('/characteristic/hold-save', { fetch('/characteristic/hold-save', {
method: 'POST', method: 'POST',

View File

@@ -24,7 +24,7 @@
<!-- Remark Textbox --> <!-- Remark Textbox -->
<div style="margin-top: 20px; text-align: left;"> <div style="margin-top: 20px; text-align: left;">
<label for="remark" style="font-size: 14px; color: #333;">Remark <span style="color:red;">*</span></label> <label for="remark" style="font-size: 14px; color: #333;">Remark <span style="color:red;">*</span></label>
<textarea id="remark" style="width:100%; height:100px; padding:10px; margin-top:5px; border:1px solid #ddd; border-radius:5px;"></textarea> <textarea id="remark" maxlength="60" style="width:100%; height:100px; padding:10px; margin-top:5px; border:1px solid #ddd; border-radius:5px;"></textarea>
<div id="remarkError" style="color:red; font-size:12px; display:none; margin-top:5px;"> <div id="remarkError" style="color:red; font-size:12px; display:none; margin-top:5px;">
Remark is mandatory. Remark is mandatory.
</div> </div>
@@ -63,6 +63,19 @@
const remark = document.getElementById("remark").value.trim(); const remark = document.getElementById("remark").value.trim();
const id = document.getElementById("requestId").value; const id = document.getElementById("requestId").value;
const level = document.getElementById("level").value; const level = document.getElementById("level").value;
const errorDiv = document.getElementById("remarkError");
if (remark == "") {
errorDiv.innerText = "Remark is mandatory.";
errorDiv.style.display = "block";
return;
}
if (remark.length > 60) {
errorDiv.innerText = "Remark must be within 60 characters.";
errorDiv.style.display = "block";
return;
}
fetch('/characteristic/reject-save', { fetch('/characteristic/reject-save', {
method: 'POST', method: 'POST',