Browse Source

Merge pull request #127 from bcgov/DIV-1141

Div 1141 - Add BC Services Card checks and messaging
pull/172/head
Michael Olund 5 years ago
committed by GitHub
parent
commit
2fe919eee8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 89 additions and 34 deletions
  1. +5
    -0
      edivorce/apps/core/middleware/bceid_middleware.py
  2. +18
    -0
      edivorce/apps/core/migrations/0024_bceiduser_is_bcsc.py
  3. +3
    -0
      edivorce/apps/core/models.py
  4. +1
    -1
      edivorce/apps/core/static/css/main.css
  5. +30
    -12
      edivorce/apps/core/static/css/main.scss
  6. +3
    -3
      edivorce/apps/core/templates/dashboard/sign_file_options.html
  7. +29
    -18
      edivorce/apps/core/templates/success.html

+ 5
- 0
edivorce/apps/core/middleware/bceid_middleware.py View File

@ -99,6 +99,7 @@ class BceidMiddleware(MiddlewareMixin): # pylint: disable=too-few-public-method
siteminder_user = request.META.get('HTTP_SM_USER', '')
is_localdev = settings.DEPLOYMENT_TYPE in ['localdev', 'minishift']
update_user = False
using_bc_services_card = False
guid = request.META.get('HTTP_SMGOV_USERGUID', '')
given_names = request.META.get('HTTP_SMGOV_GIVENNAMES', '')
@ -108,6 +109,7 @@ class BceidMiddleware(MiddlewareMixin): # pylint: disable=too-few-public-method
# HTTP_SMGOV_USERDISPLAYNAME is not included when BC Services Card authentication is used.
if not displayname and (surname or given_names):
displayname = "{0} {1}".format(given_names, surname)
using_bc_services_card = True
# HTTP_SM_USER is typically '.' when BC Services Card authentication is used.
if (not siteminder_user or siteminder_user == '.') and given_names and surname:
@ -135,6 +137,9 @@ class BceidMiddleware(MiddlewareMixin): # pylint: disable=too-few-public-method
if created or not request.user.sm_user:
request.user.sm_user = siteminder_user
update_user = True
if request.user.is_bcsc != using_bc_services_card:
request.user.is_bcsc = using_bc_services_card
update_user = True
if request.user.display_name != displayname:
request.user.display_name = displayname
update_user = True


+ 18
- 0
edivorce/apps/core/migrations/0024_bceiduser_is_bcsc.py View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.15 on 2020-10-09 13:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0023_auto_20201006_1314'),
]
operations = [
migrations.AddField(
model_name='bceiduser',
name='is_bcsc',
field=models.BooleanField(default=False),
),
]

+ 3
- 0
edivorce/apps/core/models.py View File

@ -37,6 +37,9 @@ class BceidUser(models.Model):
has_accepted_terms = models.BooleanField(default=False)
""" Flag for accepting terms of service """
is_bcsc = models.BooleanField(default=False)
""" Flag to identify BC Services Card users """
@property
def is_authenticated(self):
return True


+ 1
- 1
edivorce/apps/core/static/css/main.css
File diff suppressed because it is too large
View File


+ 30
- 12
edivorce/apps/core/static/css/main.scss View File

