Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/mozorg/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ def __init__(self, *args, **kwargs):

def clean(self, *args, **kwargs):
super(ContributeUniversityAmbassadorForm, self).clean(*args, **kwargs)
if (self.cleaned_data['current_status'] == 'student'
and not self.cleaned_data['expected_graduation_year']):
if (self.cleaned_data.get('current_status', '') == 'student'
and not self.cleaned_data.get('expected_graduation_year', '')):
raise ValidationError(_('Select graduation year'))
return self.cleaned_data

Expand Down
86 changes: 47 additions & 39 deletions apps/mozorg/templates/mozorg/contribute_university_ambassadors.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,71 +8,107 @@
{% endblock %}
{% block content %}

{% block pageheader %}
<div id="main-feature">
<img src="{{ media('img/contribute/university-ambassadors/logo.png')}}" alt="{{ _('Student Ambassadors') }}">
<h1>{{ _('Become a member of Firefox Student Ambassadors!') }}</h1>
<h2>{{ _('Show your university why Firefox rocks and encourage others to get involved with Mozilla! Get started by signing up now.') }}</h2>
<h2>{{ _('Show your university why Firefox rocks and encourage others to get involved with Mozilla.') }}</h2>
</div>
{% endblock %}

{% block billboardcontent %}
<form method="POST" class="billboard {% if form.non_field_errors() or form.errors %}has-errors{% endif %}"
id="help-form" action="#help-form">
{{ csrf() }}
<input type="hidden" name="source_url" value="{{ request.build_absolute_uri() }}">
<div id="form-content">
{{ form.non_field_errors() }}
<fieldset>
<div class="form-column">
<section class="about-you">
<h3>{{ _('Information about You') }}</h3>
<div class="field">
{{ field_with_attrs(form.first_name, placeholder=_('First name'), required='required')|safe }}
<span class="required">*</span>
{{ form.first_name.errors }}
</div>
<div class="field">
{{ field_with_attrs(form.last_name, placeholder=_('Last name'), required='required')|safe }}
<span class="required">*</span>
{{ form.last_name.errors }}
</div>
<div class="field">
{{ field_with_attrs(form.email, placeholder=_('Email'), required='required')|safe }}
<span class="required">*</span>
{{ form.email.errors }}
</div>
</section>
<section class="school">
<h3>{{ _('School Information') }}</h3>
<div class="field">
{{ field_with_attrs(form.school, placeholder=_('School'), required='required')|safe }}
<span class="required">*</span>
{{ form.school.errors }}
</div>
<div class="field">
{{ field_with_attrs(form.city, placeholder=_('City'), required='required')|safe }}
<span class="required">*</span>
{{ form.city.errors }}
</div>
<div class="select">
<div class="field country">
{{ field_with_attrs(form.country, required='required') }}
<span class="required">*</span>
{{ form.country.errors }}
</div>
<div class="field">
{{ field_with_attrs(form.current_status, required='required') }}
<div class="field {% if not form.expected_graduation_year.value() %} hide {% endif %}"
<span class="required">*</span>
<div class="field {% if not form.expected_graduation_year.value() and not form.non_field_errors() %} hide {% endif %}"
id="expected_graduation_year">
{{ field_with_attrs(form.expected_graduation_year)|safe }}
</div>
{{ form.current_status.errors }}
{{ form.non_field_errors() }}
</div>
<div class="field">
{{ form.area }}
<div class="field {% if not form.area_free_text.value() %} hide {% endif %}"
id="area_free_text">
{{ field_with_attrs(form.area_free_text, placeholder=_('Area of Study')) }}
</div>
{{ form.area.errors }}
</div>
</div>
<div class="field field-share">
<label for="id_share_information">
{{ form.share_information }}
<span class="title">{{ form.share_information.label }}</span>
</label>
</div>
<div class="field field-privacy">
<label for="id_age_confirmation">
{{ field_with_attrs(form.age_confirmation, required='required') }}
{{ field_with_attrs(form.age_confirmation) }}
<span class="title">{{ form.age_confirmation.label }}</span>
</label>
{{ form.age_confirmation.errors }}
</div>
{{ form.privacy }}
{{ form.privacy.errors }}
<div class="field field-format">
{{ form.fmt.label }} {{ form.fmt }}
</div>
</section>
</div>
<div class="form-column">
<section>
<h3>{{ _('Mozilla Communications') }}</h3>
<p>
{% trans %}
Would you also like to hear about other things that are happening at
Mozilla? You can sign-up to receive additional newsletters based on
your interests:
As part of the Student Ambassadors program, you'll receive an email newsletter from us every month with updates, achievements, Firefox news, and more.
{% endtrans %}
</p>
<p>
{% trans %}
Would you also like to hear about other things that are happening at Mozilla? You can sign-up to receive additional newsletters:
{% endtrans %}
</p>
<div class="field field-newsletter">
Expand All @@ -99,43 +135,15 @@ <h3>{{ _('Mozilla Communications') }}</h3>
<span class="title">{{ form.nl_about_mozilla.label }}</span>
</label>
</div>
<p>
{% trans %}
Great news! After you sign-up for the program you'll be
receiving monthly bulletins from us with updates about the
Firefox Student Ambassador Program. Please look for an email
from us at the beginning of every month with some exciting news
about what is going on that month in the Firefox Student
Ambassador Program!
{% endtrans %}
</p>
<div class="field field-privacy">
<label for="id_share_information">
{{ form.share_information }}
<span class="title">{{ form.share_information.label }}</span>
</label>
</div>
<div class="field field-privacy">
<label for="id_age_confirmation">
{{ field_with_attrs(form.age_confirmation, required='required') }}
<span class="title">{{ form.age_confirmation.label }}</span>
</label>
</div>
{{ form.privacy }}
<div class="field field-format">
{{ form.fmt.label }} {{ form.fmt }}
</div>
<div class="field field-captcha">
{{ form.captcha }}
{{ form.captcha.errors }}
</div>
</section>
<div class="form-submit">
<input type="submit" class="button" id="form-submit" value="{{_('Sign me up!')}}">
</div>
</div>
</fieldset>
<div class="form-submit">
<input type="submit" class="button" id="form-submit" value="{{_('Sign me up!')}}">
</div>
</div>
</form>
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{% extends "mozorg/contribute_university_ambassadors.html" %}

