You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mp...@apache.org on 2011/07/05 22:24:41 UTC

svn commit: r1143194 - /incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp

Author: mpierce
Date: Tue Jul  5 20:24:40 2011
New Revision: 1143194

URL: http://svn.apache.org/viewvc?rev=1143194&view=rev
Log:
(RAVE-89) Adding form validation to basic account creation form.

Modified:
    incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp?rev=1143194&r1=1143193&r2=1143194&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp Tue Jul  5 20:24:40 2011
@@ -21,21 +21,34 @@
 <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
 <%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
 <rave:rave_generic_page pageTitle="New Account Application - Rave">
+  <script src="http://code.jquery.com/jquery-latest.js"></script>
+  <script src="http://view.jquery.com/trunk/plugins/validate/jquery.validate.js"></script>
+  <script>
+	 $(document).ready(function(){
+	    $("#newAccountForm").validate();
+	 });
+  </script>
+  <style>
+	 .error {
+	    font: normal 10px arial;
+		 color: #ff0000
+	 }
+  </style>
 	<div id="content">
-		<h1>Rave Account Application</h1>
+		<h1>Rave Test Account Application</h1>
 		<form id="newAccountForm" name="newAccountForm" action="app/newaccount">
 			<fieldset>
 				<p>
 					<label for="userNameField">Username:</label> <input
-						id="userNameField" type="text" name="userName" />
+						id="userNameField" type="text" name="userName" class="required" minlength="4"/>
 				</p>
 				<p>
 					<label for="passwordField">Password:</label> <input
-						id="passwordField" type="password" name="password" />
+						id="passwordField" type="password" name="password" class="required" minlength="4"/>
 				</p>
 				<p>
 					<label for="passwordConfirmField">Confirm Password:</label> <input
-						id="passwordConfirmField" type="password" name="passwordConfirmed" />
+						id="passwordConfirmField" type="password" name="passwordConfirmed" class="required" minlength="4" equalTo="#passwordField"/>
 				</p>
 				<p>
 				<input type="submit" value="Create Account" />
@@ -45,4 +58,5 @@
 
 		</form>
 	</div>
-</rave:rave_generic_page>
\ No newline at end of file
+
+</rave:rave_generic_page>



Re: svn commit: r1143194 - /incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp

Posted by Marlon Pierce <mp...@cs.indiana.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sure, I'll clean this up.

On 7/5/11 4:52 PM, Jasha Joachimsthal wrote:
> Hi Marlon,
> 
> Could you please move the scripts to the end of the HTML for faster
> rendering? Also call them in the same way as on the portal homepage (//host
> instead of http://host, but do check if it's also available over https).
> Otherwise users will get security popups when the portal is being hosted
> over https.
> Also could you move the inline CSS to the external CSS file? If you don't
> have time today, I can do it tomorrow.
> 
> Jasha Joachimsthal
> 
> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)
> 
> www.onehippo.com
> 
> 
> On 5 July 2011 22:24, <mp...@apache.org> wrote:
> 
>> Author: mpierce
>> Date: Tue Jul  5 20:24:40 2011
>> New Revision: 1143194
>>
>> URL: http://svn.apache.org/viewvc?rev=1143194&view=rev
>> Log:
>> (RAVE-89) Adding form validation to basic account creation form.
>>
>> Modified:
>>    incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>>
>> Modified: incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>> URL:
>> http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp?rev=1143194&r1=1143193&r2=1143194&view=diff
>>
>> ==============================================================================
>> --- incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>> (original)
>> +++ incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp Tue Jul
>>  5 20:24:40 2011
>> @@ -21,21 +21,34 @@
>>  <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
>>  <%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
>>  <rave:rave_generic_page pageTitle="New Account Application - Rave">
>> +  <script src="http://code.jquery.com/jquery-latest.js"></script>
>> +  <script src="
>> http://view.jquery.com/trunk/plugins/validate/jquery.validate.js
>> "></script>
>> +  <script>
>> +        $(document).ready(function(){
>> +           $("#newAccountForm").validate();
>> +        });
>> +  </script>
>> +  <style>
>> +        .error {
>> +           font: normal 10px arial;
>> +                color: #ff0000
>> +        }
>> +  </style>
>>        <div id="content">
>> -               <h1>Rave Account Application</h1>
>> +               <h1>Rave Test Account Application</h1>
>>                <form id="newAccountForm" name="newAccountForm"
>> action="app/newaccount">
>>                        <fieldset>
>>                                <p>
>>                                        <label
>> for="userNameField">Username:</label> <input
>> -                                               id="userNameField"
>> type="text" name="userName" />
>> +                                               id="userNameField"
>> type="text" name="userName" class="required" minlength="4"/>
>>                                </p>
>>                                <p>
>>                                        <label
>> for="passwordField">Password:</label> <input
>> -                                               id="passwordField"
>> type="password" name="password" />
>> +                                               id="passwordField"
>> type="password" name="password" class="required" minlength="4"/>
>>                                </p>
>>                                <p>
>>                                        <label
>> for="passwordConfirmField">Confirm Password:</label> <input
>> -                                               id="passwordConfirmField"
>> type="password" name="passwordConfirmed" />
>> +                                               id="passwordConfirmField"
>> type="password" name="passwordConfirmed" class="required" minlength="4"
>> equalTo="#passwordField"/>
>>                                </p>
>>                                <p>
>>                                <input type="submit" value="Create Account"
>> />
>> @@ -45,4 +58,5 @@
>>
>>                </form>
>>        </div>
>> -</rave:rave_generic_page>
>> \ No newline at end of file
>> +
>> +</rave:rave_generic_page>
>>
>>
>>
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOE3oUAAoJEEfVXEODPFIDJEoIAJ0W3Txa7q31JwqVQj/UvPG+
prq+jM+ty9BuwC3H4I1yxQaAp8R3aZD8Qt9kqxGKa8oqc+rM4b6iBip3R6LbogPK
oyuH0Yc7mhkUnIV/TzopB4axcsc34dKRgnkszTtKc7whcIQ7GD2BTOOL5CK+Y+5z
tLJd71jEHJVImxslSA3CD0FAMJhqMRVoWL/jHKVa8FTrcS3JSyMJvTwKjC+1//Pp
ucHCcSWPwbxroTN8sdIbPw9j8vfXhW2pUv+eFvRdw/vX8ciPT6ESsdB0HxsYBVrq
WOGYkTeqD/eWwu1L1xFC9ZpS/+OgUadO3Tpdv4QRWaqVtsSGHxT8A1cI4cu0e4A=
=CfKI
-----END PGP SIGNATURE-----

