Bugfixing

svn path=/trunk/; revision=24145
This commit is contained in:
otto 2012-08-30 13:38:54 +00:00
parent 08274c9f44
commit 663a94df7d
4 changed files with 43 additions and 14 deletions

View File

@ -414,6 +414,9 @@
</xsl:template>
<!-- Apply support page -->
<xsl:template match="support-portal-javascript">
<xsl:call-template name="support-portal-javascript" />
</xsl:template>
<xsl:template match="support-form-javascript">
<xsl:call-template name="support-form-javascript" />
</xsl:template>

View File

@ -33,38 +33,48 @@
<form method="post" action="" class="support">
<p>
<label id="firstname">First name
<input type="text" name="firstname" />
<input type="text" name="firstname" required="required"/>
</label>
</p>
<p>
<label id="lastname">Last name
<input type="text" name="lastname" />
<input type="text" name="lastname" required="required"/>
</label>
</p>
<p>
<label id="email">E-mail (required)
<input type="email" name="email" required="required" />
<label id="zip">Zip code
<input type="text" name="zip" />
</label>
</p>
<p>
<label id="country">Country (required)
<label id="city">City
<input type="text" name="city" />
</label>
</p>
<p>
<label id="country">Country
<select name="country_code" required="required">
<option value="">Select..</option>
<optgroup label="Europe">
<country-list-europe/>
</optgroup>
<optgroup label="Europe">
<optgroup label="Other continents">
<country-list-other-continents/>
</optgroup>
</select>
</label>
</p>
<!-- p>
<label id="lang">Language
<select name="lang" required="required">
<option value="">Select..</option>
where to get a ISO 639-1 list here..?
</select>
</label>
</p -->
<p><input type="submit" name="submit" value="I Support the FSFE!" data-loading-text="Sending.."/></p>
<input type="hidden" name="ref_url" value="" />
<input type="hidden" name="ref_id" value="" />
<input type="hidden" name="lang" value="en" />
<p><input type="submit" name="submit" value="Update" data-loading-text="Sending.."/></p>
</form>
<p><em>Our privacy policy is simple: We will never share your data with anyone outside FSFE. Period.</em></p>

View File

@ -48,7 +48,7 @@
<optgroup label="Europe">
<country-list-europe/>
</optgroup>
<optgroup label="Europe">
<optgroup label="Other continents">
<country-list-other-continents/>
</optgroup>
</select>

View File

@ -108,8 +108,25 @@
</xsl:copy>
</xsl:template>
<xsl:template name="support-portal-javascript">
<script type="text/javascript">
/* <![CDATA[ */
function map_json_to_html(data) {
for (x in data) {
$(x).html(data[x]);
}
}
$(document).ready(function() {
var secret = window.location.search.slice(1);
$.getJSON('portal-backend?'+secret, function(data) {
map_json_to_html(data);
});
});
/* ]]> */
</script>
</xsl:template>
<xsl:template name="support-form-javascript">
<script type="text/javascript" src="/scripts/jquery.validate.min.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
@ -145,7 +162,6 @@
/* ]]> */
</script>
</xsl:template>
<!-- refactored these her from the support form -->