Ignore:
Timestamp:
Apr 16, 2012, 12:36:09 PM (11 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #378: Consent registration wizard should display consent date if it is already registered

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/consentform.jsp

    r1538 r1601  
    132132  var specimenInfo = response.specimenInfo;
    133133 
    134 
    135   if (caseInfo && caseInfo.consentDate)
    136   {
    137     frm.consentDate.value = caseInfo.consentDate;
    138   }
    139   frm.consentDate.focus();
    140  
    141134  if (patientInfo)
    142135  {
     
    158151          numEnabled++;
    159152        }
     153        if (c.name == caseName && c.consentDate)
     154        {
     155          frm.consentDate.value = c.consentDate;
     156        }
    160157        html += '<input type="checkbox" name="case.'+c.id+'" id="case.'+c.id+'" checked ' + disabled +'>';
    161158        html += '<label for="case.'+c.id+'">Case: ' + c.name + laterality + '</label><br>';
     
    176173        {
    177174          numEnabled++;
     175        }
     176        if (c.name.indexOf(caseName) == 0 && c.consentDate)
     177        {
     178          frm.consentDate.value = c.consentDate;
    178179        }
    179180        html += '<input type="checkbox" name="blood.'+ c.id + '" id="blood.'+c.id+'" checked ' + disabled +'>';
     
    209210    setInputStatus('consent', '"' + caseInfo.consent + '" has already been registered for this case. It is not possible to change with this wizard.', '');
    210211    Main.show('gorestart');
     212    if (caseInfo.consentDate)
     213    {
     214      frm.consentDate.value = caseInfo.consentDate;
     215    }
    211216    frm.consentDate.disabled = true;
    212217  }
     
    232237  }
    233238
     239  if (!frm.consentDate.disabled) frm.consentDate.focus();
    234240}
    235241
Note: See TracChangeset for help on using the changeset viewer.