exam draft fix
This commit is contained in:
@@ -183,6 +183,14 @@
|
||||
</div>
|
||||
<div class="form-text small text-muted">Add a custom Surah or Arabic target.</div>
|
||||
</div>
|
||||
<?php elseif ($slug === 'islamic'): ?>
|
||||
<div class="px-2 py-2 border-top">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control" placeholder="Type subject or topic" data-custom-input data-subject="<?= esc($slug) ?>">
|
||||
<button type="button" class="btn btn-outline-secondary" data-custom-entry data-subject="<?= esc($slug) ?>">Add</button>
|
||||
</div>
|
||||
<div class="form-text small text-muted">Add a subject or unit not listed above (e.g. Seerah, Fiqh, Akhlaq).</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -385,6 +393,9 @@
|
||||
if (isQuran) {
|
||||
return isCustom ? 'Custom' : 'Surah';
|
||||
}
|
||||
if (subject === 'islamic' && isCustom) {
|
||||
return 'Custom';
|
||||
}
|
||||
return parts.join(' – ');
|
||||
};
|
||||
|
||||
@@ -445,7 +456,10 @@
|
||||
if (!input) return;
|
||||
const customValue = input.value.trim();
|
||||
if (customValue === '') return;
|
||||
const unitValue = buildUnitDisplay(subject, '', '', { isQuran: subject === 'quran', isCustom: true });
|
||||
const unitValue = buildUnitDisplay(subject, '', '', {
|
||||
isQuran: subject === 'quran',
|
||||
isCustom: subject === 'quran' || subject === 'islamic',
|
||||
});
|
||||
appendUnitChapterRow(subject, unitValue, customValue);
|
||||
input.value = '';
|
||||
hideMenus();
|
||||
|
||||
Reference in New Issue
Block a user