Changeset - d28ffd68ca45
[Not reviewed]
0 2 0
Brett Smith (brett) - 7 years ago 2016-12-02 17:35:19
brett@sfconservancy.org
supporter: HTML5 improvements to form.

* Use "number" type for a better prompt.
* Use new standard "min" attribute for richer validation.
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/js/supporter-page.js
Show inline comments
...
 
@@ -119,3 +119,3 @@ $(document).ready(function() {
 
        var isValid = ( re.test(value) &&
 
                        parseInt(noCommaValue) >= parseInt(input.attr("minimum")));
 
                        parseInt(noCommaValue) >= parseInt(input.attr("min")));
 
        if (isValid)  {
www/conservancy/static/supporter/2016-supporter-appeal.html
Show inline comments
...
 
@@ -71,3 +71,3 @@
 
  <label for="amount"><strong>Amount:</strong> $</label>
 
  <input id="amount" type="text" name="amount" size="7" minimum="120" value="120" />
 
  <input id="amount" type="number" name="amount" size="7" min="120" value="120" />
 
  <span id="error" class="form-error-show">$120 is a minimum for Conservancy
...
 
@@ -140,3 +140,3 @@
 
  <label for="amount"><strong>Monthly Amount:</strong> $</label>
 
  <input id="amount" type="text" name="a3" size="5" minimum="10" value="10" />
 
  <input id="amount" type="number" name="a3" size="5" min="10" value="10" />
 
  <span id="error" class="form-error-show">$10/month is a minimum for Conservancy
...
 
@@ -199,3 +199,3 @@
 
  <label for="amount"><strong>Amount:</strong> $</label>
 
  <input id="amount" type="text" name="amount" size="7" minimum="120" value="120" />
 
  <input id="amount" type="number" name="amount" size="7" min="120" value="120" />
 
  <span id="error" class="form-error-show">$120 is a minimum for Conservancy
0 comments (0 inline, 0 general)