Skip to content

Commit 99de13c

Browse files
author
Krystle Salazar
committed
Fix alignment of case form page
1 parent 03eb502 commit 99de13c

File tree

4 files changed

+165
-154
lines changed

4 files changed

+165
-154
lines changed

legal_db/static/styles.scss

+5
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,11 @@ a, a:hover {
246246
.input, .select {
247247
margin-top: $space-small;
248248
}
249+
250+
h4 {
251+
margin-bottom: $space-small;
252+
}
253+
249254
hr {
250255
margin: $space-normal 0;
251256
background-color: $color-light-gray;

legal_db/templates/legal_db/case/form.html

+158-152
Original file line numberDiff line numberDiff line change
@@ -2,164 +2,170 @@
22
{% load widget_tweaks %}
33

44
{% block body_content %}
5-
<section class="hero has-background-white padding-horizontal-xl padding-vertical-big">
6-
<h2>Case Submission</h2>
7-
<p class="hero-p">Please add any cases related to Creative Commons licenses and other legal tools that you think should be included in the database.
&nbsp;&nbsp;&nbsp;<span class="required">*</span> Required.</p>
5+
<section class="hero submit">
6+
<div class="container">
7+
<h1 class="hero-title title is-2">Case Submission</h1>
8+
<p class="hero-description body-normal">Please add any cases related to Creative Commons licenses and other legal tools that you think should be included in the database. &nbsp;&nbsp;<span class="required">*</span> Required.</p>
9+
</div>
810
</section>
9-
<section class="has-background-grey-lighter padding-vertical-normal">
10-
<form class="form case" action="{% url 'case_submit' %}" method="post">
11-
{% csrf_token %}
12-
{% if case_form.non_field_errors %}
13-
<div class="notification warning">
14-
<strong class="notification-container">{{ case_form.non_field_errors }}</strong>
15-
</div>
16-
{% endif %}
17-
18-
<h4 class="b-header margin-bottom-small">Contact</h4>
19-
20-
{% with WIDGET_ERROR_CLASS='is-danger' %}
21-
<div class="field">
22-
<label for="{{ case_form.contributor_name.id_for_label }}" class="has-text-weight-bold">
23-
Your Name <span class="required">*</span>
24-
</label>
25-
{% render_field case_form.contributor_name|add_class:"input" %}
26-
{{ case_form.contributor_name.errors }}
27-
</div>
28-
29-
<div class="field">
30-
<label for="{{ case_form.contributor_email.id_for_label }}" class="has-text-weight-bold">
31-
Email <span class="required">*</span>
32-
</label>
33-
{% render_field case_form.contributor_email|add_class:"input" %}
34-
{{ case_form.contributor_email.errors }}
35-
</div>
36-
37-
<div class="field">
38-
<strong>Agreement and Consent</strong> <span class="required">*</span><br/>
39-
<label for="{{ case_form.agreement.id_for_label }}" class="checkbox">
40-
{% render_field case_form.agreement %}
41-
I have read and agree to the <a href="https://creativecommons.org/privacy/" class="has-text-dark-slate-blue">Creative Commons Privacy Policy</a>.
42-
</label>
43-
{{ case_form.agreement.errors }}
44-
</div>
45-
<br/>
46-
47-
<h4 class="b-header margin-bottom-small">Case information</h4>
48-
49-
<div class="field">
50-
<label for="{{ case_form.name.id_for_label }}" class="has-text-weight-bold">Case name</label>
51-
<p>If there are multiple lawsuits between the parties, please just include one here and note the others in the related cases field.</p>
52-
{% render_field case_form.name|add_class:"input" %}
53-
{{ case_form.name.errors }}
54-
</div>
55-
56-
<div class="field">
57-
<label for="{{ case_form.related_cases.id_for_label }}" class="has-text-weight-bold">Related cases</label>
58-
<p>If there are multiple lawsuits between the parties in this dispute, please note additional cases here.</p>
59-
{% render_field case_form.related_cases|add_class:"input" %}
60-
{{ case_form.related_cases.errors }}
61-
</div>
62-
63-
<div class="field">
64-
<label for="{{ case_form.license.id_for_label }}" class="has-text-weight-bold">License on case</label>
65-
{% render_field case_form.license|add_class:"input" %}
66-
{{ case_form.license.errors }}
67-
</div>
68-
69-
<div class="field">
70-
<label for="{{ case_form.country.id_for_label }}" class="has-text-weight-bold">Country</label><br/>
71-
<div class="select">{% render_field case_form.country %}</div>
72-
{{ case_form.country.errors }}
73-
</div>
74-
75-
<div class="field">
76-
<label for="{{ case_form.courts.id_for_label }}" class="has-text-weight-bold">Court(s)</label>
77-
<p>If the lawsuit was filed in one court and then went to another court on appeal, please note all relevant courts here.</p>
78-
{% render_field case_form.courts|add_class:"input" %}
79-
{{ case_form.courts.errors }}
80-
</div>
81-
82-
<div class="field">
83-
<label for="{{ case_form.background.id_for_label }}" class="has-text-weight-bold">Background Information</label>
84-
<p>Please describe the factual information that led to the lawsuit being filed, and explain what claims were filed in the
lawsuit.</p>
85-
{% render_field case_form.background|add_class:"input textarea" %}
86-
{{ case_form.background.errors }}
87-
</div>
88-
89-
<div class="field">
90-
<label for="{{ case_form.summary.id_for_label }}" class="has-text-weight-bold">Case Summary</label>
91-
<p>Please describe what happened after the lawsuit was filed. If there were judicial decisions, please include the dates.</p>
92-
{% render_field case_form.summary|add_class:"input textarea" %}
93-
{{ case_form.summary.errors }}
94-
</div>
95-
96-
<div class="columns">
97-
<div class="column">
98-
<label for="{{ case_form.decision_year.id_for_label }}" class="has-text-weight-bold">Year of case resolution</label>
99-
{% render_field case_form.decision_year|add_class:"input" type="text" inputmode="numeric" placeholder="YYYY" %}
100-
{{ case_form.decision_year.errors }}
101-
</div>
102-
<div class="column">
103-
<label for="{{ case_form.is_pending.id_for_label }}" class="has-text-weight-bold">Is pending?</label><br/>
104-
<div class="select">{% render_field case_form.is_pending %}</div>
105-
</div>
106-
</div>
107-
108-
<h4 class="b-header margin-bottom-small">Links to relevant materials</h4>
109-
110-
<p class="margin-bottom-normal">Please include any links to pleadings, briefs, and opinions in the lawsuit, as well as blog posts, academic articles, or other
 relevant materials. At least one URL is required.</p>
111-
<div id="link-formset">
112-
{{ link_formset.management_form }}
113-
{% for link_form in link_formset %}
114-
<div id="link-form-{{ forloop.counter0 }}">
115-
<div class="columns">
116-
{% if forloop.counter0 == 0 %}
117-
<div class="column is-12">
118-
<label for="{{ link_form.url.id_for_label }}" class="has-text-weight-bold">
119-
URL <span class="required">*</span>
120-
</label>
121-
{% render_field link_form.url|add_class:"input"|attr:"required" type="text" inputmode="url" placeholder="https://example.com" %}
122-
{{ link_form.url.errors }}
123-
</div>
124-
{% else %}
125-
<div class="column is-11">
126-
<label for="{{ link_form.url.id_for_label }}" class="has-text-weight-bold">URL</label>
127-
{% render_field link_form.url|add_class:"input" type="text" inputmode="url" placeholder="https://example.com" %}
128-
{{ link_form.url.errors }}
129-
</div>
130-
<div class="column is-1">
131-
<button type="button" class="button is-delete" onclick="deleteLinkForm('link-form-{{ forloop.counter0 }}')">
132-
<i class="icon cross"></i>
133-
</button>
134-
</div>
135-
{% endif %}
11+
<section class="columns submit is-centered">
12+
<div class="column is-9">
13+
<div class="container">
14+
<form class="form case" action="{% url 'case_submit' %}" method="post">
15+
{% csrf_token %}
16+
{% if case_form.non_field_errors %}
17+
<div class="notification warning">
18+
<strong class="notification-container">{{ case_form.non_field_errors }}</strong>
19+
</div>
20+
{% endif %}
21+
22+
<h4 class="b-header">Contact</h4>
23+
24+
{% with WIDGET_ERROR_CLASS='is-danger' %}
25+
<div class="field">
26+
<label for="{{ case_form.contributor_name.id_for_label }}" class="has-text-weight-bold">
27+
Your Name <span class="required">*</span>
28+
</label>
29+
{% render_field case_form.contributor_name|add_class:"input" %}
30+
{{ case_form.contributor_name.errors }}
31+
</div>
32+
33+
<div class="field">
34+
<label for="{{ case_form.contributor_email.id_for_label }}" class="has-text-weight-bold">
35+
Email <span class="required">*</span>
36+
</label>
37+
{% render_field case_form.contributor_email|add_class:"input" %}
38+
{{ case_form.contributor_email.errors }}
39+
</div>
40+
41+
<div class="field">
42+
<strong>Agreement and Consent</strong> <span class="required">*</span><br/>
43+
<label for="{{ case_form.agreement.id_for_label }}" class="checkbox">
44+
{% render_field case_form.agreement %}
45+
I have read and agree to the <a href="https://creativecommons.org/privacy/" class="has-text-dark-slate-blue">Creative Commons Privacy Policy</a>.
46+
</label>
47+
{{ case_form.agreement.errors }}
48+
</div>
49+
<br/>
50+
51+
<h4 class="b-header">Case information</h4>
52+
53+
<div class="field">
54+
<label for="{{ case_form.name.id_for_label }}" class="has-text-weight-bold">Case name</label>
55+
<p>If there are multiple lawsuits between the parties, please just include one here and note the others in the related cases field.</p>
56+
{% render_field case_form.name|add_class:"input" %}
57+
{{ case_form.name.errors }}
58+
</div>
59+
60+
<div class="field">
61+
<label for="{{ case_form.related_cases.id_for_label }}" class="has-text-weight-bold">Related cases</label>
62+
<p>If there are multiple lawsuits between the parties in this dispute, please note additional cases here.</p>
63+
{% render_field case_form.related_cases|add_class:"input" %}
64+
{{ case_form.related_cases.errors }}
65+
</div>
66+
67+
<div class="field">
68+
<label for="{{ case_form.license.id_for_label }}" class="has-text-weight-bold">License on case</label>
69+
{% render_field case_form.license|add_class:"input" %}
70+
{{ case_form.license.errors }}
71+
</div>
72+
73+
<div class="field">
74+
<label for="{{ case_form.country.id_for_label }}" class="has-text-weight-bold">Country</label><br/>
75+
<div class="select">{% render_field case_form.country %}</div>
76+
{{ case_form.country.errors }}
77+
</div>
78+
79+
<div class="field">
80+
<label for="{{ case_form.courts.id_for_label }}" class="has-text-weight-bold">Court(s)</label>
81+
<p>If the lawsuit was filed in one court and then went to another court on appeal, please note all relevant courts here.</p>
82+
{% render_field case_form.courts|add_class:"input" %}
83+
{{ case_form.courts.errors }}
84+
</div>
85+
86+
<div class="field">
87+
<label for="{{ case_form.background.id_for_label }}" class="has-text-weight-bold">Background Information</label>
88+
<p>Please describe the factual information that led to the lawsuit being filed, and explain what claims were filed in the
lawsuit.</p>
89+
{% render_field case_form.background|add_class:"input textarea" %}
90+
{{ case_form.background.errors }}
91+
</div>
92+
93+
<div class="field">
94+
<label for="{{ case_form.summary.id_for_label }}" class="has-text-weight-bold">Case Summary</label>
95+
<p>Please describe what happened after the lawsuit was filed. If there were judicial decisions, please include the dates.</p>
96+
{% render_field case_form.summary|add_class:"input textarea" %}
97+
{{ case_form.summary.errors }}
98+
</div>
99+
100+
<div class="columns">
101+
<div class="column">
102+
<label for="{{ case_form.decision_year.id_for_label }}" class="has-text-weight-bold">Year of case resolution</label>
103+
{% render_field case_form.decision_year|add_class:"input" type="text" inputmode="numeric" placeholder="YYYY" %}
104+
{{ case_form.decision_year.errors }}
136105
</div>
137-
<div class="columns">
138-
<div class="column is-three-quarters">
139-
<label for="{{ link_form.title.id_for_label }}" class="has-text-weight-bold">Title of link</label>
140-
{% render_field link_form.title|add_class:"input" placeholder="Title of the page being linked to" %}
141-
{{ link_form.title.errors }}
142-
</div>
143-
<div class="column is-one-quarter">
144-
<label for="{{ link_form.label.id_for_label }}" class="has-text-weight-bold">Label of link</label>
145-
{% render_field link_form.label|add_class:"input" placeholder="e.g. Pleading, Brief..." %}
146-
{{ link_form.label.errors }}
147-
</div>
106+
<div class="column">
107+
<label for="{{ case_form.is_pending.id_for_label }}" class="has-text-weight-bold">Is pending?</label><br/>
108+
<div class="select">{% render_field case_form.is_pending %}</div>
148109
</div>
149-
<hr>
150110
</div>
151-
{% endfor %}
152-
</div>
153-
{% endwith %}
154111

155-
<div class="columns">
156-
<div class="column">
157-
<button type="button" class="button small is-pulled-right" id="add-btn">Add link</button>
158-
</div>
159-
</div>
112+
<h4 class="b-header">Links to relevant materials</h4>
113+
114+
<p class="margin-bottom-normal">Please include any links to pleadings, briefs, and opinions in the lawsuit, as well as blog posts, academic articles, or other
 relevant materials. At least one URL is required.</p>
115+
<div id="link-formset">
116+
{{ link_formset.management_form }}
117+
{% for link_form in link_formset %}
118+
<div id="link-form-{{ forloop.counter0 }}">
119+
<div class="columns">
120+
{% if forloop.counter0 == 0 %}
121+
<div class="column is-12">
122+
<label for="{{ link_form.url.id_for_label }}" class="has-text-weight-bold">
123+
URL <span class="required">*</span>
124+
</label>
125+
{% render_field link_form.url|add_class:"input"|attr:"required" type="text" inputmode="url" placeholder="https://example.com" %}
126+
{{ link_form.url.errors }}
127+
</div>
128+
{% else %}
129+
<div class="column is-11">
130+
<label for="{{ link_form.url.id_for_label }}" class="has-text-weight-bold">URL</label>
131+
{% render_field link_form.url|add_class:"input" type="text" inputmode="url" placeholder="https://example.com" %}
132+
{{ link_form.url.errors }}
133+
</div>
134+
<div class="column is-1">
135+
<button type="button" class="button is-delete" onclick="deleteLinkForm('link-form-{{ forloop.counter0 }}')">
136+
<i class="icon cross"></i>
137+
</button>
138+
</div>
139+
{% endif %}
140+
</div>
141+
<div class="columns">
142+
<div class="column is-three-quarters">
143+
<label for="{{ link_form.title.id_for_label }}" class="has-text-weight-bold">Title of link</label>
144+
{% render_field link_form.title|add_class:"input" placeholder="Title of the page being linked to" %}
145+
{{ link_form.title.errors }}
146+
</div>
147+
<div class="column is-one-quarter">
148+
<label for="{{ link_form.label.id_for_label }}" class="has-text-weight-bold">Label of link</label>
149+
{% render_field link_form.label|add_class:"input" placeholder="e.g. Pleading, Brief..." %}
150+
{{ link_form.label.errors }}
151+
</div>
152+
</div>
153+
<hr>
154+
</div>
155+
{% endfor %}
156+
</div>
157+
{% endwith %}
160158

161-
<button type="submit" class="button case">submit case</button>
162-
</form>
159+
<div class="columns">
160+
<div class="column">
161+
<button type="button" class="button small is-pulled-right" id="add-btn">Add link</button>
162+
</div>
163+
</div>
164+
165+
<button type="submit" class="button case">submit case</button>
166+
</form>
167+
</div>
168+
</div>
163169
</section>
164170
{% endblock %}
165171

legal_db/templates/legal_db/scholarship/form.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<section class="hero submit">
66
<div class="container">
77
<h1 class="hero-title title is-2">Scholarship Submission</h1>
8-
<p class="hero-description body-normal">Please add any article related to Creative Commons licenses and other legal tools that you think should be included in the database. <span class="required">*</span> Required.</p>
8+
<p class="hero-description body-normal">Please add any article related to Creative Commons licenses and other legal tools that you think should be included in the database. &nbsp;&nbsp;<span class="required">*</span> Required.</p>
99
</div>
1010
</section>
1111
<section class="columns submit is-centered">

legal_db/templates/legal_db/scholarship/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ <h2 class="card-title">Contribute</h2>
6363
</td>
6464
</tr>
6565
{% empty %}
66-
<tr><td class="has-text-centered" colspan="4">No scholarships are available.</td></tr>
66+
<tr><td class="has-text-centered" colspan="4">No scholarships are available. Try different filters or search terms.</td></tr>
6767
{% endfor %}
6868
</tbody>
6969
</table>

0 commit comments

Comments
 (0)