Re: svn commit: r1143194 - /incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp

Posted by Jasha Joachimsthal <j....@onehippo.com>.
Thanks Matthew,

I didn't know it was available over https as well. I'll change the jsp and
remove the script from the project in a few minutes.

Jasha Joachimsthal

Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)

www.onehippo.com


On 6 July 2011 13:44, Franklin, Matthew B. <mf...@mitre.org> wrote:

> On 7/6/11 5:31 AM, "Jasha Joachimsthal" <j....@onehippo.com>
> wrote:
>
> >I've added the minified version of jQuery validation to the project.
> >According to [1] it is okay to include it because one of the licenses is
> >MIT.
>
> Personally, I don't think we should be including third party javascript in
> the war, at least for now, when it is available on a CDN.  It makes it
> easier to manage if it is not part of our source.
>
> http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js
>
>
> >Besides that I changed the jQuery url to the one we also use in the
> >portal.
> >'latest' is tricky because after a new jQuery release the dependent
> >scripts
> >may be broken. And I moved the validation from custom attributes to an
> >(external) script.
> >
> >Jasha
> >
> >[1] http://markmail.org/thread/ttlu4nse3ghbwkj5
> >
> >On 6 July 2011 08:14, Jasha Joachimsthal
> ><j....@onehippo.com>wrote:
> >
> >> In that case, it's better to include it in Rave (if the license is
> >> compatible). If you request the portal over https but some of the
> >>resources
> >> is served over http, the browser will at least show a broken lock and
> >>IE8
> >> will even warn you about insecure resources with as default behaviour
> >>"do
> >> not use".
> >> I'll have a look at it.
> >>
> >> Jasha Joachimsthal
> >>
> >> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
> >> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll
> >>free)
> >>
> >> www.onehippo.com
> >>
> >>
> >> On 5 July 2011 23:45, Marlon Pierce <mp...@cs.indiana.edu> wrote:
> >>
> >>> -----BEGIN PGP SIGNED MESSAGE-----
> >>> Hash: SHA1
> >>>
> >>> Unfortunately, not https for that JS library. Revert back to
> >>>src="http://
> >>> .../"?
> >>>
> >>>
> >>> Marlon
> >>>
> >>>
> >>> On 7/5/11 4:52 PM, Jasha Joachimsthal wrote:
> >>> > Hi Marlon,
> >>> >
> >>> > Could you please move the scripts to the end of the HTML for faster
> >>> > rendering? Also call them in the same way as on the portal homepage
> >>> (//host
> >>> > instead of http://host, but do check if it's also available over
> >>> https).
> >>> > Otherwise users will get security popups when the portal is being
> >>>hosted
> >>> > over https.
> >>> > Also could you move the inline CSS to the external CSS file? If you
> >>> don't
> >>> > have time today, I can do it tomorrow.
> >>> >
> >>> > Jasha Joachimsthal
> >>> >
> >>> > Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522
> >>>4466
> >>> > US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll
> >>> free)
> >>> >
> >>> > www.onehippo.com
> >>> >
> >>> >
> >>> > On 5 July 2011 22:24, <mp...@apache.org> wrote:
> >>> >
> >>> >> Author: mpierce
> >>> >> Date: Tue Jul  5 20:24:40 2011
> >>> >> New Revision: 1143194
> >>> >>
> >>> >> URL: http://svn.apache.org/viewvc?rev=1143194&view=rev
> >>> >> Log:
> >>> >> (RAVE-89) Adding form validation to basic account creation form.
> >>> >>
> >>> >> Modified:
> >>> >>    incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
> >>> >>
> >>> >> Modified:
> >>> incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
> >>> >> URL:
> >>> >>
> >>>
> >>>
> http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/w
> >>>ebapp/newaccount.jsp?rev=1143194&r1=1143193&r2=1143194&view=diff
> >>> >>
> >>> >>
> >>>
> >>>========================================================================
> >>>======
> >>> >> --- incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
> >>> >> (original)
> >>> >> +++ incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
> >>>Tue
> >>> Jul
> >>> >>  5 20:24:40 2011
> >>> >> @@ -21,21 +21,34 @@
> >>> >>  <%@ taglib prefix="spring" uri="
> http://www.springframework.org/tags
> >>> "%>
> >>> >>  <%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
> >>> >>  <rave:rave_generic_page pageTitle="New Account Application - Rave">
> >>> >> +  <script src="http://code.jquery.com/jquery-latest.js"></script>
> >>> >> +  <script src="
> >>> >> http://view.jquery.com/trunk/plugins/validate/jquery.validate.js
> >>> >> "></script>
> >>> >> +  <script>
> >>> >> +        $(document).ready(function(){
> >>> >> +           $("#newAccountForm").validate();
> >>> >> +        });
> >>> >> +  </script>
> >>> >> +  <style>
> >>> >> +        .error {
> >>> >> +           font: normal 10px arial;
> >>> >> +                color: #ff0000
> >>> >> +        }
> >>> >> +  </style>
> >>> >>        <div id="content">
> >>> >> -               <h1>Rave Account Application</h1>
> >>> >> +               <h1>Rave Test Account Application</h1>
> >>> >>                <form id="newAccountForm" name="newAccountForm"
> >>> >> action="app/newaccount">
> >>> >>                        <fieldset>
> >>> >>                                <p>
> >>> >>                                        <label
> >>> >> for="userNameField">Username:</label> <input
> >>> >> -                                               id="userNameField"
> >>> >> type="text" name="userName" />
> >>> >> +                                               id="userNameField"
> >>> >> type="text" name="userName" class="required" minlength="4"/>
> >>> >>                                </p>
> >>> >>                                <p>
> >>> >>                                        <label
> >>> >> for="passwordField">Password:</label> <input
> >>> >> -                                               id="passwordField"
> >>> >> type="password" name="password" />
> >>> >> +                                               id="passwordField"
> >>> >> type="password" name="password" class="required" minlength="4"/>
> >>> >>                                </p>
> >>> >>                                <p>
> >>> >>                                        <label
> >>> >> for="passwordConfirmField">Confirm Password:</label> <input
> >>> >> -
> >>> id="passwordConfirmField"
> >>> >> type="password" name="passwordConfirmed" />
> >>> >> +
> >>> id="passwordConfirmField"
> >>> >> type="password" name="passwordConfirmed" class="required"
> >>>minlength="4"
> >>> >> equalTo="#passwordField"/>
> >>> >>                                </p>
> >>> >>                                <p>
> >>> >>                                <input type="submit" value="Create
> >>> Account"
> >>> >> />
> >>> >> @@ -45,4 +58,5 @@
> >>> >>
> >>> >>                </form>
> >>> >>        </div>
> >>> >> -</rave:rave_generic_page>
> >>> >> \ No newline at end of file
> >>> >> +
> >>> >> +</rave:rave_generic_page>
> >>> >>
> >>> >>
> >>> >>
> >>> >
> >>> -----BEGIN PGP SIGNATURE-----
> >>> Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
> >>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> >>>
> >>> iQEcBAEBAgAGBQJOE4X+AAoJEEfVXEODPFIDzIAH/1oleecp8PzAvpeO/lUBJ2Mq
> >>> 3lPd2FhHIXXIK/sYo7jMFSZNUInxcTsF/aiRyVAVcXVJmNliHg+FGgxEH8LfIrgZ
> >>> CWxU28oemo172YH/9ruBVOnnsZNnOK5AagnK1bD18I0iItoLBoeY1eDSAyRrOZrk
> >>> T3056vq6yAhbUJw1YD52kNwyBCBcuqSYKNTr4ofq8f+UTDdvJJJ75qEuKOZpy3Og
> >>> hlbCfs3+TruH18E2TuAmETNvUmt97thTIQiN0Jqc7Gx12RANoK9klK2jwo+lFnAA
> >>> JodJE1dFOUlVOQuFfVK4SzVGlyIVChfeS7TKqmGPqBjZi1X2NJ8Nm+vEd8D2kGk=
> >>> =3J/q
> >>> -----END PGP SIGNATURE-----
> >>>
> >>
> >>
>
>

