60 lines
2.3 KiB
Plaintext
60 lines
2.3 KiB
Plaintext
@model EnVisage.Models.ContactModel
|
||
|
||
@{
|
||
ViewBag.Title = !string.IsNullOrEmpty(Model.LastName) ? "Edit " + Model.FirstName + " " + Model.LastName : "Add New Contact";
|
||
}
|
||
|
||
<div class="modal-content">
|
||
|
||
@using (Html.BeginForm((!string.IsNullOrEmpty(Model.LastName) ? "EditContact" : "AddContact"), "Clients", FormMethod.Post, new { @class = "form-horizontal innerForm" }))
|
||
{
|
||
@Html.AntiForgeryToken()
|
||
@Html.HiddenFor(t=>t.Id)
|
||
@Html.HiddenFor(t=>t.ParentId)
|
||
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
<h4 class="modal-title">@ViewBag.Title</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div id="erorMsgPlaceholder"></div>
|
||
<div class="form-group">
|
||
@Html.LabelFor(model => model.FirstName, new { @class = "control-label col-md-2" })
|
||
<div class="col-md-10">
|
||
@Html.TextBoxFor(model => model.FirstName, new { @class = "form-control" })
|
||
@Html.ValidationMessageFor(model => model.FirstName)
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
@Html.LabelFor(model => model.LastName, new { @class = "control-label col-md-2" })
|
||
<div class="col-md-10">
|
||
@Html.TextBoxFor(model => model.LastName, new { @class = "form-control" })
|
||
@Html.ValidationMessageFor(model => model.LastName)
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
@Html.LabelFor(model => model.Email, new { @class = "control-label col-md-2" })
|
||
<div class="col-md-10">
|
||
@Html.TextBoxFor(model => model.Email, new { @class = "form-control" })
|
||
@Html.ValidationMessageFor(model => model.Email)
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
@Html.LabelFor(model => model.Phone, new { @class = "control-label col-md-2" })
|
||
<div class="col-md-10">
|
||
@Html.TextBoxFor(model => model.Phone, new { @class = "form-control" })
|
||
@Html.ValidationMessageFor(model => model.Phone)
|
||
</div>
|
||
</div>
|
||
|
||
@Html.ValidationSummary(false, "The contact could not be saved due to the following errors:")
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||
<button type="submit" class="btn btn-success" id="btnaddcontact"><i class="fa fa-save"></i> Save</button>
|
||
</div>
|
||
|
||
}
|
||
</div>
|
||
|