mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-17 21:19:38 -04:00
Allowing for a custom label on the first step
This commit is contained in:
@@ -481,6 +481,7 @@ def send_one_off_step(service_id, template_id, step_index):
|
||||
),
|
||||
template=template,
|
||||
form=form,
|
||||
current_placeholder=current_placeholder,
|
||||
skip_link=get_skip_link(step_index, template),
|
||||
back_link=back_link,
|
||||
link_to_upload=(
|
||||
|
||||
@@ -40,12 +40,14 @@
|
||||
) %}
|
||||
<div class="grid-row">
|
||||
{% set is_phone_number = form.placeholder_value.label.text == "phone number" %}
|
||||
{% set hint_text = "Include area code, e.g. 202-555-0191" if is_phone_number else None %}
|
||||
{% set label_text = "Country code and phone number" if current_placeholder == "phone number" else current_placeholder.title() %}
|
||||
{% set hint_text = "For example: +18885551234" if is_phone_number else None %}
|
||||
{% set extra_class = "extra-tracking" if is_phone_number else "" %}
|
||||
|
||||
<div class="grid-col-12 {{ extra_class }}">
|
||||
{{ textbox(
|
||||
form.placeholder_value,
|
||||
label=label_text,
|
||||
hint=hint_text,
|
||||
extra_form_group_classes=extra_class,
|
||||
param_extensions={"id": "phone-number", "classes": ""}
|
||||
|
||||
Reference in New Issue
Block a user