Re: svn commit: r1143194 - /incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp

Posted by "Franklin, Matthew B." <mf...@mitre.org>.
On 7/6/11 5:31 AM, "Jasha Joachimsthal" <j....@onehippo.com>
wrote:

>I've added the minified version of jQuery validation to the project.
>According to [1] it is okay to include it because one of the licenses is
>MIT.

Personally, I don't think we should be including third party javascript in
the war, at least for now, when it is available on a CDN.  It makes it
easier to manage if it is not part of our source.

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js


>Besides that I changed the jQuery url to the one we also use in the
>portal.
>'latest' is tricky because after a new jQuery release the dependent
>scripts
>may be broken. And I moved the validation from custom attributes to an
>(external) script.
>
>Jasha
>
>[1] http://markmail.org/thread/ttlu4nse3ghbwkj5
>
>On 6 July 2011 08:14, Jasha Joachimsthal
><j....@onehippo.com>wrote:
>
>> In that case, it's better to include it in Rave (if the license is
>> compatible). If you request the portal over https but some of the
>>resources
>> is served over http, the browser will at least show a broken lock and
>>IE8
>> will even warn you about insecure resources with as default behaviour
>>"do
>> not use".
>> I'll have a look at it.
>>
>> Jasha Joachimsthal
>>
>> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
>> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll
>>free)
>>
>> www.onehippo.com
>>
>>
>> On 5 July 2011 23:45, Marlon Pierce <mp...@cs.indiana.edu> wrote:
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Unfortunately, not https for that JS library. Revert back to
>>>src="http://
>>> .../"?
>>>
>>>
>>> Marlon
>>>
>>>
>>> On 7/5/11 4:52 PM, Jasha Joachimsthal wrote:
>>> > Hi Marlon,
>>> >
>>> > Could you please move the scripts to the end of the HTML for faster
>>> > rendering? Also call them in the same way as on the portal homepage
>>> (//host
>>> > instead of http://host, but do check if it's also available over
>>> https).
>>> > Otherwise users will get security popups when the portal is being
>>>hosted
>>> > over https.
>>> > Also could you move the inline CSS to the external CSS file? If you
>>> don't
>>> > have time today, I can do it tomorrow.
>>> >
>>> > Jasha Joachimsthal
>>> >
>>> > Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522
>>>4466
>>> > US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll
>>> free)
>>> >
>>> > www.onehippo.com
>>> >
>>> >
>>> > On 5 July 2011 22:24, <mp...@apache.org> wrote:
>>> >
>>> >> Author: mpierce
>>> >> Date: Tue Jul  5 20:24:40 2011
>>> >> New Revision: 1143194
>>> >>
>>> >> URL: http://svn.apache.org/viewvc?rev=1143194&view=rev
>>> >> Log:
>>> >> (RAVE-89) Adding form validation to basic account creation form.
>>> >>
>>> >> Modified:
>>> >>    incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>>> >>
>>> >> Modified:
>>> incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>>> >> URL:
>>> >>
>>> 
>>>http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/w
>>>ebapp/newaccount.jsp?rev=1143194&r1=1143193&r2=1143194&view=diff
>>> >>
>>> >>
>>> 
>>>========================================================================
>>>======
>>> >> --- incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>>> >> (original)
>>> >> +++ incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>>>Tue
>>> Jul
>>> >>  5 20:24:40 2011
>>> >> @@ -21,21 +21,34 @@
>>> >>  <%@ taglib prefix="spring" uri="http://www.springframework.org/tags
>>> "%>
>>> >>  <%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
>>> >>  <rave:rave_generic_page pageTitle="New Account Application - Rave">
>>> >> +  <script src="http://code.jquery.com/jquery-latest.js"></script>
>>> >> +  <script src="
>>> >> http://view.jquery.com/trunk/plugins/validate/jquery.validate.js
>>> >> "></script>
>>> >> +  <script>
>>> >> +        $(document).ready(function(){
>>> >> +           $("#newAccountForm").validate();
>>> >> +        });
>>> >> +  </script>
>>> >> +  <style>
>>> >> +        .error {
>>> >> +           font: normal 10px arial;
>>> >> +                color: #ff0000
>>> >> +        }
>>> >> +  </style>
>>> >>        <div id="content">
>>> >> -               <h1>Rave Account Application</h1>
>>> >> +               <h1>Rave Test Account Application</h1>
>>> >>                <form id="newAccountForm" name="newAccountForm"
>>> >> action="app/newaccount">
>>> >>                        <fieldset>
>>> >>                                <p>
>>> >>                                        <label
>>> >> for="userNameField">Username:</label> <input
>>> >> -                                               id="userNameField"
>>> >> type="text" name="userName" />
>>> >> +                                               id="userNameField"
>>> >> type="text" name="userName" class="required" minlength="4"/>
>>> >>                                </p>
>>> >>                                <p>
>>> >>                                        <label
>>> >> for="passwordField">Password:</label> <input
>>> >> -                                               id="passwordField"
>>> >> type="password" name="password" />
>>> >> +                                               id="passwordField"
>>> >> type="password" name="password" class="required" minlength="4"/>
>>> >>                                </p>
>>> >>                                <p>
>>> >>                                        <label
>>> >> for="passwordConfirmField">Confirm Password:</label> <input
>>> >> -
>>> id="passwordConfirmField"
>>> >> type="password" name="passwordConfirmed" />
>>> >> +
>>> id="passwordConfirmField"
>>> >> type="password" name="passwordConfirmed" class="required"
>>>minlength="4"
>>> >> equalTo="#passwordField"/>
>>> >>                                </p>
>>> >>                                <p>
>>> >>                                <input type="submit" value="Create
>>> Account"
>>> >> />
>>> >> @@ -45,4 +58,5 @@
>>> >>
>>> >>                </form>
>>> >>        </div>
>>> >> -</rave:rave_generic_page>
>>> >> \ No newline at end of file
>>> >> +
>>> >> +</rave:rave_generic_page>
>>> >>
>>> >>
>>> >>
>>> >
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>>
>>> iQEcBAEBAgAGBQJOE4X+AAoJEEfVXEODPFIDzIAH/1oleecp8PzAvpeO/lUBJ2Mq
>>> 3lPd2FhHIXXIK/sYo7jMFSZNUInxcTsF/aiRyVAVcXVJmNliHg+FGgxEH8LfIrgZ
>>> CWxU28oemo172YH/9ruBVOnnsZNnOK5AagnK1bD18I0iItoLBoeY1eDSAyRrOZrk
>>> T3056vq6yAhbUJw1YD52kNwyBCBcuqSYKNTr4ofq8f+UTDdvJJJ75qEuKOZpy3Og
>>> hlbCfs3+TruH18E2TuAmETNvUmt97thTIQiN0Jqc7Gx12RANoK9klK2jwo+lFnAA
>>> JodJE1dFOUlVOQuFfVK4SzVGlyIVChfeS7TKqmGPqBjZi1X2NJ8Nm+vEd8D2kGk=
>>> =3J/q
>>> -----END PGP SIGNATURE-----
>>>
>>
>>


