Remove the edit icon (you now click anywhere on the row) and fix disabling fields for non-downloaded awards (=0, not null)

This commit is contained in:
james 2010-01-14 18:55:23 +00:00
parent 3c364b84c6
commit e6b24ff0ab

View File

@ -313,7 +313,7 @@ function update_awardinfo()
/* Disable fields we don't want the user to edit
* for downloaded awards */
if(json.award_source_fairs_id != null) {
if(json.award_source_fairs_id>0) {
$("#awardinfo_name").attr('disabled', 'disabled');
$("#awardinfo_sponsors_id").attr('disabled', 'disabled');
$("#awardinfo_criteria").attr('disabled', 'disabled');
@ -585,8 +585,7 @@ $(document).ready(function() {
<?
$sq=mysql_query("SELECT id,organization FROM sponsors ORDER BY organization");
echo "<select id=\"awardinfo_sponsors_id\" name=\"sponsors_id\">";
//only show the "choose a sponsor" option if we are adding,if we are editing, then they must have already chosen one.
echo $firstsponsor;
echo "<option value=\"\">".i18n("Choose a sponsor")."</option>\n";
while($sr=mysql_fetch_object($sq)) {
echo "<option value=\"$sr->id\">".i18n($sr->organization)."</option>";
}
@ -1024,8 +1023,8 @@ if(mysql_num_rows($q))
echo " <td $eh align=\"center\">{$numr['num']}</td>";
echo " <td align=\"center\">";
echo "<img border=\"0\" src=\"{$config['SFIABDIRECTORY']}/images/16/edit.{$config['icon_extension']}\">";
echo "&nbsp;";
// echo "<img border=\"0\" src=\"{$config['SFIABDIRECTORY']}/images/16/edit.{$config['icon_extension']}\">";
// echo "&nbsp;";
echo "<a onclick=\"award_delete({$r->id});\" href=\"#\" ><img border=0 src=\"{$config['SFIABDIRECTORY']}/images/16/button_cancel.{$config['icon_extension']}\"></a>";
echo " </td>\n";