@ -4,20 +4,19 @@ $brand-blue: #003366;
$brand-gold: #fcba19;
$brand-titles: #003366;
$brand-links: #365ebe;
/*#2b5580;*/
$brand-buttons: $brand-links;
$color-blue-dark: $brand-titles;
$color-blue-medium: #38598A;
$color-blue-light: $brand-buttons;
$color-blue-lighter: #d4dce5;
$color-blue-lighter: #d7dff2;
$color-grey-dark: $body-copy;
$color-grey-medium: #9D9D9D;
$color-grey-light: #d5d5d5;
$color-grey-lighter: #efefef;
$color-grey-lightest: #fdfdfd;
$color-grey-lightest: #f2f2f2;
$color-green: #57b26a;
$color-green-light: #d5e6d8;
$color-green-dark: #246A33;
$color-green-dark: #2e8540;
$color-gold-light: #e6ca85;
$color-red: #D8292F;
$color-red-light: #F7D4D5;
@ -189,7 +188,7 @@ input[type=number]::-webkit-outer-spin-button {
&[readonly] {
color: #8c8c8c;
background: #f2f2f2;
background: $color-grey-lightest;
}
input, textarea {
@ -207,7 +206,7 @@ input[type=number]::-webkit-outer-spin-button {
&[readonly] {
color: #8c8c8c;
background: #f2f2f2;
background: $color-grey-lightest;
}
}
@ -219,7 +218,7 @@ input[type=number]::-webkit-outer-spin-button {
.fact-sheet-control {
&[readonly] {
color: #8c8c8c;
background: #f2f2f2;
background: $color-grey-lightest;
}
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
@ -257,7 +256,7 @@ input[type=number]::-webkit-outer-spin-button {
.fact-sheet-input {
&[readonly] {
background: #f2f2f2;
background: $color-grey-lightest;
}
}
@ -310,7 +309,7 @@ input[type=number]::-webkit-outer-spin-button {
}
.child-support-amount[readonly] {
background: #f2f2f2;
background: $color-grey-lightest;
}
div.dollar-prefix {
@ -424,11 +423,11 @@ div.percent-suffix {
}
.checkmark {
background: lighten($color-green, 10%);
background: $color-green-dark;
position: relative;
padding: 22px 20px 20px 90px;
color: #ffffff;
border-radius: 10px;
border-radius: 8px;
font-size: 32px;
&:before {
@ -1061,6 +1060,13 @@ textarea {
.flex-row {
width: 45%;
border-radius: 8px;
background-color: $color-blue-lighter;
border: 1px solid $brand-buttons;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 24px 30px;
}
}
@ -2076,7 +2082,7 @@ textarea {
}
.modal-footer {
background: #f5f5f5;
background: $color-grey-lightest;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
@ -2110,6 +2116,18 @@ textarea {
background-color: rgba(0,0,0,0.7);
}
.light-shaded-box {
background-color: $color-grey-lightest;
border-radius: 8px;
padding: 18px 30px;
margin-bottom: 28px;
p {
margin: 0;
max-width: 100%;
}
}
#delete_child_modal,
#info_modal,
#questions_modal,


+ 3
- 3
edivorce/apps/core/templates/dashboard/sign_file_options.html View File

@ -51,7 +51,7 @@
</div>
</div>
<h3>Filing Options</h3>
{% if where_were_you_married_country == 'Canada' %} {# Eventually add not logged in with BC Services card check here #}
{% if where_were_you_married_country == 'Canada' and not request.user.is_bcsc %}
<p>You can file (?) your application for divorce in different ways.</p>
{% endif %}
<p>To file (?) your documents, you will need:</p>
@ -72,8 +72,8 @@
<li>You will need to have your affidavit(s) sworn/affirmed (see above)</li>
<li>Photo ID</li>
</ul>
{% if where_were_you_married_country == 'Canada' %} {# Eventually add not logged in with BC Services card check here #}
<div class="question-well">
{% if where_were_you_married_country == 'Canada' and not request.user.is_bcsc %}
<div class="question-well">
<h3>Select how you would like to file (?) your documents:</h3>
<div class="radio"><label>{% input_field type="radio" name="how_to_file" value="Online" id="file-online" %}
We will file Online through this tool</label></div>


+ 29
- 18
edivorce/apps/core/templates/success.html View File

@ -5,44 +5,55 @@
{% block content %}
<h1 class="checkmark">You have met the conditions for using the Online Divorce Assistant</h1>
<h2> Register or Login</h2>
<div class="question-well">
<h3>1. Gather your documents</h3>
<p>You will need the following documents to move forward with the divorce request:</p>
<ul>
<li>Marriage certificate</li>
<li>Separation agreement (if applicable)</li>
<li>Court order (if applicable)</li>
</ul>
</div>
<div class="question-well">
<h3>2. Register or Login</h3>
<p>You will need a <strong>Basic BCeID</strong> or <strong>BC Services Card</strong> account to access the Online Divorce Assistant. This will also enable you to securely access multiple other online government services.</p>
<hr />
<div class="light-shaded-box">
<p><strong>NOTE about logging in with your BC Services Card</strong></p>
<p>
You can log in and use the Online Divorce Assistant with your BC Services Card.
However, you are limited to filing in-person at a BC Court Registry as online
filing with a BC Services Card is currently not available.
</p>
</div>
<div class="success-buttons">
<div class="flex-row" id="bcId" style="width: 30%;">
<h3>Register for a <br>Basic BCeID</br></h3>
<p>Once you register, you’ll be taken back to this website.</p>
<a class="btn btn-primary btn-lg btn-block" href="{% url 'register' %}">
Register
</a>
</div>
<div class="flex-row" id="scard" style="width: 30%;">
<h3>Set up your <br>BC Services Card</br></h3>
<p>Once you're set up, you’ll be taken back to this website.</p>
<a class="btn btn-primary btn-lg btn-block" href="{% url 'register_sc' %}">
Set Up
</a>
</div>
<div class="flex-row" id="login" style="width: 30%;">
<h3>Login with a <br>BCeID or BC Services Card</br></h3>
<p>Once you login, you’ll be taken back to this website.</p>
</div>
</div>
<div class="success-buttons">
<div class="flex-row" id="bcId" style="width: 30%;">
<a class="btn btn-success btn-lg btn-block" href="{% url 'register' %}">
Register
</a>
</div>
<div class="flex-row"id="scard" style="width: 30%;">
<a class="btn btn-success btn-lg btn-block" href="{% url 'register_sc' %}">
Set Up
</a>
</div>
<div class="flex-row"id="login" style="width: 30%;">
<a class="btn btn-success btn-lg btn-block" href="{% url 'login' %}">
<a class="btn btn-primary btn-lg btn-block" href="{% url 'login' %}">
Login
</a>
</div>
</div>
</div>
<p>&nbsp;</p>


Loading…
Cancel
Save