Merge lp:~cjohnston/summit/sponsorship-form-follow-guidelines into lp:summit

Proposed by Chris Johnston
Status: Merged
Approved by: Chris Johnston
Approved revision: 431
Merged at revision: 432
Proposed branch: lp:~cjohnston/summit/sponsorship-form-follow-guidelines
Merge into: lp:summit
Diff against target: 111 lines (+18/-28)
3 files modified
summit/sponsor/forms.py (+5/-4)
summit/sponsor/templates/sponsor/step0.html (+7/-15)
summit/sponsor/templates/sponsor/step1.html (+6/-9)
To merge this branch: bzr merge lp:~cjohnston/summit/sponsorship-form-follow-guidelines
Reviewer Review Type Date Requested Status
Chris Johnston Approve
Review via email: mp+118830@code.launchpad.net

Commit message

Updates request sponsorship form to follow guidelines.

To post a comment you must log in.
Revision history for this message
Chris Johnston (cjohnston) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'summit/sponsor/forms.py'
2--- summit/sponsor/forms.py 2012-01-23 01:18:55 +0000
3+++ summit/sponsor/forms.py 2012-08-08 21:19:18 +0000
4@@ -25,6 +25,7 @@
5
6 from summit.extra.formsets import WizardFormSet
7 from summit.extra.fields import CountryField
8+from common.forms import RenderableMixin
9
10 from summit.sponsor.models import (Sponsorship, SponsorshipSuggestion,
11 SponsorshipScore, NonLaunchpadSponsorship)
12@@ -74,10 +75,10 @@
13 http://creativecommons.org/licenses/by-sa/3.0/''')
14
15
16-class SponsorshipForm1(forms.Form):
17- location = forms.CharField(max_length=50,
18+class SponsorshipForm1(forms.Form, RenderableMixin):
19+ location = forms.CharField(max_length=50, label="Closest airport",
20 help_text='Enter your nearest city or airport')
21- country = CountryField()
22+ country = CountryField(label="Country")
23 about = forms.CharField(max_length=3000,
24 label='About yourself',
25 help_text='Tell us about yourself and your work within the Ubuntu community',
26@@ -142,7 +143,7 @@
27 return mark_safe(u'\n'.join([unicode(self.management_form), forms]))
28
29
30-class SponsorshipForm3(forms.Form):
31+class SponsorshipForm3(forms.Form, RenderableMixin):
32 needs_travel = forms.BooleanField(label='Sponsorship of Travel:',
33 required=False,
34 initial=True)
35
36=== modified file 'summit/sponsor/templates/sponsor/step0.html'
37--- summit/sponsor/templates/sponsor/step0.html 2012-07-31 00:22:01 +0000
38+++ summit/sponsor/templates/sponsor/step0.html 2012-08-08 21:19:18 +0000
39@@ -15,29 +15,21 @@
40 <article class="span-8">
41 <h1>Request Sponsorship</h1>
42 <p>
43- To request sponsorship we need to get a few details from you, such as where you'll be travelling from. We also need to know a bit about you so that we can judge your request. We'll get some of that from Launchpad, but please take the time to tell us about yourself in your own words.
44- </p>
45-
46- <p>
47- If you have any problems with Summit, please <a href="https://bugs.launchpad.net/summit/+filebug">file a bug</a>.
48+ To request sponsorship for {{ summit.title }} in {{ summit.location }} we need to get a few details from you, such as where you'll be travelling from. We also need to know a bit about you so that we can judge your request. We'll get some of that from Launchpad, but please take the time to tell us about yourself in your own words.
49 </p>
50 </article>
51 </div>
52
53 <div class="row">
54- <article class="span-8">
55- <form method="post">
56- {% csrf_token %}
57- <table>
58- <tr><th>Summit:</th><td><span>{{ summit.name }}<br/>{{ summit.location }}</span></td></tr>
59- <tr><td colspan="2"><h2>Your details</h2></td></tr>
60- <tr><th>Your name:</th><td><span>{{ user.get_full_name }}</span></td></tr>
61- <tr><th>E-mail address:</th><td><span>{{ user.email }}</span></td></tr>
62- {{ form }}
63- </table>
64+ <article id="form" class="span-8">
65+ <form method="post">{% csrf_token %}
66+ <fieldset>
67+ <h3>Your details</h3>
68+ {{ form.as_template }}
69 <input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
70 {{ previous_fields|safe }}
71 <input type="submit" value="Next"/>
72+ </fieldset>
73 </form>
74 </article>
75 </div>
76
77=== modified file 'summit/sponsor/templates/sponsor/step1.html'
78--- summit/sponsor/templates/sponsor/step1.html 2012-07-31 00:22:01 +0000
79+++ summit/sponsor/templates/sponsor/step1.html 2012-08-08 21:19:18 +0000
80@@ -13,9 +13,6 @@
81 <div class="row">
82 <article class="span-8">
83 <h1>Request Sponsorship</h1>
84-
85-<br />
86-<h2>Further information</h2>
87 <p>
88 Almost done, there's just a few final details we need for your application;
89 and you've a chance to add anything else that you think is important when
90@@ -25,15 +22,15 @@
91 </div>
92
93 <div class="row">
94-<article class="span-8">
95-<form method="post">
96-{% csrf_token %}
97-<table>
98-{{ form }}
99-</table>
100+<article id="form" class="span-8">
101+<form method="post">{% csrf_token %}
102+<fieldset>
103+<h3>Further information</h3>
104+{{ form.as_template }}
105 <input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
106 {{ previous_fields|safe }}
107 <input type="submit" value="Finish"/>
108+</fieldset>
109 </form>
110 </article>
111 </div>

Subscribers

People subscribed via source and target branches