Merge pull request #81 from fossunited/flow-fixes

fix: username and email validations
This commit is contained in:
Anand Chitipothu
2021-05-07 18:53:58 +05:30
committed by GitHub
7 changed files with 44 additions and 22 deletions

View File

@@ -46,9 +46,7 @@
{% for m in batch.get_mentors() %}
<div>
{% if m.photo_url %}
<img class="profile-photo" src="{{m.photo_url}}">
{% endif %}
{{ widgets.Avatar(member=m, avatar_class="avatar-medium" ) }}
<span class="instructor-title">{{m.full_name}}</span>
</div>
{% endfor %}

View File

@@ -88,7 +88,8 @@
{% if can_manage %}
<a href="/courses/{{course.name}}/{{batch.name}}/about" class="btn btn-secondary">Manage</a>
{% else %}
<button class="join-batch" data-batch="{{ batch.name | urlencode }}">Join this Batch</button>
<button class="join-batch" data-batch="{{ batch.name | urlencode }}"
data-course="{{ course.name | urlencode }}">Join this Batch</button>
{% endif %}
</div>
</div>

View File

@@ -17,7 +17,7 @@ frappe.ready(() => {
$("#apply-now").click((e) => {
e.preventDefault();
if (frappe.session.user == "Guest") {
window.location.href = "/login";
window.location.href = `/login?redirect-to=/courses/${$(e.currentTarget).attr("data-course")}`;
return;
}
frappe.call({
@@ -53,7 +53,7 @@ frappe.ready(() => {
$(".join-batch").click((e) => {
e.preventDefault()
if (frappe.session.user == "Guest") {
window.location.href = "/login";
window.location.href = `/login?redirect-to=/courses/${$(e.currentTarget).attr("data-course")}`;
return;
}
batch = decodeURIComponent($(e.currentTarget).attr("data-batch"))
@@ -70,4 +70,3 @@ frappe.ready(() => {
})
})
})