Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-annual-limits-to-dash-and-usage
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewleith authored Nov 14, 2024
2 parents 6d56c97 + 9f9a137 commit a1f720d
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 19 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ jobs:
sudo dpkg -i 1pass.deb
- name: Setup Terraform tools
uses: cds-snc/terraform-tools-setup@v1
env: # In case you want to override default versions
CONFTEST_VERSION: 0.30.0
TERRAFORM_VERSION: 1.9.5
TERRAGRUNT_VERSION: 0.66.9
TF_SUMMARIZE_VERSION: 0.2.3

- name: Fetch VPN
run: |
curl https://raw.githubusercontent.com/cds-snc/notification-manifests/refs/heads/main/scripts/createVPNConfig.sh | bash -s staging
uses: cds-snc/terraform-tools-setup@v1
env: # In case you want to override default versions
CONFTEST_VERSION: 0.30.0
TERRAFORM_VERSION: 1.9.5
TERRAGRUNT_VERSION: 0.66.9
TF_SUMMARIZE_VERSION: 0.2.3

- name: Fetch VPN
run: |
curl https://raw.githubusercontent.com/cds-snc/notification-manifests/refs/heads/main/scripts/createVPNConfig.sh | bash -s staging
- name: Connect to VPN
uses: "kota65535/github-openvpn-connect-action@cd2ed8a90cc7b060dc4e001143e811b5f7ea0af5"
Expand Down
2 changes: 1 addition & 1 deletion app/main/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def __init__(self, *args, **kwargs):
self.service_id = service_id

email_from = StringField(
_l("Sending email address name"),
_l("Enter the part before ‘@notification.canada.ca’"),
validators=[
DataRequired(message=_l("This cannot be empty")),
validate_email_from,
Expand Down
1 change: 1 addition & 0 deletions app/main/views/add_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def _renderTemplateStep(form, current_step: str, government_type: Optional[str])
back_link = url_for(".add_service", current_step=STEP_ORGANISATION)
return render_template(
"views/add-service.html",
sending_domain=current_app.config["SENDING_DOMAIN"],
form=form,
heading=_(WIZARD_DICT[current_step]["header"]), # type: ignore
step_num=step_num,
Expand Down
2 changes: 1 addition & 1 deletion app/main/views/service_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def _check_password(pwd):
@main.route("/services/<service_id>/service-settings/email_from", methods=["GET", "POST"])
@user_has_permissions("manage_service")
def service_email_from_change(service_id):
form = ChangeEmailFromServiceForm(service_id=service_id)
form = ChangeEmailFromServiceForm(service_id=service_id, sending_domain=current_app.config["SENDING_DOMAIN"])

if request.method == "GET":
form.email_from.data = current_service.email_from
Expand Down
4 changes: 2 additions & 2 deletions app/templates/partials/add-service/step-create-service.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2 class="heading-medium">{{ _("Service name") }}</h2>
{{ textbox(form.name, hint=hint_txt, maxlength=255) }}

<h2 class="heading-medium">{{ _("Email address") }}</h2>
<p>{{ _("The email address always ends with ‘@notification.canada.ca’.") }}
<p>{{ _("The email address always ends with ‘@{}’.").format(sending_domain) }}
{% set hint_txt = _('Maximum 64 characters with no spaces. Characters can include letters, numbers, dots, dashes, and underscores.') %}

{{ textbox(form.email_from, hint=hint_txt, suffix=suffix_txt, width='1-2', maxlength=64) }}
Expand All @@ -33,7 +33,7 @@ <h2 class="heading-medium">{{ _("Email address") }}</h2>
<p class="m-0">{{_("Make sure we have formatted your email address correctly.")}}</p>
<p class="m-0">
{{_("Your service’s email address will be: ")}}
<b><span id='fixed-email-address'></span>@notification.canada.ca</b>
<b><span id='fixed-email-address'></span>@{{sending_domain}}</b>
</p>
{% endcall %}
</div>
Expand Down
17 changes: 13 additions & 4 deletions app/templates/views/service-settings/email_from.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/form.html" import form_wrapper %}
{% from "components/confirmation-preview.html" import confirmation_preview %}

{% block service_page_title %}
{{ _('Change your sending email address') }}
Expand All @@ -18,14 +19,22 @@
<div class="form-group">
<p>{{ _('Users will see your sending email address in the \'From\' field of the emails you send.') }}</p>
<p>{{ _('Your sending email address helps build trust with recipients. A good email address is relevant and as concise as possible.') }}</p>
<p>{{ _('You may use letters, numbers, dots, dashes or underscores.') }}</p>
</div>

{% call form_wrapper() %}
{% set save_txt = _('Save') %}
{% set hint_txt = _('Up to 64 characters. Enter what comes before the at symbol, without spaces.') %}
{% set suffix_txt = '@' + sending_domain %}
{{ textbox(form.email_from, hint=hint_txt, suffix=suffix_txt) }}
{% set hint_txt = _('Maximum 64 characters with no spaces. Characters can include letters, numbers, dots, dashes, and
underscores.') %}
{{ textbox(form.email_from, hint=hint_txt) }}
<div id="preview" class="focus:outline-yellow mb-gutter" tabindex="0">
{% call confirmation_preview() %}
<p class="m-0">{{_("Make sure we have formatted your email address correctly.")}}</p>
<p class="m-0">
{{_("Your service’s email address will be: ")}}
<b><span id='fixed-email-address'>{{form.email_from.data}}</span>@{{sending_domain}}</b>
</p>
{% endcall %}
</div>
{{ page_footer(save_txt) }}
{% endcall %}

Expand Down
2 changes: 1 addition & 1 deletion app/translations/csv/fr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@
"This email address cannot receive replies. In Settings, you can enter a different email for replies. Currently your service is set to prevent replies.","Cette adresse courriel ne peut pas recevoir de réponses. Vous pouvez saisir une adresse courriel différente pour les réponses via les paramètres. Votre service est actuellement configuré pour empêcher les réponses."
"Your service’s email address will be: ","L’adresse courriel de votre service sera&nbsp;: "
"You can change the order later in Settings.","Vous pourrez changer l’ordre ultérieurement via les paramètres."
"The email address always ends with ‘@notification.canada.ca’.","L’adresse courriel se termine toujours par « @notification.canada.ca »."
"The email address always ends with ‘@{}’.","L’adresse courriel se termine toujours par «@{} »."
"Enter the part before ‘@notification.canada.ca’","Saisissez la partie précédant « @notification.canada.ca »."
"You can send {} text message parts per day","Vous pouvez envoyer {} bouts de messages texte"
"If a text message is more than 160 characters, it’s divided into several parts. ","Si un message texte contient plus de 160 caractères, il est divisé en plusieurs bouts. "
Expand Down

0 comments on commit a1f720d

Please sign in to comment.