~ubuntu-branches/ubuntu/precise/libcgi-formbuilder-perl/precise

« back to all changes in this revision

Viewing changes to t/1a-test05.html~

  • Committer: Package Import Robot
  • Author(s): Jonas Smedegaard
  • Date: 2011-09-11 02:55:17 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110911025517-nhr6j6fwwc9xc4l1
Tags: 3.06-1
* New upstream release.
* Use CDBS perl-makemaker.mk (not deprecated perlmodule.mk).
  Tighten build-dependency on CDBS.
* Update copyright file:
  + Fix use Comment field (not License-Comments).
  + Quote license names in comments.
* Add patch cherry-picked upstream to fix testsuite.
* Update package relations:
  + Build-depend on and suggest libcgi-ssi-perl.
  + Make suggestions unversioned and drop conflicts: satisfied even in
    oldstable.
  + Maintain all relations using CDBS in rules file.
* Stop preserving cruft no long shipped upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<script type="text/javascript"><!-- hide from old browsers
2
 
function validate (form) {
3
 
    var alertstr = '';
4
 
    var invalid  = 0;
5
 
 
6
 
    // email: standard text, hidden, password, or textarea box
7
 
    var email = form.elements['email'].value;
8
 
    if (email != null && email != "" && ! email.match(/^[\w\-\+\._]+\@[a-zA-Z0-9][-a-zA-Z0-9\.]*\.[a-zA-Z]+$/)) {
9
 
        alertstr += '- Invalid entry for the "Email" field\n';
10
 
        invalid++;
11
 
    }
12
 
    // first_name: standard text, hidden, password, or textarea box
13
 
    var first_name = form.elements['first_name'].value;
14
 
    if (first_name == null || first_name === "") {
15
 
        alertstr += '- Invalid entry for the "First Name" field\n';
16
 
        invalid++;
17
 
    }
18
 
    if (invalid > 0 || alertstr != '') {
19
 
        if (! invalid) invalid = 'The following';   // catch for programmer error
20
 
        alert(''+invalid+' error(s) were encountered with your submission:'+'\n\n'
21
 
                +alertstr+'\n'+'Please correct these fields and try again.');
22
 
        // reset counters
23
 
        alertstr = '';
24
 
        invalid  = 0;
25
 
        return false;
26
 
    }
27
 
    return true;  // all checked ok
28
 
}
29
 
//-->
30
 
</script>
31
 
<noscript><span class="fb_invalid">Please enable Javascript or use a newer browser.</span></noscript>
32
 
<p>Fields that are <span class="fb_required">highlighted</span> are required.</p>
33
 
<form action="TEST" method="get" onsubmit="return validate(this);">
34
 
<div>
35
 
<input id="_submitted" name="_submitted" type="hidden" value="1" />
36
 
<table class="fb">
37
 
<tr>
38
 
  <td class="fb_label">Email</td>
39
 
  <td class="fb_field"><input class="fb_input" id="email" name="email" type="text" value="nate@wiger.org" /></td>
40
 
</tr>
41
 
<tr>
42
 
  <td class="fb_label"><span class="fb_required">First Name</span></td>
43
 
  <td class="fb_field"><input class="fb_input" id="first_name" name="first_name" type="text" value="Nate" /></td>
44
 
</tr>
45
 
<tr class="fb_row">
46
 
  <td class="fb_submit" colspan="2"><input class="fb_button" id="_submit" name="_submit" type="submit" value="Submit" /></td>
47
 
</tr>
48
 
</table>
49
 
</div>
50
 
</form>