Re: svn commit: r1143194 - /incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp

Posted by Jasha Joachimsthal <j....@onehippo.com>.
I've added the minified version of jQuery validation to the project.
According to [1] it is okay to include it because one of the licenses is
MIT.
Besides that I changed the jQuery url to the one we also use in the portal.
'latest' is tricky because after a new jQuery release the dependent scripts
may be broken. And I moved the validation from custom attributes to an
(external) script.

Jasha

[1] http://markmail.org/thread/ttlu4nse3ghbwkj5

On 6 July 2011 08:14, Jasha Joachimsthal <j....@onehippo.com>wrote:

> In that case, it's better to include it in Rave (if the license is
> compatible). If you request the portal over https but some of the resources
> is served over http, the browser will at least show a broken lock and IE8
> will even warn you about insecure resources with as default behaviour "do
> not use".
> I'll have a look at it.
>
> Jasha Joachimsthal
>
> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)
>
> www.onehippo.com
>
>
> On 5 July 2011 23:45, Marlon Pierce <mp...@cs.indiana.edu> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Unfortunately, not https for that JS library. Revert back to src="http://
>> .../"?
>>
>>
>> Marlon
>>
>>
>> On 7/5/11 4:52 PM, Jasha Joachimsthal wrote:
>> > Hi Marlon,
>> >
>> > Could you please move the scripts to the end of the HTML for faster
>> > rendering? Also call them in the same way as on the portal homepage
>> (//host
>> > instead of http://host, but do check if it's also available over
>> https).
>> > Otherwise users will get security popups when the portal is being hosted
>> > over https.
>> > Also could you move the inline CSS to the external CSS file? If you
>> don't
>> > have time today, I can do it tomorrow.
>> >
>> > Jasha Joachimsthal
>> >
>> > Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
>> > US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll
>> free)
>> >
>> > www.onehippo.com
>> >
>> >
>> > On 5 July 2011 22:24, <mp...@apache.org> wrote:
>> >
>> >> Author: mpierce
>> >> Date: Tue Jul  5 20:24:40 2011
>> >> New Revision: 1143194
>> >>
>> >> URL: http://svn.apache.org/viewvc?rev=1143194&view=rev
>> >> Log:
>> >> (RAVE-89) Adding form validation to basic account creation form.
>> >>
>> >> Modified:
>> >>    incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>> >>
>> >> Modified:
>> incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>> >> URL:
>> >>
>> http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp?rev=1143194&r1=1143193&r2=1143194&view=diff
>> >>
>> >>
>> ==============================================================================
>> >> --- incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>> >> (original)
>> >> +++ incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp Tue
>> Jul
>> >>  5 20:24:40 2011
>> >> @@ -21,21 +21,34 @@
>> >>  <%@ taglib prefix="spring" uri="http://www.springframework.org/tags
>> "%>
>> >>  <%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
>> >>  <rave:rave_generic_page pageTitle="New Account Application - Rave">
>> >> +  <script src="http://code.jquery.com/jquery-latest.js"></script>
>> >> +  <script src="
>> >> http://view.jquery.com/trunk/plugins/validate/jquery.validate.js
>> >> "></script>
>> >> +  <script>
>> >> +        $(document).ready(function(){
>> >> +           $("#newAccountForm").validate();
>> >> +        });
>> >> +  </script>
>> >> +  <style>
>> >> +        .error {
>> >> +           font: normal 10px arial;
>> >> +                color: #ff0000
>> >> +        }
>> >> +  </style>
>> >>        <div id="content">
>> >> -               <h1>Rave Account Application</h1>
>> >> +               <h1>Rave Test Account Application</h1>
>> >>                <form id="newAccountForm" name="newAccountForm"
>> >> action="app/newaccount">
>> >>                        <fieldset>
>> >>                                <p>
>> >>                                        <label
>> >> for="userNameField">Username:</label> <input
>> >> -                                               id="userNameField"
>> >> type="text" name="userName" />
>> >> +                                               id="userNameField"
>> >> type="text" name="userName" class="required" minlength="4"/>
>> >>                                </p>
>> >>                                <p>
>> >>                                        <label
>> >> for="passwordField">Password:</label> <input
>> >> -                                               id="passwordField"
>> >> type="password" name="password" />
>> >> +                                               id="passwordField"
>> >> type="password" name="password" class="required" minlength="4"/>
>> >>                                </p>
>> >>                                <p>
>> >>                                        <label
>> >> for="passwordConfirmField">Confirm Password:</label> <input
>> >> -
>> id="passwordConfirmField"
>> >> type="password" name="passwordConfirmed" />
>> >> +
>> id="passwordConfirmField"
>> >> type="password" name="passwordConfirmed" class="required" minlength="4"
>> >> equalTo="#passwordField"/>
>> >>                                </p>
>> >>                                <p>
>> >>                                <input type="submit" value="Create
>> Account"
>> >> />
>> >> @@ -45,4 +58,5 @@
>> >>
>> >>                </form>
>> >>        </div>
>> >> -</rave:rave_generic_page>
>> >> \ No newline at end of file
>> >> +
>> >> +</rave:rave_generic_page>
>> >>
>> >>
>> >>
>> >
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iQEcBAEBAgAGBQJOE4X+AAoJEEfVXEODPFIDzIAH/1oleecp8PzAvpeO/lUBJ2Mq
>> 3lPd2FhHIXXIK/sYo7jMFSZNUInxcTsF/aiRyVAVcXVJmNliHg+FGgxEH8LfIrgZ
>> CWxU28oemo172YH/9ruBVOnnsZNnOK5AagnK1bD18I0iItoLBoeY1eDSAyRrOZrk
>> T3056vq6yAhbUJw1YD52kNwyBCBcuqSYKNTr4ofq8f+UTDdvJJJ75qEuKOZpy3Og
>> hlbCfs3+TruH18E2TuAmETNvUmt97thTIQiN0Jqc7Gx12RANoK9klK2jwo+lFnAA
>> JodJE1dFOUlVOQuFfVK4SzVGlyIVChfeS7TKqmGPqBjZi1X2NJ8Nm+vEd8D2kGk=
>> =3J/q
>> -----END PGP SIGNATURE-----
>>
>
>

