Ignore:
Timestamp:
Mar 3, 2011, 10:47:17 AM (11 years ago)
Author:
Nicklas Nordborg
Message:

References #291: Personal information registration

Added a 'Cancel' button that aborts the current registration.

File:
1 edited

Legend:

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

    r1305 r1306  
    252252  }
    253253 
     254  Main.show('gocancel');
     255 
    254256  // Get biosource information from the AJAX response
    255257  patientInfo = response.patientInfo;
     
    394396 
    395397  Main.hide('gocreate');
     398  Main.hide('gocancel');
    396399  var frm = document.forms['reggie'];
    397400
     
    465468  Main.show('errorMessage');
    466469  Main.hide('gonext');
     470  Main.hide('gocancel');
    467471  Main.show('gorestart');
    468472}
    469473
    470 function goRestart()
    471 {
     474function goRestart(force)
     475{
     476  if (!force && !confirm('Cancel this registration?')) return;
    472477  location.href = location.href;
    473478}
     
    751756
    752757  <table style="margin-left: 20px; margin-top: 10px;">
    753     <tr><td><base:button id="gonext" title="Next" image="gonext.gif" onclick="goNext()"/></td></tr>
    754     <tr><td><base:button id="gocreate" title="Create" image="gonext.gif" onclick="goCreate()" style="display: none;"/></td></tr>
    755     <tr><td><base:button id="gorestart" title="Restart" image="goback.gif" onclick="goRestart()" style="display: none;"/></td></tr>
     758  <tr>
     759    <td><base:button id="gocancel" title="Cancel" onclick="goRestart(false)" style="display: none;"/></td>
     760    <td><base:button id="gonext" title="Next" image="gonext.gif" onclick="goNext()"/></td>
     761    <td><base:button id="gocreate" title="Create" image="gonext.gif" onclick="goCreate()" style="display: none;"/></td>
     762    <td><base:button id="gorestart" title="Restart" image="goback.gif" onclick="goRestart(true)" style="display: none;"/></td>
     763  </tr>
    756764  </table>
    757765  </form>
Note: See TracChangeset for help on using the changeset viewer.