forked from UKSOURCE/cms.hailearning.edu.vn
refactor: update btn on/off tab in home page
This commit is contained in:
@@ -3,8 +3,17 @@
|
||||
<div class="row g-4">
|
||||
<!-- Basic Info -->
|
||||
<div class="col-md-12">
|
||||
<div class="card border shadow-sm mb-1">
|
||||
<div class="card-header bg-white d-flex justify-content-center align-items-center">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="visaSolutionsEnabled"
|
||||
<%= (data.visaSolutions?.enabled !== false ) ? 'checked' : '' %>>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border shadow-sm">
|
||||
<div class="card-header bg-white">
|
||||
<div class="card-header bg-white d-flex justify-content-between align-items-center">
|
||||
<h6 class="mb-0">
|
||||
<i class="fas fa-info-circle me-2"></i>Basic Information
|
||||
</h6>
|
||||
@@ -86,6 +95,8 @@
|
||||
window.homeScrapers.visaSolutions = () => {
|
||||
const getVal = (id) => (document.getElementById(id)?.value || "").trim();
|
||||
|
||||
const enabled = document.getElementById("visaSolutionsEnabled")?.checked !== false;
|
||||
|
||||
const items = [];
|
||||
document.querySelectorAll(".visa-solution-item").forEach((el, idx) => {
|
||||
const index = el.getAttribute("data-index") || idx;
|
||||
@@ -104,6 +115,7 @@
|
||||
heading: getVal("visaSolutionsHeading"),
|
||||
subheading: getVal("visaSolutionsSubheading"),
|
||||
items,
|
||||
enabled
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user