diff --git a/foundation/www/join-chapter.html b/foundation/www/join-chapter.html deleted file mode 100644 index 284e9c43..00000000 --- a/foundation/www/join-chapter.html +++ /dev/null @@ -1,59 +0,0 @@ -{% extends "templates/web.html" %} - -{% block page_content %} - -{% macro chapter_button() %} -

- Go to Chapter Page

-{% endmacro %} -{% if frappe.session.user=='Guest' %} -

Please signup and login to join this chapter

-

Login

-{% else %} - {% if already_member %} -

You are already a member of {{ chapter.title }}!

- {{ chapter_button() }} -

Leave Chapter

- {% else %} - {% if frappe.local.request.method=='POST' %} -

Welcome to chapter {{ chapter.title }}!

- {{ chapter_button() }} - {% else %} -
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
-
-
-
- {% endif %} - {% endif %} - -{% endif %} - -{% endblock %} \ No newline at end of file diff --git a/foundation/www/join_chapter.js b/foundation/www/join_chapter.js deleted file mode 100644 index e2bc8bca..00000000 --- a/foundation/www/join_chapter.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2017, EOSSF and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Chapter Member', { - onsubmit: function (frm) { - console.log("here" + frappe.session.user) - // body... - } - refresh: function(frm) { - - } -}); diff --git a/foundation/www/join_chapter.py b/foundation/www/join_chapter.py deleted file mode 100644 index 121f4440..00000000 --- a/foundation/www/join_chapter.py +++ /dev/null @@ -1,22 +0,0 @@ -import frappe - -def get_context(context): - context.no_cache = True - chapter = frappe.get_doc('Chapter', frappe.form_dict.name) - if frappe.session.user!='Guest': - if frappe.session.user in [d.user for d in chapter.members if d.enabled == 1]: - context.already_member = True - else: - if frappe.request.method=='GET': - pass - elif frappe.request.method=='POST': - chapter.append('members', dict( - user=frappe.session.user, - introduction=frappe.form_dict.introduction, - website_url=frappe.form_dict.website_url, - enabled=1 - )) - chapter.save(ignore_permissions=1) - frappe.db.commit() - - context.chapter = chapter diff --git a/foundation/www/leave-chapter.html b/foundation/www/leave-chapter.html deleted file mode 100644 index 9b92221e..00000000 --- a/foundation/www/leave-chapter.html +++ /dev/null @@ -1,42 +0,0 @@ -{% extends "templates/web.html" %} -{% block page_content %} - - {% if member_deleted %} -

You are not a member of {{ chapter.title }}!

-
-
-
- - -
- -
-
-

Please signup and login to join this chapter

- -

Become Member agian

- {% endif %} - -{% endblock %} \ No newline at end of file diff --git a/foundation/www/leave_chapter.py b/foundation/www/leave_chapter.py deleted file mode 100644 index da2d819e..00000000 --- a/foundation/www/leave_chapter.py +++ /dev/null @@ -1,7 +0,0 @@ -import frappe - -def get_context(context): - context.no_cache = True - chapter = frappe.get_doc('Chapter', frappe.form_dict.name) - context.member_deleted = True - context.chapter = chapter