Commit 630174f5 by chenith

Update: HT012 - Invite button enabled for valid email addr.

parent b7132697
...@@ -5,6 +5,7 @@ import oneit.objstore.ObjectStatus; ...@@ -5,6 +5,7 @@ import oneit.objstore.ObjectStatus;
import oneit.objstore.ValidationContext; import oneit.objstore.ValidationContext;
import oneit.security.SecUser; import oneit.security.SecUser;
import oneit.utils.CollectionUtils; import oneit.utils.CollectionUtils;
import oneit.utils.StringUtils;
import oneit.utils.parsers.FieldException; import oneit.utils.parsers.FieldException;
...@@ -59,4 +60,11 @@ public class Company extends BaseCompany ...@@ -59,4 +60,11 @@ public class Company extends BaseCompany
super.validate(context); super.validate(context);
} }
public Boolean isEmailCorrect()
{
return StringUtils.isEmailAddress(getUserEmail());
}
} }
\ No newline at end of file
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
<label><oneit:label GUIName="Role" /></label> <label><oneit:label GUIName="Role" /></label>
<oneit:ormEnum obj="<%= company %>" attributeName="RoleType" cssClass="form-control"/> <oneit:ormEnum obj="<%= company %>" attributeName="RoleType" cssClass="form-control"/>
</div> </div>
<oneit:recalcClass htmlTag="div" classScript="company.getUserEmail()== null? 'invite-btn disabled': 'invite-btn enabled'" company="<%= company %>"> <oneit:recalcClass htmlTag="div" classScript="company.isEmailCorrect() ? 'invite-btn enabled': 'invite-btn disabled'" company="<%= company %>">
<oneit:button value="Invite" name="sendUserInvites" cssClass="btn btn-invite" <oneit:button value="Invite" name="sendUserInvites" cssClass="btn btn-invite"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
.mapEntry ("restartProcess", Boolean.TRUE) .mapEntry ("restartProcess", Boolean.TRUE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment