<% var optionsPhones = [ {label:"mobile1",val:"Mobile"},{label:"mobile2",val:"Mobile 2"},{label:"mobile3",val:"Mobile 3"},{label:"mobile4",val:"Mobile 4"},{label:"mobile5",val:"Mobile 5"}, {label:"business1",val:"Work"},{label:"business2",val:"Work 2"},{label:"business3",val:"Work 3"},{label:"business4",val:"Work 4"},{label:"business5",val:"Work 5"}, {label:"home1",val:"Home"},{label:"home2",val:"Home 2"},{label:"home3",val:"Home 3"},{label:"home4",val:"Home 4"},{label:"home5",val:"Home 5"}, {label:"businessfax1",val:"Business fax 1"},{label:"businessfax2",val:"Business fax 2"},{label:"businessfax3",val:"Business fax 3"},{label:"businessfax4",val:"Business fax 4"},{label:"businessfax5",val:"Business fax 5"}, {label:"pager1",val:"Pager 1"},{label:"pager2",val:"Pager 2"},{label:"pager3",val:"Pager 3"},{label:"pager4",val:"Pager 4"},{label:"pager5",val:"Pager 5"}, {label:"other1",val:"Other 1"},{label:"other2",val:"Other 2"},{label:"other3",val:"Other 3"},{label:"other4",val:"Other 4"},{label:"other5",val:"Other 5"} ]; var optionsEmail = [ {val: "personal",label:"Personal"}, {val: "business",label:"Business"}, {val: "other",label:"Other"} ]; var optionsAddress = [ {val: "home1",label:"Home 1"}, {val: "home2",label:"Home 2"}, {val: "business1",label:"Business 1"}, {val: "business2",label:"Business 2"}, {val: "business3",label:"Business 3"}, {val: "personal1",label:"Personal 1"}, {val: "personal2",label:"Personal 2"}, {val: "personal3",label:"Personal 3"}, {val: "other",label:"Other"} ]; var optionsIm = [ {val: "google",label:"Google"}, {val: "yahoo",label:"Yahoo"}, {val: "msn",label:"MSN"}, {val: "icq",label:"ICQ"}, {val: "skype",label:"Skype"}, {val: "jabber",label:"Jabber"}, {val: "other",label:"Other"} ]; var optionsSite = [ {val:"business1", label:"Business 1"}, {val:"business2", label:"Business 2"}, {val:"business3", label:"Business 3"}, {val:"personal", label:"Personal"}, {val:"other", label:"Other"} ]; %> <% function renderPhoneHtml(obj, ind, len, isAddNew, IS_PREFERRED_ENABLE, APPEND_DROPDOWN){ if(obj == "") { obj = new Object(); } var selection = obj.type+''+obj.index, preffered = obj.preference; var typeExistOrNot = _.findWhere(optionsPhones, {label : selection}); if(typeExistOrNot || APPEND_DROPDOWN){ %>
Error will go here
<% if(ind > 0 || isAddNew){ %>
<% } %> <% if (IS_PREFERRED_ENABLE) { %>
>
<%}%>
<% } } %> <% function renderSiteHtml(obj, ind, len, isAddNew){ if(obj == "") { obj = new Object(); } var siteUrl = obj.url, type = obj.type+''+obj.index, type1 = obj.type;; %>
<% if(ind > 0 || isAddNew){ %>
<% } %>
<% } %> <% function renderIMHtml(obj, ind, len, isAddNew){ if(obj == "") { obj = new Object(); } var imName = obj.address, type = obj.type; %>
<% if(ind > 0 || isAddNew){ %>
<% } %>
>
<% } %> <% function rederEmailHtml(obj, ind, len, isAddNew){ if(obj == "") { obj = new Object(); } var emailType = obj.type, emailAddress = (obj.address) ? obj.address : ""; %>
" name="email" type="text" size="100" maxlength="100" placeholder="email@example.com" data-validate="email" class="form-control emailTxt validate-field"> Error will go here
<% if(ind > 0 || isAddNew){ %>
<% } %>
>
<% } %> <% function renderAddressHtml(obj, ind, len, isAddNew){ if(obj == "") { obj = new Object(); } var addressType = obj.type +''+obj.index, addressType1 = obj.type; %>
" name="street" type="text" size="30" maxlength="30" placeholder="Street Address" class = "form-control streettxt">
" name="city" type="text" size="30" maxlength="30" placeholder="City" class = "form-control citytxt">
" name="state" type="text" size="30" maxlength="30" placeholder="State" class = "form-control statetxt">
" name="zipcode" type="text" data-validate="zipcode" size="10" maxlength="10" placeholder="Zip Code" class = "form-control ziptxt validate-field"> Error will go here
<% if(ind > 0 || isAddNew){ %>
<% } %>
<% } %>
<%= _.escape(model.get("displayName"))%>
" type="text" size="30" maxlength="255" placeholder="First Name" id="firstNameTxt" nextElemSelector="#lastNameTxt" class = "form-control">
" type="text" size="30" maxlength="255" placeholder="Last Name" id="lastNameTxt" nextElemSelector="#companyTxt" class = "form-control">
" type="text" size="30" maxlength="508" placeholder="Company" id="companyTxt" class = "form-control">
" type="text" size="30" maxlength="508" placeholder="Job Title" id="jobTitleTxt" class = "form-control">
<% var phones = model.get("phones"), phoArr = phones?phones.slice(0):[]; %> <% if(phoArr.length){ var phoLength = phoArr.length; for(var i=0;i <% renderPhoneHtml(obj, i, phoLength, false, IS_PREFERRED_ENABLE) %> <% } }else{ %> <% renderPhoneHtml("", "", "", false, IS_PREFERRED_ENABLE) %> <% } var hide = phoArr.length >= model.get("contentLimits").phoneHtmlContent ? "hide" : ""; %>
<% var addresses = model.get("addresses"); addresses = (addresses) ? addresses : []; if(addresses.length){ var addressLength = addresses.length; for(var i =0;i <% renderAddressHtml(addressObj, i, addressLength, false); %> <% } %> <% } else { %> <% renderAddressHtml("","","", false); %> <% } %> <% var hide = addresses.length > model.get("contentLimits").addressHtmlContent ? "hide": ""; %>
<% var ims = model.get("ims"); ims = (ims) ? ims : []; if(ims.length){ var imLength = ims.length; for(var i = 0; i < imLength; i++){ var imObj = ims[i]; %> <% renderIMHtml(imObj, i, imLength, false) %> <% }%> <% }else {%> <% renderIMHtml("", "", "", false) %> <% } %> <% var hide = ims.length >= model.get("contentLimits").IMHtmlContent ? "hide" : ""; %>
<% var sites = model.get("webpages"), i = 0; sites = (sites) ? sites : []; if(sites.length){ var sitesLength = sites.length; for(i =0; i < sitesLength; i++){ var siteObj = sites[i]; %> <% renderSiteHtml(siteObj, i, sitesLength, false); %> <% } %> <% }else{%> <% renderSiteHtml("","","", false); %> <%}%> <% var hide = sites.length >= model.get("contentLimits").webHtmlContent ? "hide" : ""; %>

<% renderPhoneHtml("","","", true, IS_PREFERRED_ENABLE, true); %>
<% rederEmailHtml("","","", true); %>
<% renderAddressHtml("","","", true); %>
<% renderIMHtml("","","", true); %>
<% renderSiteHtml("","","", true); %>