forked from UKSOURCE/cms.hailearning.edu.vn
refactor: update btn on/off tab in home page
This commit is contained in:
@@ -2,8 +2,18 @@
|
||||
<div class="tab-pane fade" id="videogallery" role="tabpanel">
|
||||
<div class="row g-4">
|
||||
<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="videoGalleryEnabled"
|
||||
<%=(data.videoGallery?.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-video me-2"></i>Video Gallery
|
||||
</h6>
|
||||
@@ -50,10 +60,12 @@
|
||||
window.homeScrapers.videoGallery = () => {
|
||||
const getVal = (id) => (document.getElementById(id)?.value || "").trim();
|
||||
|
||||
const enabled = document.getElementById("videoGalleryEnabled")?.checked !== false;
|
||||
return {
|
||||
heading: getVal("videoGalleryHeading"),
|
||||
videoUrl: getVal("videoGalleryVideoUrl"),
|
||||
thumbnail: getVal("videoGalleryThumbnail"),
|
||||
enabled
|
||||
};
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user