modules/raptor_glue/js/formHelper.js
/**
 * Call this whenever a checkbox that is part of a set of checkboxes gets clicked.
 */
Call this whenever a checkbox that is part of a set of checkboxes gets clicked.
Call this whenever a checkbox that is part of a set of checkboxes gets clicked .
function syncCheckboxesAndComboboxes(sectionname, triggeringControl)
{
    var id_map = getProtocolControlIDMap();
    var sNoneID = id_map[sectionname]['checkbox']['id_none'];
    var sEntericID = id_map[sectionname]['checkbox']['id_enteric'];
    var sIVID = id_map[sectionname]['checkbox']['id_iv'];
    if(triggeringControl.id == sNoneID)
    {
        if(triggeringControl.checked)
        {
            var ackid = id_map[sectionname]['acknowledge']['checkbox'];
            var didit = setBlanksInCheckboxTypeSection(sectionname, ackid);
            if(didit)
            {
                clearCheckboxById(sEntericID);
                clearCheckboxById(sIVID);
                var sRootName = sectionname + '_enteric_';
                resetComboInputByName(sRootName,true);
                var sRootName = sectionname + '_iv_';
                resetComboInputByName(sRootName,true);
            }
        }
    } else {
        if(triggeringControl.checked)
        {
            clearCheckboxById(sNoneID);
        }
    }
    setEnabledDisabledInCheckboxTypeSection(sectionname);
}
function syncCheckboxesAndComboboxes ( sectionname , triggeringControl ) { var id_map = getProtocolControlIDMap ( ) ; var sNoneID = id_map [ sectionname ] [ 'checkbox' ] [ 'id_none' ] ; var sEntericID = id_map [ sectionname ] [ 'checkbox' ] [ 'id_enteric' ] ; var sIVID = id_map [ sectionname ] [ 'checkbox' ] [ 'id_iv' ] ; if ( triggeringControl . id == sNoneID ) { if ( triggeringControl . checked ) { var ackid = id_map [ sectionname ] [ 'acknowledge' ] [ 'checkbox' ] ; var didit = setBlanksInCheckboxTypeSection ( sectionname , ackid ) ; if ( didit ) { clearCheckboxById ( sEntericID ) ; clearCheckboxById ( sIVID ) ; var sRootName = sectionname + '_enteric_' ; resetComboInputByName ( sRootName , true ) ; var sRootName = sectionname + '_iv_' ; resetComboInputByName ( sRootName , true ) ; } } } else { if ( triggeringControl . checked ) { clearCheckboxById ( sNoneID ) ; } } setEnabledDisabledInCheckboxTypeSection ( sectionname ) ; }
Call this whenever a checkbox that is part of a set of checkboxes gets clicked.
Call this whenever a checkbox that is part of a set of checkboxes gets clicked .
//If they clicked None, then clear the other boxes NOW otherwise gets reverted later. //Clear the other checkboxes now. //Clear the NONE checkbox now. //Now make sure the right things are enabled, disabled.