To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / public / javascripts / ssamr_institutions.js @ 1257:5bafe0f91f6e
History | View | Annotate | Download (1.13 KB)
| 1 |
|
|---|---|
| 2 |
|
| 3 |
/* SSAMR specific functions */
|
| 4 |
|
| 5 |
/* institution related functions */
|
| 6 |
$(document).ready(function(){ |
| 7 |
$('#ssamr_user_details_institution_type_true').click(function() { |
| 8 |
$('#ssamr_user_details_other_institution').attr('disabled', 'disabled'); |
| 9 |
$('#ssamr_user_details_institution_id').removeAttr('disabled'); |
| 10 |
}); |
| 11 |
|
| 12 |
$('#ssamr_user_details_institution_type_false').click(function() { |
| 13 |
$('#ssamr_user_details_other_institution').removeAttr('disabled'); |
| 14 |
$('#ssamr_user_details_institution_id').attr('disabled', 'disabled'); |
| 15 |
}); |
| 16 |
|
| 17 |
if($('#ssamr_user_details_institution_type_true').checked) |
| 18 |
$('#ssamr_user_details_other_institution').attr('disabled', 'disabled'); |
| 19 |
else if($('ssamr_user_details_institution_type_false').checked) |
| 20 |
$('#ssamr_user_details_institution_id').attr('disabled', 'disabled'); |
| 21 |
else {
|
| 22 |
$('#ssamr_user_details_other_institution').attr('disabled', 'disabled'); |
| 23 |
$('#ssamr_user_details_institution_id').removeAttr('disabled'); |
| 24 |
$('#ssamr_user_details_institution_type_true').checked = true; |
| 25 |
$('#ssamr_user_details_institution_type_false').checked = false; |
| 26 |
} |
| 27 |
} |
| 28 |
); |
| 29 |
|
| 30 |
|
| 31 |
|