Re: svn commit: r1143194 - /incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp

Posted by Jasha Joachimsthal <j....@onehippo.com>.
In that case, it's better to include it in Rave (if the license is
compatible). If you request the portal over https but some of the resources
is served over http, the browser will at least show a broken lock and IE8
will even warn you about insecure resources with as default behaviour "do
not use".
I'll have a look at it.

Jasha Joachimsthal

Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)

www.onehippo.com


On 5 July 2011 23:45, Marlon Pierce <mp...@cs.indiana.edu> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Unfortunately, not https for that JS library. Revert back to src="http://
> .../"?
>
>
> Marlon
>
>
> On 7/5/11 4:52 PM, Jasha Joachimsthal wrote:
> > Hi Marlon,
> >
> > Could you please move the scripts to the end of the HTML for faster
> > rendering? Also call them in the same way as on the portal homepage
> (//host
> > instead of http://host, but do check if it's also available over https).
> > Otherwise users will get security popups when the portal is being hosted
> > over https.
> > Also could you move the inline CSS to the external CSS file? If you don't
> > have time today, I can do it tomorrow.
> >
> > Jasha Joachimsthal
> >
> > Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
> > US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll
> free)
> >
> > www.onehippo.com
> >
> >
> > On 5 July 2011 22:24, <mp...@apache.org> wrote:
> >
> >> Author: mpierce
> >> Date: Tue Jul  5 20:24:40 2011
> >> New Revision: 1143194
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1143194&view=rev
> >> Log:
> >> (RAVE-89) Adding form validation to basic account creation form.
> >>
> >> Modified:
> >>    incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
> >>
> >> Modified:
> incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
> >> URL:
> >>
> http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp?rev=1143194&r1=1143193&r2=1143194&view=diff
> >>
> >>
> ==============================================================================
> >> --- incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
> >> (original)
> >> +++ incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp Tue
> Jul
> >>  5 20:24:40 2011
> >> @@ -21,21 +21,34 @@
> >>  <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
> >>  <%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
> >>  <rave:rave_generic_page pageTitle="New Account Application - Rave">
> >> +  <script src="http://code.jquery.com/jquery-latest.js"></script>
> >> +  <script src="
> >> http://view.jquery.com/trunk/plugins/validate/jquery.validate.js
> >> "></script>
> >> +  <script>
> >> +        $(document).ready(function(){
> >> +           $("#newAccountForm").validate();
> >> +        });
> >> +  </script>
> >> +  <style>
> >> +        .error {
> >> +           font: normal 10px arial;
> >> +                color: #ff0000
> >> +        }
> >> +  </style>
> >>        <div id="content">
> >> -               <h1>Rave Account Application</h1>
> >> +               <h1>Rave Test Account Application</h1>
> >>                <form id="newAccountForm" name="newAccountForm"
> >> action="app/newaccount">
> >>                        <fieldset>
> >>                                <p>
> >>                                        <label
> >> for="userNameField">Username:</label> <input
> >> -                                               id="userNameField"
> >> type="text" name="userName" />
> >> +                                               id="userNameField"
> >> type="text" name="userName" class="required" minlength="4"/>
> >>                                </p>
> >>                                <p>
> >>                                        <label
> >> for="passwordField">Password:</label> <input
> >> -                                               id="passwordField"
> >> type="password" name="password" />
> >> +                                               id="passwordField"
> >> type="password" name="password" class="required" minlength="4"/>
> >>                                </p>
> >>                                <p>
> >>                                        <label
> >> for="passwordConfirmField">Confirm Password:</label> <input
> >> -
> id="passwordConfirmField"
> >> type="password" name="passwordConfirmed" />
> >> +
> id="passwordConfirmField"
> >> type="password" name="passwordConfirmed" class="required" minlength="4"
> >> equalTo="#passwordField"/>
> >>                                </p>
> >>                                <p>
> >>                                <input type="submit" value="Create
> Account"
> >> />
> >> @@ -45,4 +58,5 @@
> >>
> >>                </form>
> >>        </div>
> >> -</rave:rave_generic_page>
> >> \ No newline at end of file
> >> +
> >> +</rave:rave_generic_page>
> >>
> >>
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJOE4X+AAoJEEfVXEODPFIDzIAH/1oleecp8PzAvpeO/lUBJ2Mq
> 3lPd2FhHIXXIK/sYo7jMFSZNUInxcTsF/aiRyVAVcXVJmNliHg+FGgxEH8LfIrgZ
> CWxU28oemo172YH/9ruBVOnnsZNnOK5AagnK1bD18I0iItoLBoeY1eDSAyRrOZrk
> T3056vq6yAhbUJw1YD52kNwyBCBcuqSYKNTr4ofq8f+UTDdvJJJ75qEuKOZpy3Og
> hlbCfs3+TruH18E2TuAmETNvUmt97thTIQiN0Jqc7Gx12RANoK9klK2jwo+lFnAA
> JodJE1dFOUlVOQuFfVK4SzVGlyIVChfeS7TKqmGPqBjZi1X2NJ8Nm+vEd8D2kGk=
> =3J/q
> -----END PGP SIGNATURE-----
>

