Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 4701

Show
Ignore:
Timestamp:
06/26/08 09:38:04 (5 months ago)
Author:
catullus
Message:

double_entry_reconcile: warn if user is logged out.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/doubleentryreconciliation/web/module/reconcileForm.jsp

    r4665 r4701  
    2424 
    2525<script type="text/javascript"> 
     26        function errh(msg) { 
     27                alert(msg); 
     28        } 
     29        DWREngine.setErrorHandler(errh); 
     30 
    2631        function chooseObs(rowToHide, goodEncId, goodObsId, badEncId, badObsId) { 
    2732                hideDiv(rowToHide); 
  • openmrs-modules/doubleentryreconciliation/web/src/org/openmrs/module/doubleentryreconciliation/web/DWRDoubleEntryReconciliation.java

    r4665 r4701  
    2323        public DWRDoubleEntryReconciliation() { } 
    2424         
     25        private void checkLoggedOut(){ 
     26                if(!Context.isAuthenticated()) 
     27                        throw new IllegalArgumentException("You're logged out.  Action did not go through."); 
     28        } 
     29         
    2530        public boolean voidObsGroup(Integer obsGroupId) { 
    26             if (obsGroupId == null) 
     31                checkLoggedOut(); 
     32                if (obsGroupId == null) 
    2733                throw new NullPointerException("obsGroupId cannot be null"); 
    2834            if (NEW_OBS_GROUPS) { 
     
    4349         
    4450        public boolean copyObsGroupToEncounter(Integer obsGroupId, Integer encounterId) { 
    45             if (obsGroupId == null) 
     51                checkLoggedOut(); 
     52                if (obsGroupId == null) 
    4653                throw new NullPointerException("obsGroupId cannot be null"); 
    4754            if (encounterId == null) 
     
    131138         
    132139        public boolean chooseCorrectObs(Integer goodEncId, Integer goodObsId, Integer badEncId, Integer badObsId) { 
     140                checkLoggedOut(); 
    133141                if (goodEncId == null) 
    134142                        throw new NullPointerException("goodEncId cannot be null");