summaryrefslogtreecommitdiff
path: root/newuser.html
blob: 000976b827413eebcd5390f38189ca8c3b22fe98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html>
  <head>
    <title>Create a Piny user</title>
    <script src="/js/jquery/jquery.min.js"></script>
    <script type="text/javascript">

      $(document).ready(function(){

        $("#pass2-row").css( "display", "block" );

        $("#username").change(function( obj ){

          $.post( "https://secure.dev.piny.be/piny-validate", { t: "Username", v: obj.value }, function( data ){
            var res = $.parseJSON( data );
            if ( res.ok ) {
              $("#username-error").removeClass( "error" ).html( "" );
            } else {
              $("#username-error").addClass( "error" ).html( res.msg );
            };
          } );

        });

      });

    </script>
  </head>
  <body>
    <h1>Create a Piny user</h1>
    <form action="https://secure.piny.be/piny-newuser" method="POST">
      <div class="field"><div class="label">Desired username</div><div class="input"><input type="text" name="n" id="username" /></div><div id="username-error"></div></div>
      <div class="field"><div class="label">Your email address</div><div class="input"><input type="text" name="a" id="email" /></div><div id="email-error"></div></div>
      <div class="field"><div class="label">Desired password</div><div class="input"><input type="password" name="p" id="pass1" /></div><div id="pass1-error"></div></div>
      <div class="field" id="pass2-row" style="display: none"><div class="label">Retype password</div><div class="input"><input type="password" id="pass2" /></div><div id="pass2-error"></div></div>
      <div class="field"><div class="label"></div><div class="input"><input type="submit" name="Create User" /></div></div>
    </form>
  </body>
</html>