forked from science-ation/science-ation
- beginning of setting uneditable fields for downloaded awards.
This commit is contained in:
parent
9e348d9b0c
commit
7a474046a5
@ -272,6 +272,13 @@ function update_awardinfo()
|
||||
return;
|
||||
}
|
||||
|
||||
/* Enable all fields */
|
||||
$("#awardinfo_name").removeAttr('disabled');
|
||||
$("#awardinfo_sponsors_id").removeAttr('disabled');
|
||||
$("#awardinfo_description").removeAttr('disabled');
|
||||
$("#awardinfo_criteria").removeAttr('disabled');
|
||||
$("#awardinfo_award_types_id").removeAttr('disabled');
|
||||
|
||||
$.getJSON("<?=$_SERVER['PHP_SELF']?>?action=awardinfo_load&id="+award_id,
|
||||
function(json){
|
||||
$("#awardinfo_id").val(json.id);
|
||||
@ -287,6 +294,15 @@ function update_awardinfo()
|
||||
$("#awardinfo_selfnominate").val([json.self_nominate]);
|
||||
$("#awardinfo_schedulejudges").val([json.schedule_judges]);
|
||||
|
||||
/* Disable fields we dont' want the user to edit */
|
||||
if(json.award_source_fairs_id != null) {
|
||||
$("#awardinfo_name").attr('disabled', 'disabled');
|
||||
$("#awardinfo_sponsors_id").attr('disabled', 'disabled');
|
||||
$("#awardinfo_description").attr('disabled', 'disabled');
|
||||
$("#awardinfo_criteria").attr('disabled', 'disabled');
|
||||
$("#awardinfo_award_types_id").attr('disabled', 'disabled');
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user