Changeset 2070


Ignore:
Timestamp:
Oct 15, 2013, 1:03:03 PM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #481: Register prepared flow cells

Duplicate the entered 'Flow cell ID' values on the third step to avoid registration mistakes. Check that the same 'Flow cell ID' is not entered into both fields.

File:
1 edited

Legend:

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

    r2068 r2070  
    130130      var fc = frm.flowcells[i].flowCell;
    131131      //Main.debug(fc.name + ':'+ fc.id + ':' + flowCellIsValid['fc.'+fc.id+'.id'] + ':' + flowCellIsValid['fc.'+fc.id+'.readString']);
    132       if (flowCellIdIsValid['fc-'+index+'.id'] != true) return false;
     132      if (flowCellIdIsValid['fc-'+index+'.externalId'] != true) return false;
    133133      if (commentsIsValid['fc-'+index+'.comments'] != true) return false;
    134134      index++;
     
    232232      frm[prefix+'.comments'].value = fc.comments;
    233233      commentsOnChange(prefix+'.comments');
    234       frm[prefix+'.id'].value = fc.externalId;
    235       flowCellIdOnBlur(prefix+'.id');
     234      frm[prefix+'.externalId'].value = fc.externalId;
     235      flowCellIdOnBlur(prefix+'.externalId');
    236236      index++;
    237237    }
     
    256256  frm.clusterOperator.disabled = true;
    257257  frm.clusterProtocol.disabled = true;
    258   frm['fc-0.id'].disabled = true;
     258  frm['fc-0.externalId'].disabled = true;
    259259  frm['fc-0.comments'].disabled = true;
    260   frm['fc-1.id'].disabled = true;
     260  frm['fc-1.externalId'].disabled = true;
    261261  frm['fc-1.comments'].disabled = true;
    262262
     
    309309      var prefix = 'fc-'+index;
    310310      setInnerHTML(prefix+'.name.s', fc.name);
     311      setInnerHTML(prefix+'.externalId', '<b>ID:</b> ' + frm[prefix+'.externalId'].value);
    311312      frm[prefix+'.readString'].value = fc.ReadString;
    312313      readStringOnBlur(prefix+'.readString');
     
    454455    setInputStatus(idField, 'ID is a required value', 'invalid');
    455456    return;
     457  }
     458 
     459  if (idField == 'fc-1.externalId')
     460  {
     461    if (id == frm['fc-0.externalId'].value)
     462    {
     463      setInputStatus(idField, 'ID must be different', 'invalid');
     464      return;
     465    }
     466  }
     467  else
     468  {
     469    flowCellIdOnBlur('fc-1.externalId');
    456470  }
    457471 
     
    534548      var fc = frm.flowcells[i].flowCell;
    535549      frm['fc-'+index+'.readString'].disabled = true;
    536       fc.externalId = frm['fc-'+index+'.id'].value;
     550      fc.externalId = frm['fc-'+index+'.externalId'].value;
    537551      fc.comments = frm['fc-'+index+'.comments'].value;
    538552      if (!failed)
     
    615629#step\.3\.section.hide-fc-1  .fc-1
    616630{
    617   visibility: hidden;
     631  display: none;
    618632}
    619633
     
    652666
    653667  <form name="reggie" onsubmit="return false;">
    654     <input type="hidden" name="pdf.id" value="">
    655668 
    656669  <div id="step.1.section">
     
    735748        <td class="prompt">Protocol</td>
    736749        <td class="input"><select style="width:90%" name="clusterProtocol" id="clusterProtocol"
    737           onkeypress="focusOnEnter(event, 'fc-0.id')"></select></td>
     750          onkeypress="focusOnEnter(event, 'fc-0.externalId')"></select></td>
    738751        <td class="status" id="clusterProtocol.status"></td>
    739752        <td class="help"><span id="clusterProtocol.message" class="message" style="display: none;"></span>
     
    750763      <tr valign="top">
    751764        <td class="subprompt">ID</td>
    752         <td><input type="text" class="required" name="fc-0.id" onblur="flowCellIdOnBlur(this.name)" onkeypress="focusOnEnter(event, 'fc-0.comments')"></td>
    753         <td class="status" id="fc-0.id.status"></td>
    754         <td class="help"><span id="fc-0.id.message" class="message"></span></td>
     765        <td><input type="text" class="required" name="fc-0.externalId" onblur="flowCellIdOnBlur(this.name)" onkeypress="focusOnEnter(event, 'fc-0.comments')"></td>
     766        <td class="status" id="fc-0.externalId.status"></td>
     767        <td class="help"><span id="fc-0.externalId.message" class="message"></span></td>
    755768      </tr>
    756769      <tr valign="top">
     
    772785      <tr valign="top">
    773786        <td class="subprompt">ID</td>
    774         <td><input type="text" class="required" name="fc-1.id" onblur="flowCellIdOnBlur(this.name)" onkeypress="focusOnEnter(event, 'fc-1.comments')"></td>
    775         <td class="status" id="fc-1.id.status"></td>
    776         <td class="help"><span id="fc-1.id.message" class="message"></span></td>
     787        <td><input type="text" class="required" name="fc-1.externalId" onblur="flowCellIdOnBlur(this.name)" onkeypress="focusOnEnter(event, 'fc-1.comments')"></td>
     788        <td class="status" id="fc-1.externalId.status"></td>
     789        <td class="help"><span id="fc-1.externalId.message" class="message"></span></td>
    777790      </tr>
    778791      <tr valign="top">
     
    864877        <td><input type="text" class="required" name="fc-0.readString" onblur="readStringOnBlur(this.name)"></td>
    865878        <td class="status" id="fc-0.readString.status"></td>
    866         <td class="help"><span id="fc-0.readString.message" class="message"></span></td>
     879        <td class="help"><span id="fc-0.readString.message" class="message"></span><span id="fc-0.externalId"></span></td>
    867880      </tr>
    868881      <tr valign="top" class="fc-1">
     
    875888        <td><input type="text" class="required" name="fc-1.readString" onblur="readStringOnBlur(this.name)"></td>
    876889        <td class="status" id="fc-1.readString.status"></td>
    877         <td class="help"><span id="fc-1.readString.message" class="message"></span></td>
     890        <td class="help"><span id="fc-1.readString.message" class="message"></span><span id="fc-1.externalId"></span></td>
    878891      </tr>
    879892
Note: See TracChangeset for help on using the changeset viewer.