From: <sp...@us...> - 2009-12-02 05:03:39
|
Revision: 5546 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=5546&view=rev Author: sppigot Date: 2009-12-02 05:03:31 +0000 (Wed, 02 Dec 2009) Log Message: ----------- Added a message to the registration form to hint when to pick the editor or registered user role Change validation test for filenames that will be altered on upload r822, r824 from IMOS/eMii - thanks Penny Lyle Modified Paths: -------------- sandbox/BlueNetMEST/web/geonetwork/geonetwork.css sandbox/BlueNetMEST/web/geonetwork/loc/en/xml/strings.xml sandbox/BlueNetMEST/web/geonetwork/scripts/editor/metadata-editor.js sandbox/BlueNetMEST/web/geonetwork/xsl/user-selfregistration.xsl Modified: sandbox/BlueNetMEST/web/geonetwork/geonetwork.css =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/geonetwork.css 2009-12-02 04:57:52 UTC (rev 5545) +++ sandbox/BlueNetMEST/web/geonetwork/geonetwork.css 2009-12-02 05:03:31 UTC (rev 5546) @@ -267,6 +267,11 @@ background: #ff0000 } +p.hint { + font-family: Verdana; + font-size: 7pt; + color:red; +} /******************************************************************************* footer *******************************************************************************/ Modified: sandbox/BlueNetMEST/web/geonetwork/loc/en/xml/strings.xml =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/loc/en/xml/strings.xml 2009-12-02 04:57:52 UTC (rev 5545) +++ sandbox/BlueNetMEST/web/geonetwork/loc/en/xml/strings.xml 2009-12-02 05:03:31 UTC (rev 5546) @@ -23,6 +23,7 @@ <checkusername>Check</checkusername> <register>Register to access or submit data</register> <registerChoose>I want to </registerChoose> + <registerRoleMsg>Select Editor if interested in submitting data, otherwise choose Registered User.</registerRoleMsg> <registrationDetails>Key registration details entered: </registrationDetails> <firstNameMandatory js="true">The First Name field is mandatory</firstNameMandatory> <lastNameMandatory js="true">The Last Name field is mandatory</lastNameMandatory> Modified: sandbox/BlueNetMEST/web/geonetwork/scripts/editor/metadata-editor.js =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/scripts/editor/metadata-editor.js 2009-12-02 04:57:52 UTC (rev 5545) +++ sandbox/BlueNetMEST/web/geonetwork/scripts/editor/metadata-editor.js 2009-12-02 05:03:31 UTC (rev 5546) @@ -568,9 +568,17 @@ // called by file input field in file-upload-list form function doFileUploadValidation(filenameinput) { + var filenamearray = new Array(1); var filename = filenameinput.value; - var validationtest = /[\ \~\`\!\@\#\$\%\^\&\(\)\+\=\(\)\{\}\[\]]/g; - if (validationtest.test(filename)) + + // filenameonly removes the path from the file input field so that + // Internet Explorer and Firefox treat the validation test equally. + var filenameonly = /[^\\]*[a-zA-Z0-9\.\,\-\_]+$/g; + filenamearray = filename.match(filenameonly); + + var validationtest = /[^a-zA-Z0-9\.\,\-\_]/g; + + if (validationtest.test(filenamearray)) { $('uploadwarningmsg').style.display = 'block'; } Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/user-selfregistration.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/user-selfregistration.xsl 2009-12-02 04:57:52 UTC (rev 5545) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/user-selfregistration.xsl 2009-12-02 05:03:31 UTC (rev 5546) @@ -97,6 +97,7 @@ </option> </xsl:for-each> </select> + <p class="hint"><xsl:value-of select="root/gui/strings/registerRoleMsg"/></p> </td> </tr> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |