diff --git a/foundation/erpnext_foundation/doctype/chapter/chapter.py b/foundation/erpnext_foundation/doctype/chapter/chapter.py index 67bd2342..b69b6c6e 100644 --- a/foundation/erpnext_foundation/doctype/chapter/chapter.py +++ b/foundation/erpnext_foundation/doctype/chapter/chapter.py @@ -33,3 +33,17 @@ def get_list_context(context): context.no_breadcrumbs = True context.order_by = 'creation desc' context.introduction = '
All ERPNext Chapters
' + + +@frappe.whitelist() +def leave(title, user_id, leave_reason): + chapter = frappe.get_doc("Chapter", title) + for member in chapter.members: + for x in xrange(1,10): + print(member.user, user_id) + if member.user == user_id: + member.enabled = 0 + member.leave_reason = leave_reason + chapter.save(ignore_permissions=1) + frappe.db.commit() + return "Thank you for Feedback" \ No newline at end of file diff --git a/foundation/erpnext_foundation/doctype/chapter/templates/chapter.html b/foundation/erpnext_foundation/doctype/chapter/templates/chapter.html index 8649904c..832aef51 100644 --- a/foundation/erpnext_foundation/doctype/chapter/templates/chapter.html +++ b/foundation/erpnext_foundation/doctype/chapter/templates/chapter.html @@ -8,31 +8,35 @@ {{ meetup_embed_html }} {% endif %}| Member Details | |||
|---|---|---|---|
| {{ loop.index }} | -
-
- {{ frappe.db.get_value('User', user.user, 'full_name') }}
-
- {% if user.website_url %}
- {{ user.website_url or '' }}
- {% endif %}
+ {% if user.enabled == 1 %}
+ {{ flag }} |
+
+ |
-
+
- {{ frappe.db.get_value('User', user.user, 'full_name') }}
+
+ {% if user.website_url %}
+ {{ user.website_url or '' }}
+ {% endif %}
+
+
+ {% if user.introduction %}
+ {{ user.introduction }}
+ {% endif %}
+
- {% if user.introduction %}
- {{ user.introduction }}
- {% endif %}
-
-
- |
+