Commit bafa58d8 by Nilu

S28813350 # Client - Incoming Issues (raised by Client) #Location to be mandatory

parent a1cb6437
...@@ -62,6 +62,9 @@ public class SendVerificationMailFP extends SaveFP ...@@ -62,6 +62,9 @@ public class SendVerificationMailFP extends SaveFP
BusinessObjectParser.assertFieldCondition(jobApplication.getCV() != null , jobApplication, JobApplication.FIELD_CV, "uploadCV", exceptions, true, request); BusinessObjectParser.assertFieldCondition(jobApplication.getCV() != null , jobApplication, JobApplication.FIELD_CV, "uploadCV", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(jobApplication.getCoverLetter() != null , jobApplication, JobApplication.FIELD_CoverLetter, "uploadCover", exceptions, true, request); BusinessObjectParser.assertFieldCondition(jobApplication.getCoverLetter() != null , jobApplication, JobApplication.FIELD_CoverLetter, "uploadCover", exceptions, true, request);
} }
BusinessObjectParser.assertFieldCondition(candidate.getGoogleAddressText() != null, candidate, Candidate.FIELD_GoogleAddressText, "mandatory", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getHasValidAddress()), candidate, Candidate.FIELD_GoogleAddressText, "invalid", exceptions, true, request);
} }
super.validate(process, submission, exceptions, params); super.validate(process, submission, exceptions, params);
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<TRANSIENT name="PrivacyPolicyAgreed" type="Boolean" defaultValue="Boolean.FALSE"/> <TRANSIENT name="PrivacyPolicyAgreed" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="ConditionsAgreed" type="Boolean" defaultValue="Boolean.FALSE"/> <TRANSIENT name="ConditionsAgreed" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="HasValidAddress" type="Boolean" defaultValue="Boolean.FALSE"/>
<TABLE name="oneit_sec_user_extension" tablePrefix="object" polymorphic="TRUE"> <TABLE name="oneit_sec_user_extension" tablePrefix="object" polymorphic="TRUE">
......
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
response.sendRedirect(candidate.isFalse(candidate.getIsAccountVerified()) ? successPage : nextPage +"&JobApplicationID="+ jobApplication.getID().toString()); response.sendRedirect(candidate.isFalse(candidate.getIsAccountVerified()) ? successPage : nextPage +"&JobApplicationID="+ jobApplication.getID().toString());
} }
candidate.setHasValidAddress(candidate.getGoogleAddressText() != null);
process.setAttribute("JobApplication", jobApplication); process.setAttribute("JobApplication", jobApplication);
%> %>
<oneit:script> <oneit:script>
...@@ -243,8 +245,11 @@ ...@@ -243,8 +245,11 @@
<hr class="seperate-line"> <hr class="seperate-line">
<div class="form-group text-left"> <div class="form-group text-left">
<label>Location</label> <label>Location</label>
<div class="googleAddress">
<oneit:ormInput obj="<%= candidate %>" class="has-valid-address" attributeName="HasValidAddress" type="checkbox"/>
<oneit:ormInput obj="<%= candidate %>" type="text" attributeName="GoogleAddressText" class="autoAddress" id="<%= "gAddress_"+candidate.getObjectID() %>" placeholder="Enter your address" cssClass="form-control" /> <oneit:ormInput obj="<%= candidate %>" type="text" attributeName="GoogleAddressText" class="autoAddress" id="<%= "gAddress_"+candidate.getObjectID() %>" placeholder="Enter your address" cssClass="form-control" />
</div> </div>
</div>
<div class="form-group text-left" style="margin-top: 30px;"> <div class="form-group text-left" style="margin-top: 30px;">
<div class="styled_checkboxes"> <div class="styled_checkboxes">
<div class="checkbox checkbox-primary"> <div class="checkbox checkbox-primary">
......
...@@ -30,6 +30,12 @@ function addGoogleAddressListener(domSelector) ...@@ -30,6 +30,12 @@ function addGoogleAddressListener(domSelector)
parentDiv.find("." + component).val(''); parentDiv.find("." + component).val('');
} }
} }
if($(this).val() && trim($(this).val()))
{
var parentDiv = $(domSelector).closest('.googleAddress');
parentDiv.find(".has-valid-address").prop("checked",false);
}
}) })
$(domSelector).keypress(function(e) { $(domSelector).keypress(function(e) {
...@@ -43,6 +49,9 @@ function addGoogleAddressListener(domSelector) ...@@ -43,6 +49,9 @@ function addGoogleAddressListener(domSelector)
place = autocomplete.getPlace(); place = autocomplete.getPlace();
googleAutoComplete[domSelector] = place; googleAutoComplete[domSelector] = place;
placeChanged(domSelector); placeChanged(domSelector);
var parentDiv = $(domSelector).closest('.googleAddress');
parentDiv.find(".has-valid-address").prop("checked",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