mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
Make email pattern work in new context
The email pattern looked a bit shonky when displayed in a narrower column. This commit fixes it by making the email’s metadata (eg subject, from) into a table, which it sort of is. This means that it is more flexible about the size of container in which it sits.
This commit is contained in:
@@ -7,9 +7,26 @@
|
||||
margin: 20px 0 10px 0;
|
||||
}
|
||||
|
||||
&-subject,
|
||||
&-from {
|
||||
margin: 10px 0;
|
||||
&-meta {
|
||||
|
||||
@include core-19;
|
||||
margin: 0;
|
||||
|
||||
td,
|
||||
th {
|
||||
@include core-19;
|
||||
border-bottom: 0;
|
||||
border-top: 1px solid $border-colour;
|
||||
}
|
||||
|
||||
th {
|
||||
color: $secondary-text-colour;
|
||||
}
|
||||
|
||||
td {
|
||||
width: 99%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&-from {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
.sms-message-use-links {
|
||||
|
||||
@include copy-19;
|
||||
margin-top: 55px;
|
||||
margin-top: 52px;
|
||||
|
||||
a {
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ def add_service_template(service_id, template_type):
|
||||
|
||||
if form.validate_on_submit():
|
||||
tdao.insert_service_template(
|
||||
form.name.data, template['template_type'], form.template_content.data, service_id, form.subject.data or None
|
||||
form.name.data, template_type, form.template_content.data, service_id, form.subject.data or None
|
||||
)
|
||||
return redirect(
|
||||
url_for('.choose_template', service_id=service_id, template_type=template_type)
|
||||
|
||||
@@ -9,29 +9,27 @@
|
||||
</h3>
|
||||
{% endif %}
|
||||
<div class="email-message">
|
||||
{% if from_name and from_address %}
|
||||
<div class="email-message-from">
|
||||
<div class="grid-row">
|
||||
<div class="column-one-eighth">
|
||||
<span class="form-hint">From</span>
|
||||
</div>
|
||||
<div class="column-seven-eighths">
|
||||
{{ from_name }} <{{ from_address }}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if subject %}
|
||||
<div class="email-message-subject">
|
||||
<div class="grid-row">
|
||||
<div class="column-one-eighth">
|
||||
<span class="form-hint">Subject</span>
|
||||
</div>
|
||||
<div class="column-seven-eighths">
|
||||
{{ subject }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if from_name or subject %}
|
||||
<table class="email-message-meta">
|
||||
<tbody>
|
||||
{% if from_name and from_address %}
|
||||
<tr>
|
||||
<th>From</th>
|
||||
<td>
|
||||
{{ from_name }} <{{ from_address }}>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if subject %}
|
||||
<tr class="email-message-meta">
|
||||
<th>Subject</th>
|
||||
<td>
|
||||
{{ subject }}
|
||||
</td>
|
||||
</div>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
<div class="email-message-body">
|
||||
{{ body|nl2br }}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
<a href="{{ url_for('.add_service_template', service_id=service_id, template_type='sms') }}" class="button">Add a new template</a>
|
||||
<a href="{{ url_for('.add_service_template', service_id=service_id, template_type='email') }}" class="button">Add a new template</a>
|
||||
</p>
|
||||
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user