Ignore:
Timestamp:
Mar 21, 2011, 9:37:42 AM (12 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #299: Add field for PAD when no specimen tubes exists for a case

Added code that replaces '+' with '-'.

File:
1 edited

Legend:

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

    r1317 r1318  
    193193    }
    194194  }
    195   else  if (laterality == '')
     195  else if (laterality == '')
    196196  {
    197197    laterality = null;
     
    217217    }
    218218  }
     219}
     220
     221function padOnChange()
     222{
     223  var frm = document.forms['reggie'];
     224  var PAD = frm.pad.value;
     225  if (PAD == '')
     226  {
     227    setInputStatus('pad', 'Missing', 'warning');
     228    return;
     229  }
     230  frm.pad.value = PAD.replace(/\+/, '-');
     231  setInputStatus('pad', '', 'valid');
     232
    219233}
    220234
     
    423437  Main.hide('gonext');
    424438  Main.show('gocreate');
     439 
     440  if (!hasPAD && lateralityIsValid) frm.pad.focus();
    425441}
    426442
     
    793809        <td class="prompt">PAD</td>
    794810        <td class="input"><input type="text" name="pad"
    795           value="" size="35" maxlength="255"
    796           onkeypress="focusOnEnter(event, 'reasonIfNoSpecimen')"></td>
    797         <td class="status"></td>
    798         <td class="help"></td>
     811          value="" size="18" maxlength="12"
     812          onkeypress="focusOnEnter(event, 'reasonIfNoSpecimen')"
     813          onblur="padOnChange()"></td>
     814        <td class="status" id="pad.status"></td>
     815        <td class="help"><span id="pad.message" class="message" style="display: none;"></span>PAD should be entered when no specimen tubes have been registered</td>
    799816      </tr>
    800817      <tr id="reasonIfNoSpecimenSection" valign="top">
Note: See TracChangeset for help on using the changeset viewer.