mirror of
https://github.com/etnguyen03/tjdests.git
synced 2025-04-20 09:40:16 -04:00
feat(profile): add JS confirmation when publishing profile
This commit is contained in:
parent
f5b8211b48
commit
10508eb5d4
18
tjdests/static/main.js
Normal file
18
tjdests/static/main.js
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
$(document).ready(function(){
|
||||||
|
$("select").each(function(){
|
||||||
|
new TomSelect("#" + this.id, {allowEmptyOption: true, "plugins": ["change_listener"]});
|
||||||
|
});
|
||||||
|
$(function () {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip()
|
||||||
|
})
|
||||||
|
|
||||||
|
$("#id_publish_data").change(function () {
|
||||||
|
if (this.checked) {
|
||||||
|
var confirmreturn = confirm("You have indicated that you wish to publicize the data that you have entered. " +
|
||||||
|
"Note that any current and future TJHSST student will be able to view your data. You may unpublish your data at any time.\n\n" +
|
||||||
|
"By selecting the affirmative answer below, you declare that all data that you have entered and " +
|
||||||
|
"will enter in the future is accurate to the best of your belief. ")
|
||||||
|
$(this).prop("checked", confirmreturn)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
|
@ -16,16 +16,7 @@
|
||||||
<script src="{% static "tom-select.complete.min.js" %}" integrity="sha384-Hnof5Csstpcrk+thlHZ8VXXkD/Wk96gkCvwIvpwYLBVIAPyQA3gkqcPO+RwLARmZ"></script>
|
<script src="{% static "tom-select.complete.min.js" %}" integrity="sha384-Hnof5Csstpcrk+thlHZ8VXXkD/Wk96gkCvwIvpwYLBVIAPyQA3gkqcPO+RwLARmZ"></script>
|
||||||
<link rel="stylesheet" href="{% static "tom-select.bootstrap5.css" %}" integrity="sha384-3syGtcTzvEB6zjzJ4BQ2loMdsaYaxAjWjD3GcbCLAPAE2XkENSR94WcY8c3g5lNu" />
|
<link rel="stylesheet" href="{% static "tom-select.bootstrap5.css" %}" integrity="sha384-3syGtcTzvEB6zjzJ4BQ2loMdsaYaxAjWjD3GcbCLAPAE2XkENSR94WcY8c3g5lNu" />
|
||||||
|
|
||||||
<script>
|
<script src="{% static "main.js" %}"></script>
|
||||||
$(document).ready(function(){
|
|
||||||
$("select").each(function(){
|
|
||||||
new TomSelect("#" + this.id, {allowEmptyOption: true, "plugins": ["change_listener"]});
|
|
||||||
});
|
|
||||||
$(function () {
|
|
||||||
$('[data-toggle="tooltip"]').tooltip()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<title>{{ settings.BRANDING_NAME }} {{ settings.SENIOR_GRAD_YEAR }}</title>
|
<title>{{ settings.BRANDING_NAME }} {{ settings.SENIOR_GRAD_YEAR }}</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user