Merge pull request #17913 from scmmishra/lms-link-fix
refactor: topic card redirects to login
This commit is contained in:
commit
7007931438
@ -42,7 +42,7 @@
|
|||||||
{% if has_access %}
|
{% if has_access %}
|
||||||
<a href="/lms/topic?program={{ program }}&course={{ course.name }}&topic={{ topic.name }}" class="no-decoration no-underline">
|
<a href="/lms/topic?program={{ program }}&course={{ course.name }}&topic={{ topic.name }}" class="no-decoration no-underline">
|
||||||
{% else %}
|
{% else %}
|
||||||
<div onclick="show_singup()">
|
<a href="/login#login">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if topic.hero_image %}
|
{% if topic.hero_image %}
|
||||||
<div class="card-hero-img" style="background-image: url('{{ topic.hero_image }}')"></div>
|
<div class="card-hero-img" style="background-image: url('{{ topic.hero_image }}')"></div>
|
||||||
@ -81,7 +81,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
</div>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -103,23 +103,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block script %}
|
|
||||||
<script>
|
|
||||||
function show_singup() {
|
|
||||||
if (frappe.session.user == "Guest") {
|
|
||||||
let signup_dialog = new frappe.ui.Dialog({
|
|
||||||
title: __('Sign Up'),
|
|
||||||
primary_action: function() {
|
|
||||||
window.location.href = '/login#signup'
|
|
||||||
},
|
|
||||||
primary_action_label: 'Sign Up'
|
|
||||||
})
|
|
||||||
signup_dialog.set_message('You have to sign up to access the course');
|
|
||||||
signup_dialog.$message.show()
|
|
||||||
signup_dialog.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user