- Well, disabling the fields was a good idea, exept that serialize() skips over

the value but not the name, so it sets every disabled field to "" when
  passing the data to mysql.
This commit is contained in:
dave 2009-09-20 19:25:42 +00:00
parent 4308ee7b71
commit e07d24102c
2 changed files with 7 additions and 5 deletions

View File

@ -67,8 +67,9 @@
criteria='".mysql_escape_string(stripslashes($_POST['criteria']))."',
description='".mysql_escape_string(stripslashes($_POST['description']))."'
WHERE id='$id'";
happy_("Award information saved");
mysql_query($q);
// echo $q;
happy_("Award information saved");
exit;
case 'eligibilty_load':
@ -259,6 +260,7 @@ function update_awardinfo()
award_tab_update['awardinfo'] = award_id;
// alert(award_id);
if(award_id == -1) {
// $("#awardinfo input:text").val('');
/* New award, set defaults and clear everythign else */
$("#awardinfo_id").val(-1);
$("#awardinfo_name").val("");
@ -299,9 +301,9 @@ function update_awardinfo()
/* Disable fields we don't want the user to edit
* for downloaded awards */
if(json.award_source_fairs_id != null) {
$("#awardinfo_name").attr('disabled', 'disabled');
$("#awardinfo_sponsors_id").attr('disabled', 'disabled');
$("#awardinfo_criteria").attr('disabled', 'disabled');
// $("#awardinfo_name").attr('disabled', 'disabled');
// $("#awardinfo_sponsors_id").attr('disabled', 'disabled');
// $("#awardinfo_criteria").attr('disabled', 'disabled');
}
/* Update the dialog title */

View File

@ -604,7 +604,7 @@ if(substr($config['version'], -1) % 2 != 0)
echo "<a target=\"blank\" href=\"http://www.sfiab.ca\">SFIAB Version ".$config['version']."{$extra}</a>";
?>
</div>
<div id="debug" style="display:<?=($_SESSION['debug']=='true')?'block':'none'?>"></div>
<div id="debug" style="display:<?=($_SESSION['debug']=='true')?'block':'none'?>">Debug...</div>
</body>
</html>