To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / public / javascripts / ssamr_institutions.js @ 443:350acce374a2

History | View | Annotate | Download (1 KB)

1

    
2

    
3
/* SSAMR specific functions */
4

    
5
/* institution related functions */
6
Event.observe(window, 'load',
7
  function() {
8
        $('ssamr_user_details_institution_type_true').observe('click', function(e, el) {
9
            $('ssamr_user_details_other_institution').disable();
10
                $('ssamr_user_details_institution_id').enable();
11
        });
12

    
13
        $('ssamr_user_details_institution_type_false').observe('click', function(e, el) {
14
            $('ssamr_user_details_other_institution').enable();
15
                $('ssamr_user_details_institution_id').disable();
16
        });
17
        
18
    if($('ssamr_user_details_institution_type_true').checked)
19
        $('ssamr_user_details_other_institution').disable();
20
    else if($('ssamr_user_details_institution_type_false').checked)
21
        $('ssamr_user_details_institution_id').disable();
22
        else {
23
                $('ssamr_user_details_other_institution').disable();
24
                  $('ssamr_user_details_institution_id').enable();
25
                  $('ssamr_user_details_institution_type_true').checked = true;
26
                  $('ssamr_user_details_institution_type_false').checked = false;
27
        }
28
}
29
);
30

    
31

    
32