Merge pull request #265 from pateljannat/improve-notify-me-behaviour
This commit is contained in:
@@ -319,6 +319,7 @@ input[type=checkbox] {
|
|||||||
background: #E2E6E9;
|
background: #E2E6E9;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
|
box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.02), 0px 0px 8px rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
|
|||||||
@@ -58,9 +58,9 @@
|
|||||||
Continue Learning <img class="ml-2" src="/assets/school/icons/white-arrow.svg" />
|
Continue Learning <img class="ml-2" src="/assets/school/icons/white-arrow.svg" />
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if course.upcoming %}
|
{% if course.upcoming and not is_user_interested %}
|
||||||
<button class="button wide-button is-default" id="notify-me" data-course="{{course.name | urlencode}}" {% if
|
<button class="button wide-button is-default"
|
||||||
is_user_interested %} disabled="disabled" title="Your interest has already been noted." {% endif %}>
|
id="notify-me" data-course="{{course.name | urlencode}}">
|
||||||
Notify me when available
|
Notify me when available
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -74,6 +74,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="interest-alert" class="alert alert-dismissible empty-state p-4 mt-10 {% if not is_user_interested %} hide {% endif %}">
|
||||||
|
You have opted to be notified for this course. You will receive an email when the course becomes available.
|
||||||
|
<a href="#" class="close p-4" data-dismiss="alert" aria-label="close">×</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% if course.video_link %}
|
{% if course.video_link %}
|
||||||
<div class="modal fade preview-modal" id="video-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
<div class="modal fade preview-modal" id="video-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||||
aria-hidden="true">
|
aria-hidden="true">
|
||||||
|
|||||||
@@ -215,8 +215,8 @@ var notify_user = (e) => {
|
|||||||
"course": course
|
"course": course
|
||||||
},
|
},
|
||||||
callback: (data) => {
|
callback: (data) => {
|
||||||
frappe.msgprint(__("Your interest has been noted. We'll notify you via email when this course becomes available."));
|
$("#interest-alert").removeClass("hide");
|
||||||
$("#notify-me").attr("disabled", true).attr("title", "Your interest has already been noted");
|
$("#notify-me").addClass("hide");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user