{% block pageheader %}
<div id="main-feature">
<img src="{{ media('img/contribute/university-ambassadors/logo.png')}}" alt="{{ _('Student Ambassadors') }}">
</div>
{% endblock %}

{% block billboardcontent %}
<div id="help-form" class="billboard thank">
<h4>{{_('Thank you for getting in touch.')}}</h4>
<p>{{_('Someone from Mozilla will get back to you soon with information about how to get involved.')}}
<h4>{{_('Thank you for signing up to be a Firefox Student Ambassador!')}}</h4>
<p>{{_('Please check your inbox for a confirmation email complete with next steps.')}}
</p>
</div>
{% endblock billboardcontent %}
{% endblock billboardcontent %}
37 changes: 24 additions & 13 deletions media/css/contribute-ambassadors.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,23 @@
width: 75%;
margin: @baseLine auto;
}
h2 {
padding-bottom: 10px;
}
img {
display: block;
margin: @baseLine auto;
}
}

#help-form fieldset {
float: none;
width: 100%;
}

#help-form {
width: auto;
h3 {
color: @headingColor;
}
.form-column {
position: relative;
.span(6);
margin: 0;
}
.form-column section {
margin-bottom: @baseLine;
Expand All @@ -50,7 +48,7 @@
}
.form-submit {
.span(2);
float: right;
margin: 0;
}
.errorlist {
padding-bottom: @baseLine / 2;
Expand All @@ -59,7 +57,7 @@
display:none;
}
input[type=text] {
width: 90%;
width: 85%;
}
input[type=submit] {
width: (@gridColumnWidth * 2) + (@gridGutterWidth);
Expand All @@ -70,14 +68,15 @@
}
.field-newsletter label,
.field-privacy label,
.field-share label,
.privacy-check-label {
position: relative;
padding-left: 24px;
margin-left: 24px;
display: block;
input {
position: absolute;
top: 0;
left: 0;
left: -24px;
}
}
}
Expand All @@ -90,16 +89,28 @@
margin-top: 0;
}

span.required {
padding-left: .1em;
color: #c00;
}

.field-privacy span:after,
.privacy-check-label span:after {
content: " *";
color: #c00;
}



/* Tablet Layout: 760px */
@media only screen and (min-width: @breakTablet) and (max-width: @breakDesktop) {

#help-form {
.form-column {
.span(9);
}
.about-you, .school {
.span_narrow(6);
margin: 0;
input[type=text] {
width: 60%;
}
}

Expand Down