10-24-2013 12:56 PM
populateCandidateEmailForm: function populateCandidateEmailForm(responseJSON,asset,emailID)
{
var displayValue = "";
var subjectField = "";
var textField = "";
var emailDialog = new Alfresco.module.SimpleDialog(this.id + "-candidate_email_dialog").setOptions({
width: "40em",
templateUrl: YAHOO.lang.substitute(Alfresco.constants.URL_SERVICECONTEXT + "components/form?itemKind={itemKind}&itemId={itemId}&showCancelButton=true&submitType=json&formId={formId}",
{
itemKind: "type",
itemId: "impublic:sendCandidateEmail",
formId: "sendCandidateEmail",
}),
actionUrl: Alfresco.constants.PROXY_URI + "com/sendcandidateemail?recepients="+emailID+"",
doBeforeDialogShow:
{
fn: function(formsRuntime, emailDialogObject){
this.form.submitElements[0].set('label','Send');
var dialogHeader = Dom.get(formsRuntime.formId + '-container_h');
dialogHeader.innerHTML = "Candidate Email Form";
var fields = document.getElementsByName('prop_impublic_candidateadditionalInfo');
var nodeRefs = [];
for(x in asset){
nodeRefs.push(asset[x].nodeRef);
}
var siteName = Alfresco.constants.SITE;
var additionalInfo = "{\"documents\":\"" + nodeRefs + "\"," +
"\"site\":\"" + siteName + "\"," +
"\"sender\":\"" + responseJSON.sender + "\"," +
"\"template\":\"" + responseJSON.template + "\"}";
fields[0].value = additionalInfo;
},
obj: null,
scope: null
},
doSetupFormsValidation:
{
fn: function(form){
form.addValidation("template_x002e_toolbar_x002e_tabsearch-email_dialog_prop_impublic_to", null, "Email is not valid!");
},
obj: null,
scope: null
},
onFailure:
{
fn: function(response){
if(response.json.status == 400){
Alfresco.util.PopupManager.displayPrompt(
{
text: response.json.message
});
}
},
obj: null,
scope: window
}
});
emailDialog.show();
},
11-12-2013 06:55 AM
02-02-2014 10:46 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.