CSS class migrations in CreateTicketView: duplicate warning, visibility groups
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -109,7 +109,7 @@ $nonce = SecurityHeadersMiddleware::getNonce();
|
|||||||
<input type="text" id="title" name="title" class="editable" required placeholder="Enter a descriptive title for this ticket">
|
<input type="text" id="title" name="title" class="editable" required placeholder="Enter a descriptive title for this ticket">
|
||||||
</div>
|
</div>
|
||||||
<!-- Duplicate Warning Area -->
|
<!-- Duplicate Warning Area -->
|
||||||
<div id="duplicateWarning" class="inline-warning" role="alert" aria-live="polite" aria-atomic="true" style="display: none;">
|
<div id="duplicateWarning" class="inline-warning is-hidden" role="alert" aria-live="polite" aria-atomic="true">
|
||||||
<div class="text-amber fw-bold duplicate-heading">
|
<div class="text-amber fw-bold duplicate-heading">
|
||||||
Possible Duplicates Found
|
Possible Duplicates Found
|
||||||
</div>
|
</div>
|
||||||
@@ -210,7 +210,7 @@ $nonce = SecurityHeadersMiddleware::getNonce();
|
|||||||
Controls who can view this ticket
|
Controls who can view this ticket
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="visibilityGroupsContainer" class="detail-group" style="display: none;">
|
<div id="visibilityGroupsContainer" class="detail-group is-hidden">
|
||||||
<label>Allowed Groups</label>
|
<label>Allowed Groups</label>
|
||||||
<div class="visibility-groups-list">
|
<div class="visibility-groups-list">
|
||||||
<?php
|
<?php
|
||||||
@@ -277,7 +277,7 @@ $nonce = SecurityHeadersMiddleware::getNonce();
|
|||||||
const title = this.value.trim();
|
const title = this.value.trim();
|
||||||
|
|
||||||
if (title.length < 5) {
|
if (title.length < 5) {
|
||||||
document.getElementById('duplicateWarning').style.display = 'none';
|
document.getElementById('duplicateWarning').classList.add('is-hidden');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,9 +308,9 @@ $nonce = SecurityHeadersMiddleware::getNonce();
|
|||||||
html += '<p class="duplicate-hint">Consider checking these tickets before creating a new one.</p>';
|
html += '<p class="duplicate-hint">Consider checking these tickets before creating a new one.</p>';
|
||||||
|
|
||||||
listDiv.innerHTML = html;
|
listDiv.innerHTML = html;
|
||||||
warningDiv.style.display = 'block';
|
warningDiv.classList.remove('is-hidden');
|
||||||
} else {
|
} else {
|
||||||
warningDiv.style.display = 'none';
|
warningDiv.classList.add('is-hidden');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
@@ -322,9 +322,9 @@ $nonce = SecurityHeadersMiddleware::getNonce();
|
|||||||
const visibility = document.getElementById('visibility').value;
|
const visibility = document.getElementById('visibility').value;
|
||||||
const groupsContainer = document.getElementById('visibilityGroupsContainer');
|
const groupsContainer = document.getElementById('visibilityGroupsContainer');
|
||||||
if (visibility === 'internal') {
|
if (visibility === 'internal') {
|
||||||
groupsContainer.style.display = 'block';
|
groupsContainer.classList.remove('is-hidden');
|
||||||
} else {
|
} else {
|
||||||
groupsContainer.style.display = 'none';
|
groupsContainer.classList.add('is-hidden');
|
||||||
document.querySelectorAll('.visibility-group-checkbox').forEach(cb => cb.checked = false);
|
document.querySelectorAll('.visibility-group-checkbox').forEach(cb => cb.checked = false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user