Added variables to site

This commit is contained in:
2018-01-31 18:55:36 -05:00
parent 5e013a6aeb
commit 9a1f801344
16 changed files with 177 additions and 59 deletions

View File

@ -5,7 +5,7 @@
<script>
$(function() {
// Show modal for live youtube conference
{% if youtube %}
{% if popup_header.value %}
$('#liveModal').modal('show');
{% endif %}
@ -95,36 +95,7 @@
<div class="row text-center">
<h2 class="mx-auto mb-5">OUR OBJECTIVES</h2>
<div style="font-size: 22px">
<p>
The Ontario Association of Child Protection Lawyers consists of parents council, children's council who also do parent side work, representatives of Native Canadian organizations,
law students, and students-at-law who are completing their articles under the direction of parents council.
</p>
<p>
It started in Spring 2017 in Windsor, Ontario with a
group
of Family Lawyers who saw a need to increase the level of advocacy for children, families, and
communities
that were struggling in terms of Child Welfare.
</p>
<p>
The OACPL as an organization seeks to:
</p>
<p>
- increase the efficiency and level of professional expertise offered by Child Protection Lawyers in
Ontario
</p>
<p>
- provide public and professional education and input from Recognized Child Protection Lawyers on Child
Welfare Reform and Practice
</p>
<p>
- provide an organized body of Recognized Child Protection Lawyers that advocate politically and
socially on Child Welfare Matters in Ontario
</p>
<p>
- encourage the highest standards of practice and support for children, families and communities
affected by Child Protection Litigation.
</p>
{{ objectives.value | safe }}
</div>
</div>
</div>
@ -224,18 +195,18 @@
</a>
</div>
{% if youtube %}
{% if popup_header.value %}
<div id="liveModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-dialog modal-lg modal-fade" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel"><i class="fa fa-circle text-danger"></i> Live Conference</h5>
<h5 class="modal-title" id="exampleModalLabel">{{ popup_header.value | safe }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<iframe width="100%" height="400px" src="{{ youtube }}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
{{ popup_body.value | safe }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>

View File

@ -149,13 +149,13 @@
<div class="form-row">
<div class="form-group col-12">
<div class="form-check">
{{ register.newsletter|add_class:"form-check-input" }} <label class="form-check-label">Receive
{{ register.newsletter|add_class:"form-check-input" }} <label for="id_newsletter" class="form-check-label">Receive
newsletters</label>
</div>
</div>
<div class="form-group col-12">
<div class="form-check">
{{ register.case_law|add_class:"form-check-input" }} <label class="form-check-label">Request
{{ register.case_law|add_class:"form-check-input" }} <label for="id_case_law" class="form-check-label">Request
access to case law database</label>
</div>
</div>
@ -167,13 +167,7 @@
</div>
<div class="form-group col-12 my-3">
<div class="form-check">
{{ register.tos|add_class:"form-check-input" }} <label class="form-check-label">
I certify that I am a member in good standing of the Law Society of Ontario, practicing in
the field of defence side child protection law, or am a member of the Rights Panel with the
office of The Children's Lawyer, also practicing defence work, or am a law student, lawyer
representing a band or Native Organization, or a student completing articles under the
direction of one of the foregoing.
</label>
{{ register.tos|add_class:"form-check-input" }} <label for="id_tos" class="form-check-label">{{ terms.value }}</label>
</div>
</div>
</div>

View File

@ -12,11 +12,16 @@ from charter_members.forms import RegisterForm
from OACPL.utils import url_fix_render_to_string
from charter_members.models import Attorney
from OACPL import settings
from variables.models import Variable
def index(request):
attorneys = Attorney.objects.filter(front_page=True).order_by('order')
return render(request, 'index.html', {'attorneys': attorneys, 'contact': settings.EMAIL_CONTACT, 'youtube': settings.YOUTUBE_CONFERENCE})
banner = Variable.objects.get(key='banner')
popup_header = Variable.objects.get(key='popup_header')
popup_body = Variable.objects.get(key='popup_body')
objectives = Variable.objects.get(key='objectives')
return render(request, 'index.html', {'attorneys': attorneys, 'contact': settings.EMAIL_CONTACT, 'youtube': settings.YOUTUBE_CONFERENCE, 'banner': banner, 'objectives': objectives, 'popup_header': popup_header, 'popup_body': popup_body})
def contact(request):
@ -34,6 +39,7 @@ def contact(request):
def login(request):
terms = Variable.objects.get(key='terms')
if request.method == 'POST':
if request.POST.get('request') == 'register':
register_form = RegisterForm(request.POST, request.FILES)
@ -51,7 +57,7 @@ def login(request):
if 'register_form' not in vars():
register_form = RegisterForm()
return render(request, 'login.html', {'navbar': False, 'footer': False, 'register': register_form})
return render(request, 'login.html', {'navbar': False, 'footer': False, 'register': register_form, 'terms': terms})
def reset(request):