Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 5033

Show
Ignore:
Timestamp:
07/24/08 22:13:41 (6 months ago)
Author:
bmckown
Message:

Fixed #938 - Restored add new person to personRelationships portlet.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/trunk/src/web/org/openmrs/web/dwr/RelationshipListItem.java

    r4095 r5033  
    4646                personAId = p.getPersonId(); 
    4747                try { 
    48                         Patient pat = Context.getPatientService().getPatient(p.getPersonId()); 
    49                         personAType = pat != null ? "Patient" : "User"; 
     48                        personAType = p.isPatient() ? "Patient" : "User"; 
    5049                } catch (Exception ex) { personAType = "User"; } 
    5150                 
     
    5453                personBId = p.getPersonId(); 
    5554                try { 
    56                         Patient pat = Context.getPatientService().getPatient(p.getPersonId()); 
    57                         personBType = pat != null ? "Patient" : "User"; 
     55                        personBType = p.isPatient() ? "Patient" : "User"; 
    5856                } catch (Exception ex) { personAType = "User"; } 
    5957        } 
  • openmrs/trunk/web/WEB-INF/tags/personField.tag

    r4864 r5033  
    5757 
    5858<div class="personSearchLabel">${searchLabel}</div> 
    59 <div dojoType="PersonSearch" widgetId="${formFieldName}_search" personId="${initialValue}" roles="${roles}"></div> 
     59<div dojoType="PersonSearch" widgetId="${formFieldName}_search" personId="${initialValue}" roles="${roles}" canAddNewPerson="${canAddNewPerson}"></div> 
    6060<c:if test="${not empty searchLabelCode}"> 
    61         <div dojoType="OpenmrsPopup" widgetId="${formFieldName}_selection" hiddenInputName="${formFieldName}" searchWidget="${formFieldName}_search" searchTitle="<spring:message code="${searchLabelCode}" arguments="${searchLabelArguments}" />" canAddNewPerson="${canAddNewPerson}"></div> 
     61        <div dojoType="OpenmrsPopup" widgetId="${formFieldName}_selection" hiddenInputName="${formFieldName}" searchWidget="${formFieldName}_search" searchTitle="<spring:message code="${searchLabelCode}" arguments="${searchLabelArguments}" />" ></div> 
    6262</c:if>  
    6363<c:if test="${empty searchLabelCode}"> 
    64         <div dojoType="OpenmrsPopup" widgetId="${formFieldName}_selection" hiddenInputName="${formFieldName}" searchWidget="${formFieldName}_search" searchTitle="${searchLabel}" canAddNewPerson="${canAddNewPerson}" ></div> 
     64        <div dojoType="OpenmrsPopup" widgetId="${formFieldName}_selection" hiddenInputName="${formFieldName}" searchWidget="${formFieldName}_search" searchTitle="${searchLabel}" ></div> 
    6565</c:if>