Re: svn commit: r1143194 - /incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp

Posted by Marlon Pierce <mp...@cs.indiana.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Unfortunately, not https for that JS library. Revert back to src="http://.../"?


Marlon


On 7/5/11 4:52 PM, Jasha Joachimsthal wrote:
> Hi Marlon,
> 
> Could you please move the scripts to the end of the HTML for faster
> rendering? Also call them in the same way as on the portal homepage (//host
> instead of http://host, but do check if it's also available over https).
> Otherwise users will get security popups when the portal is being hosted
> over https.
> Also could you move the inline CSS to the external CSS file? If you don't
> have time today, I can do it tomorrow.
> 
> Jasha Joachimsthal
> 
> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)
> 
> www.onehippo.com
> 
> 
> On 5 July 2011 22:24, <mp...@apache.org> wrote:
> 
>> Author: mpierce
>> Date: Tue Jul  5 20:24:40 2011
>> New Revision: 1143194
>>
>> URL: http://svn.apache.org/viewvc?rev=1143194&view=rev
>> Log:
>> (RAVE-89) Adding form validation to basic account creation form.
>>
>> Modified:
>>    incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>>
>> Modified: incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>> URL:
>> http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp?rev=1143194&r1=1143193&r2=1143194&view=diff
>>
>> ==============================================================================
>> --- incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>> (original)
>> +++ incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp Tue Jul
>>  5 20:24:40 2011
>> @@ -21,21 +21,34 @@
>>  <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
>>  <%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
>>  <rave:rave_generic_page pageTitle="New Account Application - Rave">
>> +  <script src="http://code.jquery.com/jquery-latest.js"></script>
>> +  <script src="
>> http://view.jquery.com/trunk/plugins/validate/jquery.validate.js
>> "></script>
>> +  <script>
>> +        $(document).ready(function(){
>> +           $("#newAccountForm").validate();
>> +        });
>> +  </script>
>> +  <style>
>> +        .error {
>> +           font: normal 10px arial;
>> +                color: #ff0000
>> +        }
>> +  </style>
>>        <div id="content">
>> -               <h1>Rave Account Application</h1>
>> +               <h1>Rave Test Account Application</h1>
>>                <form id="newAccountForm" name="newAccountForm"
>> action="app/newaccount">
>>                        <fieldset>
>>                                <p>
>>                                        <label
>> for="userNameField">Username:</label> <input
>> -                                               id="userNameField"
>> type="text" name="userName" />
>> +                                               id="userNameField"
>> type="text" name="userName" class="required" minlength="4"/>
>>                                </p>
>>                                <p>
>>                                        <label
>> for="passwordField">Password:</label> <input
>> -                                               id="passwordField"
>> type="password" name="password" />
>> +                                               id="passwordField"
>> type="password" name="password" class="required" minlength="4"/>
>>                                </p>
>>                                <p>
>>                                        <label
>> for="passwordConfirmField">Confirm Password:</label> <input
>> -                                               id="passwordConfirmField"
>> type="password" name="passwordConfirmed" />
>> +                                               id="passwordConfirmField"
>> type="password" name="passwordConfirmed" class="required" minlength="4"
>> equalTo="#passwordField"/>
>>                                </p>
>>                                <p>
>>                                <input type="submit" value="Create Account"
>> />
>> @@ -45,4 +58,5 @@
>>
>>                </form>
>>        </div>
>> -</rave:rave_generic_page>
>> \ No newline at end of file
>> +
>> +</rave:rave_generic_page>
>>
>>
>>
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOE4X+AAoJEEfVXEODPFIDzIAH/1oleecp8PzAvpeO/lUBJ2Mq
3lPd2FhHIXXIK/sYo7jMFSZNUInxcTsF/aiRyVAVcXVJmNliHg+FGgxEH8LfIrgZ
CWxU28oemo172YH/9ruBVOnnsZNnOK5AagnK1bD18I0iItoLBoeY1eDSAyRrOZrk
T3056vq6yAhbUJw1YD52kNwyBCBcuqSYKNTr4ofq8f+UTDdvJJJ75qEuKOZpy3Og
hlbCfs3+TruH18E2TuAmETNvUmt97thTIQiN0Jqc7Gx12RANoK9klK2jwo+lFnAA
JodJE1dFOUlVOQuFfVK4SzVGlyIVChfeS7TKqmGPqBjZi1X2NJ8Nm+vEd8D2kGk=
=3J/q
-----END PGP SIGNATURE-----

