<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <% Dictionary Fields = ViewData["Fields"] as Dictionary; if (Fields == null) { Fields = new Dictionary(); } string ctx = ViewData["EditorContext"] as string; if (String.IsNullOrEmpty(ctx)) { ctx = String.Empty; } string sectionHeader = ViewData["SectionHeader"] as string; if (Model.Person.Type == null || Model.Person.Type == FacilityContactType.Undefined) { Model.Person.Type = (FacilityContactType)ViewData["ContactType"]; } %>

> <%= sectionHeader %>

> <%: Html.TextBoxFor(x => x.Person.Name, new { @class = "text-input long-input", @maxlength = "255" })%> <%: Html.ValidationMessageFor(x => x.Person.Name)%>

<%:Html.HiddenFor(x => x.Person.Id)%> <%:Html.HiddenFor(x => x.Person.FacilityId) %> <%:Html.HiddenFor(x => x.Person.Type)%> <%:Html.HiddenFor(x => x.Person.Index)%>
> <%--
<%: Html.DropDownList( ctx, new SelectList(Lists.SleisUserContactTypes) as IEnumerable, new { @class = "text-input small-input contact-type" }) %> <%: Html.TextBox(ctx, "", new { @class = "text-input half-input", @maxlength = "255" })%>
--%> <% for (int i = 0; i < Model.Contacts.Count; i++) { %>
"> <%: Html.DropDownListFor( x => x.Contacts[i].Type, new SelectList(Lists.SleisUserContactTypes, Model.Contacts[i].Type) as IEnumerable, new { @class = "text-input small-input contact-type" }) %> <%: Html.TextBoxFor(x => x.Contacts[i].Value, new { @class = "text-input half-input ", @maxlength = "255" })%>
<%: Html.ValidationMessageFor(x => x.Contacts[i].Type, null, new { @class = "contact-type-error" })%> <%: Html.ValidationMessageFor(x => x.Contacts[i].Value)%>
<%:Html.HiddenFor(x => x.Contacts[i].Id)%> <%:Html.HiddenFor(x => x.Contacts[i].Index, new { @value = i})%> <%:Html.HiddenFor(x => x.Contacts[i].UserId, new { @value = Model.Person.Id })%>
<% } %>