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
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(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);
......
......@@ -13,6 +13,7 @@
<TRANSIENT name="PrivacyPolicyAgreed" 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">
......
......@@ -54,7 +54,9 @@
{
response.sendRedirect(candidate.isFalse(candidate.getIsAccountVerified()) ? successPage : nextPage +"&JobApplicationID="+ jobApplication.getID().toString());
}
candidate.setHasValidAddress(candidate.getGoogleAddressText() != null);
process.setAttribute("JobApplication", jobApplication);
%>
<oneit:script>
......@@ -243,7 +245,10 @@
<hr class="seperate-line">
<div class="form-group text-left">
<label>Location</label>
<oneit:ormInput obj="<%= candidate %>" type="text" attributeName="GoogleAddressText" class="autoAddress" id="<%= "gAddress_"+candidate.getObjectID() %>" placeholder="Enter your address" cssClass="form-control" />
<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" />
</div>
</div>
<div class="form-group text-left" style="margin-top: 30px;">
<div class="styled_checkboxes">
......
......@@ -30,6 +30,12 @@ function addGoogleAddressListener(domSelector)
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) {
......@@ -43,6 +49,9 @@ function addGoogleAddressListener(domSelector)
place = autocomplete.getPlace();
googleAutoComplete[domSelector] = place;
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