mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-27 09:29:22 -04:00
Fixing styling issues on the send message flow
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
// The label gets styled like a button and is used to hide the native file upload control. This is so that
|
||||
// users see a button that looks like the others on the site.
|
||||
//
|
||||
this.$form.find('label.file-upload-button').addClass('usa-button');
|
||||
this.$form.find('label.file-upload-button').addClass('usa-button margin-bottom-1');
|
||||
|
||||
// Clear the form if the user navigates back to the page
|
||||
$(window).on("pageshow", () => this.$form[0].reset());
|
||||
|
||||
@@ -9,48 +9,48 @@
|
||||
let states = {
|
||||
'initial': Hogan.compile(`
|
||||
{{#showNowAsDefault}}
|
||||
<div class="radio-select__column">
|
||||
<div class="radio-select__column margin-y-2">
|
||||
<div class="usa-radio">
|
||||
<input class="usa-radio__input" checked="checked" id="{{name}}-0" name="{{name}}" type="radio" value="">
|
||||
<label class="usa-radio__label" for="{{name}}-0">Now</label>
|
||||
</div>
|
||||
</div>
|
||||
{{/showNowAsDefault}}
|
||||
<div class="radio-select__column">
|
||||
<div class="radio-select__column margin-y-2">
|
||||
{{#categories}}
|
||||
<input type='button' class='govuk-button govuk-button--secondary radio-select__button--category' aria-expanded="false" value='{{.}}' />
|
||||
<input type='button' class='usa-button usa-button--outline radio-select__button--category' aria-expanded="false" value='{{.}}' />
|
||||
{{/categories}}
|
||||
</div>
|
||||
`),
|
||||
'choose': Hogan.compile(`
|
||||
{{#showNowAsDefault}}
|
||||
<div class="radio-select__column">
|
||||
<div class="radio-select__column margin-y-2">
|
||||
<div class="usa-radio">
|
||||
<input class="usa-radio__input" checked="checked" id="{{name}}-0" name="{{name}}" type="radio" value="">
|
||||
<label class="usa-radio__label" for="{{name}}-0">Now</label>
|
||||
</div>
|
||||
</div>
|
||||
{{/showNowAsDefault}}
|
||||
<div class="radio-select__column">
|
||||
<div class="radio-select__column margin-y-2">
|
||||
{{#choices}}
|
||||
<div class="usa-radio js-option">
|
||||
<input class="usa-radio__input" type="radio" value="{{value}}" id="{{id}}" name="{{name}}" />
|
||||
<label class="usa-radio__label" for="{{id}}">{{label}}</label>
|
||||
</div>
|
||||
{{/choices}}
|
||||
<input type='button' class='govuk-button govuk-button--secondary radio-select__button--done' aria-expanded='true' value='Done' />
|
||||
<input type='button' class='usa-button usa-button--outline radio-select__button--done' aria-expanded='true' value='Done' />
|
||||
</div>
|
||||
`),
|
||||
'chosen': Hogan.compile(`
|
||||
{{#showNowAsDefault}}
|
||||
<div class="radio-select__column">
|
||||
<div class="radio-select__column margin-y-2">
|
||||
<div class="usa-radio">
|
||||
<input class="usa-radio__input" id="{{name}}-0" name="{{name}}" type="radio" value="">
|
||||
<label class="usa-radio__label" for="{{name}}-0">Now</label>
|
||||
</div>
|
||||
</div>
|
||||
{{/showNowAsDefault}}
|
||||
<div class="radio-select__column">
|
||||
<div class="radio-select__column margin-y-2">
|
||||
{{#choices}}
|
||||
<div class="usa-radio">
|
||||
<input class="usa-radio__input" checked="checked" type="radio" value="{{value}}" id="{{id}}" name="{{name}}" />
|
||||
@@ -58,8 +58,8 @@
|
||||
</div>
|
||||
{{/choices}}
|
||||
</div>
|
||||
<div class="radio-select__column">
|
||||
<input type='button' class='govuk-button govuk-button--secondary radio-select__button--reset' aria-expanded='false' value='Choose a different time' />
|
||||
<div class="radio-select__column margin-y-2">
|
||||
<input type='button' class='usa-button usa-button--outline radio-select__button--reset' aria-expanded='false' value='Choose a different time' />
|
||||
</div>
|
||||
`)
|
||||
};
|
||||
|
||||
@@ -691,7 +691,7 @@ details form {
|
||||
margin-bottom: 30px;
|
||||
pointer-events: none;
|
||||
& + .table-show-more-link {
|
||||
margin-top: -28px;
|
||||
margin-top: -20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -755,13 +755,12 @@ $tail-angle: 20deg;
|
||||
}
|
||||
|
||||
.sms-message-sender {
|
||||
color: color('gray-cool-90');
|
||||
margin: 0 0 -10px 0;
|
||||
margin: units(1) 0 0;
|
||||
}
|
||||
|
||||
.sms-message-recipient {
|
||||
color: color('gray-cool-90');
|
||||
margin: 10px 0 0 0;
|
||||
margin: 0 0 units(1);
|
||||
}
|
||||
|
||||
.sms-message-status {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
link_current_item=False,
|
||||
root_element='h1'
|
||||
) %}
|
||||
<{{ root_element }} class="font-body-lg folder-heading"{% if root_element == 'h1' %} id="page-header"{% endif %}>
|
||||
<{{ root_element }} class="font-body-lg folder-heading margin-bottom-0"{% if root_element == 'h1' %} id="page-header"{% endif %}>
|
||||
{% for folder in folders %}
|
||||
{% if loop.last and not link_current_item %}
|
||||
{% if folder.template_type or not folder.id %}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<div class="ajax-block-container">
|
||||
{% if notifications_deleted %}
|
||||
<div class="grid-row bottom-gutter-1-2">
|
||||
<div class="grid-row ">
|
||||
{% for label, query_param, url, count in counts %}
|
||||
{% if query_param == 'pending' %}
|
||||
<div class="grid-col-3">{{ big_number(count, query_param, smaller=True) }}</div>
|
||||
@@ -14,7 +14,7 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="bottom-gutter">
|
||||
<div class="tabs">
|
||||
{{ pill(counts, request.args.get('status', '')) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
API integration
|
||||
</h1>
|
||||
|
||||
<nav class="grid-row bottom-gutter-1-2">
|
||||
<nav class="grid-row">
|
||||
<div class="grid-col-4">
|
||||
<a class="usa-link pill-separate-item" href="{{ url_for('.api_keys', service_id=current_service.id) }}">API keys</a>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="bottom-gutter-1-2">
|
||||
<div class="">
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
|
||||
{% if recipients.too_many_rows %}
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
|
||||
{{ page_header('Preview of {}'.format(template.name)) }}
|
||||
|
||||
{{ usaSkipLink({
|
||||
"text": "Skip to file contents",
|
||||
"href": "#" + file_contents_header_id
|
||||
}) }}
|
||||
|
||||
{{ template|string }}
|
||||
<div class="bottom-gutter-3-2">
|
||||
<form method="post" enctype="multipart/form-data" action="{{url_for('main.start_job', service_id=current_service.id, upload_id=upload_id)}}" class='page-footer'>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
{% from "components/table.html" import mapping_table, row, field, text_field, index_field, hidden_field_heading %}
|
||||
{% from "components/file-upload.html" import file_upload %}
|
||||
{% from "components/components/back-link/macro.njk" import usaBackLink %}
|
||||
{% from "components/components/alert/macro.njk" import usaAlert %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Error
|
||||
@@ -15,27 +16,31 @@
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="bottom-gutter-1-2">
|
||||
<div class="">
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
{% if row_errors|length == 1 %}
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="Bad rows" data-error-label="{{ upload_id }}">
|
||||
There’s a problem with {{ original_file_name }}
|
||||
</h1>
|
||||
<p>
|
||||
You need to {{ row_errors[0] }}.
|
||||
</p>
|
||||
<div class="usa-alert usa-alert--error" role="alert">
|
||||
<div class="usa-alert__body">
|
||||
<h1 class="usa-alert__heading">There’s a problem with {{ original_file_name }}</h1>
|
||||
<p class="usa-alert__text">
|
||||
You need to {{ row_errors[0] }}.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="Bad rows" data-error-label="{{ upload_id }}">
|
||||
There are some problems with {{ original_file_name }}
|
||||
</h1>
|
||||
<p>
|
||||
You need to:
|
||||
</p>
|
||||
<ul class="list-bullet">
|
||||
{% for error in row_errors %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="usa-alert usa-alert--error" role="alert">
|
||||
<div class="usa-alert__body">
|
||||
<h1 class="usa-alert__heading">There’s a problem with {{ original_file_name }}</h1>
|
||||
<p class="usa-alert__text">
|
||||
You need to:
|
||||
<ul class="list-bullet">
|
||||
{% for error in row_errors %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
</div>
|
||||
@@ -49,7 +54,6 @@
|
||||
button_text='Upload your file again'
|
||||
) }}
|
||||
</div>
|
||||
<a href="#content" class="usa-link back-to-top-link">Back to top</a>
|
||||
</div>
|
||||
|
||||
<div class="fullscreen-content" data-module="fullscreen-table">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
{{ ajax_block(partials, updates_url, 'upcoming') }}
|
||||
|
||||
<h2 class="font-body-lg margin-top-0">
|
||||
<h2 class="font-body-xl margin-top-0 margin-bottom-1">
|
||||
In the last seven days
|
||||
</h2>
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
{{ form.placeholder_value(param_extensions={"classes": ""}) }}
|
||||
</div>
|
||||
{% if skip_link or link_to_upload %}
|
||||
<div class="grid-col-12">
|
||||
<div class="grid-col-12 margin-top-1">
|
||||
{% if link_to_upload %}
|
||||
<a class="usa-link" href="{{ url_for('.send_messages', service_id=current_service.id, template_id=template.id) }}">Upload a list of {{ 999|recipient_count_label(template.template_type) }}</a>
|
||||
<a class="usa-link margin-right-2" href="{{ url_for('.send_messages', service_id=current_service.id, template_id=template.id) }}">Upload a list of {{ 999|recipient_count_label(template.template_type) }}</a>
|
||||
{% endif %}
|
||||
{% if skip_link %}
|
||||
<a href="{{ skip_link[1] }}" class="usa-link">{{ skip_link[0] }}</a>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<a class="usa-link" href="{{ url_for('.get_example_csv', service_id=current_service.id, template_id=template.id) }}" download>Download this example (<abbr title="Comma separated values">CSV</abbr>)</a>
|
||||
</p>
|
||||
|
||||
<h2 class="font-body-lg">Your file will populate this template ({{ template.name }})</h2>
|
||||
<h2 class="font-body-lg margin-bottom-1">Your file will populate this template:<br><span class="font-body-lg">({{ template.name }})</span></h2>
|
||||
{{ template|string }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
{% endif %}
|
||||
{% if (not current_service.active) and current_user.platform_admin %}
|
||||
<p>
|
||||
<div class="hint bottom-gutter-1-2">
|
||||
<div class="hint ">
|
||||
Service suspended
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="bottom-gutter-1-2">
|
||||
<div class="">
|
||||
<h1 class="font-body-2xl margin-bottom-3">Choose a template</h1>
|
||||
{{ folder_path(template_folder_path, current_service.id, template_type, current_user, root_element='h2') }}
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="bottom-gutter-1-2">
|
||||
<div class="">
|
||||
<h1 class="font-body-2xl margin-bottom-3">{{ page_title }}</h1>
|
||||
{{ copy_folder_path(template_folder_path, current_service.id, from_service, current_user) }}
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="grid-row bottom-gutter-1-2">
|
||||
<div class="grid-row ">
|
||||
<div class="grid-col-12">
|
||||
{{ folder_path(
|
||||
folders=template_folder_path,
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
{% else %}
|
||||
<div class="grid-row">
|
||||
<div class="grid-col-12">
|
||||
<h1 class="font-body-lg folder-heading">
|
||||
<h1 class="font-body-xl folder-heading margin-top-0">
|
||||
Review your message
|
||||
</h1>
|
||||
{{ folder_path(
|
||||
@@ -70,7 +70,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!--<div class="bottom-gutter-1-2">
|
||||
<!--<div class="">
|
||||
{{ copy_to_clipboard(template.id, name="Template ID", thing='template ID') }}
|
||||
</div>-->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user