diff --git a/scipost_django/forums/forms.py b/scipost_django/forums/forms.py index 3b00f074fa54ccfee06c9c1f43d3cd487bd647ef..c0b23e7604437eadbe276694683f3a5cd7a2b7b5 100644 --- a/scipost_django/forums/forms.py +++ b/scipost_django/forums/forms.py @@ -178,8 +178,6 @@ class MotionVoteForm(forms.Form): ) def clean_motion(self): - print(f"in clean_motion: {self.cleaned_data = }") - print(f"{self.cleaned_data['motion'] = }") if datetime.date.today() > self.cleaned_data["motion"].voting_deadline: self.add_error("motion", "Motion is not open for voting anymore") return None @@ -192,7 +190,6 @@ class MotionVoteForm(forms.Form): def clean(self): self.cleaned_data = super().clean() - print(f"in clean: {self.cleaned_data = }") if ( hasattr(self.cleaned_data, "user") and hasattr(self.cleaned_data, "motion") and diff --git a/scipost_django/forums/templates/forums/motion_confirm_create.html b/scipost_django/forums/templates/forums/motion_confirm_create.html deleted file mode 100644 index 38ec649a11769cf068c0dec2652a1d47d4e160c2..0000000000000000000000000000000000000000 --- a/scipost_django/forums/templates/forums/motion_confirm_create.html +++ /dev/null @@ -1,58 +0,0 @@ -{% extends 'forums/base.html' %} - -{% load bootstrap %} -{% load automarkup %} - - -{% block breadcrumb_items %} - {{ block.super }} - <span class="breadcrumb-item">Confirm Motion creation</span> -{% endblock %} - -{% block pagetitle %}: Motion: confirm creation{% endblock pagetitle %} - -{% block content %} - - <div class="row"> - <div class="col-12"> - <h3 class="highlight">Preview</h3> - - <div class="card"> - <div class="card-header"> - {{ form.initial.subject }} - </div> - <div class="card-body"> - {% if form.initial.text %} - {% automarkup form.initial.text %} - {% else %} - <span class="text-danger">No text given</span> - {% endif %} - </div> - </div> - - {% if form.errors %} - {% for field in form %} - {% for error in field.errors %} - <div class="alert alert-danger"> - <strong>{{ field.name }} - {{ error|escape }}</strong> - </div> - {% endfor %} - {% endfor %} - {% for error in form.non_field_errors %} - <div class="alert alert-danger"> - <strong>{{ error|escape }}</strong> - </div> - {% endfor %} - {% endif %} - - <form action="" method="post"> - {% csrf_token %} - {{ form|bootstrap }} - <input type="submit" value="Confirm Motion creation" class="btn btn-primary"> - <span class="text-danger"> <strong>Not satisfied?</strong> Hit your browser's back button and redraft your Motion</span> - </form> - - </div> - </div> - -{% endblock content %} diff --git a/scipost_django/forums/templates/forums/motion_form.html b/scipost_django/forums/templates/forums/motion_form.html deleted file mode 100644 index 42877038a3dec61691de26ef745f1f849e7c6b5d..0000000000000000000000000000000000000000 --- a/scipost_django/forums/templates/forums/motion_form.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends 'forums/base.html' %} - -{% load bootstrap %} -{% load automarkup %} - - -{% block breadcrumb_items %} - {{ block.super }} - <span class="breadcrumb-item">{% if form.instance.id %}Update {{ form.instance }}{% else %}New Motion{% endif %}</span> -{% endblock %} - -{% block pagetitle %}: Motion{% endblock pagetitle %} - -{% block content %} - - <div class="row"> - <div class="col-12"> - <h3 class="highlight">Create a new Motion</h3> - <form action="" method="post"> - {% csrf_token %} - {{ form|bootstrap }} - <input type="submit" value="Run preview" class="btn btn-primary"> - </form> - </div> - </div> - -{% endblock content %} diff --git a/scipost_django/forums/templates/forums/post_confirm_create.html b/scipost_django/forums/templates/forums/post_confirm_create.html deleted file mode 100644 index d4cc46aa9613da4dce4e9eac51676c594b80b8f4..0000000000000000000000000000000000000000 --- a/scipost_django/forums/templates/forums/post_confirm_create.html +++ /dev/null @@ -1,58 +0,0 @@ -{% extends 'forums/base.html' %} - -{% load bootstrap %} -{% load automarkup %} - - -{% block breadcrumb_items %} - {{ block.super }} - <span class="breadcrumb-item">Confirm Post creation</span> -{% endblock %} - -{% block pagetitle %}: Post: confirm creation{% endblock pagetitle %} - -{% block content %} - - <div class="row"> - <div class="col-12"> - <h3 class="highlight">Preview</h3> - - <div class="card"> - <div class="card-header"> - {{ form.initial.subject }} - </div> - <div class="card-body"> - {% if form.initial.text %} - {% automarkup form.initial.text %} - {% else %} - <span class="text-danger">No text given</span> - {% endif %} - </div> - </div> - - {% if form.errors %} - {% for field in form %} - {% for error in field.errors %} - <div class="alert alert-danger"> - <strong>{{ field.name }} - {{ error|escape }}</strong> - </div> - {% endfor %} - {% endfor %} - {% for error in form.non_field_errors %} - <div class="alert alert-danger"> - <strong>{{ error|escape }}</strong> - </div> - {% endfor %} - {% endif %} - - <form action="" method="post"> - {% csrf_token %} - {{ form|bootstrap }} - <input type="submit" value="Confirm Post creation" class="btn btn-primary"> - <span class="text-danger"> <strong>Not satisfied?</strong> Hit your browser's back button and redraft your Post</span> - </form> - - </div> - </div> - -{% endblock content %} diff --git a/scipost_django/forums/templates/forums/post_form.html b/scipost_django/forums/templates/forums/post_form.html deleted file mode 100644 index 75d62c0122653ef20de95d6388bef6d2543473af..0000000000000000000000000000000000000000 --- a/scipost_django/forums/templates/forums/post_form.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends 'forums/base.html' %} - -{% load bootstrap %} - -{% block breadcrumb_items %} - {{ block.super }} - <span class="breadcrumb-item">{% if form.instance.id %}Update {{ form.instance }}{% else %}New Post{% endif %}</span> -{% endblock %} - -{% block pagetitle %}: Post{% endblock pagetitle %} - -{% block content %} - - <div class="row"> - <div class="col-12"> - <h3 class="highlight">Compose a new Post</h3> - <form action="" method="post"> - {% csrf_token %} - {{ form|bootstrap }} - <input type="submit" value="Run preview" class="btn btn-primary"> - </form> - </div> - </div> - -{% endblock content %}