feat: hide primary contact from profile
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
"field_order": [
|
"field_order": [
|
||||||
"livecode_url",
|
"livecode_url",
|
||||||
"email_sender",
|
"email_sender",
|
||||||
|
"hide_primary_contact",
|
||||||
"column_break_2",
|
"column_break_2",
|
||||||
"force_profile_completion",
|
"force_profile_completion",
|
||||||
"show_search",
|
"show_search",
|
||||||
@@ -82,12 +83,18 @@
|
|||||||
"label": "Terms of Use Page",
|
"label": "Terms of Use Page",
|
||||||
"mandatory_depends_on": "terms_of_use",
|
"mandatory_depends_on": "terms_of_use",
|
||||||
"options": "Web Page"
|
"options": "Web Page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "hide_primary_contact",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Hide Primary Contact on Profile Page"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-12-21 16:01:48.260411",
|
"modified": "2021-12-23 19:49:02.194513",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "LMS Settings",
|
"name": "LMS Settings",
|
||||||
|
|||||||
@@ -239,11 +239,11 @@
|
|||||||
<div class="course-home-headings"> {{ _("Contact") }} </div>
|
<div class="course-home-headings"> {{ _("Contact") }} </div>
|
||||||
<div class="common-card-style overview-card">
|
<div class="common-card-style overview-card">
|
||||||
|
|
||||||
{% if not member.hide_private %}
|
{% if not member.hide_private and not hide_primary_contact %}
|
||||||
<a class="button-links" href="mailto:{{ member.email }}"> <img src="/assets/school/icons/mail.svg"> {{ member.email }} </a>
|
<a class="button-links" href="mailto:{{ member.email }}"> <img src="/assets/school/icons/mail.svg"> {{ member.email }} </a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if member.mobile_no and not member.hide_private %}
|
{% if member.mobile_no and not member.hide_private and not hide_primary_contact %}
|
||||||
<a class="button-links" href="tel:{{ member.mobile_no }}" >
|
<a class="button-links" href="tel:{{ member.mobile_no }}" >
|
||||||
<img src="/assets/school/icons/call.svg"> {{ member.mobile_no }}
|
<img src="/assets/school/icons/call.svg"> {{ member.mobile_no }}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ def get_context(context):
|
|||||||
except:
|
except:
|
||||||
context.template = "www/404.html"
|
context.template = "www/404.html"
|
||||||
return
|
return
|
||||||
|
context.hide_primary_contact = frappe.db.get_single_value("LMS Settings", "hide_primary_contact")
|
||||||
context.profile_tabs = get_profile_tabs(context.member)
|
context.profile_tabs = get_profile_tabs(context.member)
|
||||||
|
|
||||||
def get_profile_tabs(user):
|
def get_profile_tabs(user):
|
||||||
|
|||||||
Reference in New Issue
Block a user