Re: svn commit: r1143194 - /incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp

Posted by Jasha Joachimsthal <j....@onehippo.com>.
Hi Marlon,

Could you please move the scripts to the end of the HTML for faster
rendering? Also call them in the same way as on the portal homepage (//host
instead of http://host, but do check if it's also available over https).
Otherwise users will get security popups when the portal is being hosted
over https.
Also could you move the inline CSS to the external CSS file? If you don't
have time today, I can do it tomorrow.

Jasha Joachimsthal

Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)

www.onehippo.com


On 5 July 2011 22:24, <mp...@apache.org> wrote:

> Author: mpierce
> Date: Tue Jul  5 20:24:40 2011
> New Revision: 1143194
>
> URL: http://svn.apache.org/viewvc?rev=1143194&view=rev
> Log:
> (RAVE-89) Adding form validation to basic account creation form.
>
> Modified:
>    incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
>
> Modified: incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
> URL:
> http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp?rev=1143194&r1=1143193&r2=1143194&view=diff
>
> ==============================================================================
> --- incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp
> (original)
> +++ incubator/rave/trunk/rave-portal/src/main/webapp/newaccount.jsp Tue Jul
>  5 20:24:40 2011
> @@ -21,21 +21,34 @@
>  <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
>  <%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
>  <rave:rave_generic_page pageTitle="New Account Application - Rave">
> +  <script src="http://code.jquery.com/jquery-latest.js"></script>
> +  <script src="
> http://view.jquery.com/trunk/plugins/validate/jquery.validate.js
> "></script>
> +  <script>
> +        $(document).ready(function(){
> +           $("#newAccountForm").validate();
> +        });
> +  </script>
> +  <style>
> +        .error {
> +           font: normal 10px arial;
> +                color: #ff0000
> +        }
> +  </style>
>        <div id="content">
> -               <h1>Rave Account Application</h1>
> +               <h1>Rave Test Account Application</h1>
>                <form id="newAccountForm" name="newAccountForm"
> action="app/newaccount">
>                        <fieldset>
>                                <p>
>                                        <label
> for="userNameField">Username:</label> <input
> -                                               id="userNameField"
> type="text" name="userName" />
> +                                               id="userNameField"
> type="text" name="userName" class="required" minlength="4"/>
>                                </p>
>                                <p>
>                                        <label
> for="passwordField">Password:</label> <input
> -                                               id="passwordField"
> type="password" name="password" />
> +                                               id="passwordField"
> type="password" name="password" class="required" minlength="4"/>
>                                </p>
>                                <p>
>                                        <label
> for="passwordConfirmField">Confirm Password:</label> <input
> -                                               id="passwordConfirmField"
> type="password" name="passwordConfirmed" />
> +                                               id="passwordConfirmField"
> type="password" name="passwordConfirmed" class="required" minlength="4"
> equalTo="#passwordField"/>
>                                </p>
>                                <p>
>                                <input type="submit" value="Create Account"
> />
> @@ -45,4 +58,5 @@
>
>                </form>
>        </div>
> -</rave:rave_generic_page>
> \ No newline at end of file
> +
> +</rave:rave_generic_page>
>
>
>