Revision: 1458
http://mrbs.svn.sourceforge.net/mrbs/?rev=1458&view=rev
Author: cimorrison
Date: 2010-09-20 09:07:04 +0000 (Mon, 20 Sep 2010)
Log Message:
-----------
Fixed a bug which caused in some browsers (eg IE) the error message "You have
not entered a Brief Description" when using select boxes.
Modified Paths:
--------------
mrbs/trunk/web/edit_entry.php
Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php 2010-09-17 15:28:10 UTC (rev 1457)
+++ mrbs/trunk/web/edit_entry.php 2010-09-20 09:07:04 UTC (rev 1458)
@@ -406,11 +406,20 @@
// do a little form verifying
function validate(form)
{
- // null strings and spaces only strings not allowed
- if(/(^$)|(^\s+$)/.test(form.name.value))
+ <?php
+ // First of all check that a name (brief description) has been entered.
+ // Only do this if the name is being entered via an INPUT box. If it's
+ // being entered via a SELECT box there's no need to do this because there's
+ // bound to be a value and the test below will fail on some browsers (eg IE)
+ ?>
+ if (form.name.tagName.toLowerCase() == 'input')
{
- alert ( "<?php echo get_vocab("you_have_not_entered") . '\n' .
get_vocab("brief_description") ?>");
- return false;
+ // null strings and spaces only strings not allowed
+ if(/(^$)|(^\s+$)/.test(form.name.value))
+ {
+ alert ( "<?php echo get_vocab("you_have_not_entered") . '\n' .
get_vocab("brief_description") ?>");
+ return false;
+ }
}
<?php if( ! $enable_periods ) { ?>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits