Created
May 19, 2015 13:52
-
-
Save JRondeau16/a8ee6f36841474d1ed2e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using System.Web.Mvc.Html | |
@model MyProject.Integration.Wfm.TermsAgreementField | |
@if (!Model.Visible) | |
{ | |
return; | |
} | |
<div class="@Model.CssClass checkbox-border"> | |
<div class="@Model.CssClass field-panel"> | |
<span class="checkbox-content"> | |
@Html.HiddenFor(x => Model.FieldId) | |
@{ | |
var isChecked = (bool)Model.Value; | |
} | |
@if (Model.IsRequired) | |
{ | |
@Html.CheckBox("Value", isChecked, new {required="required"}) | |
} | |
else | |
{ | |
@Html.CheckBox("Value", isChecked) | |
} | |
@if (!String.IsNullOrEmpty(Model.TermsLabel)) | |
{ | |
<span class="@Model.CssClass field-info">@Html.DisplayFor(x => Model.TermsLabel)</span> | |
} | |
</span> | |
</div> | |
@if (!String.IsNullOrEmpty(Model.Information)) | |
{ | |
<span class="@Model.CssClass checkbox-info">@Html.DisplayFor(x => Model.Information)</span> | |
} | |
<div> | |
@Html.ValidationMessageFor(field => field.Value, null, new { @class = Model.CssClass + " field-error" }) | |
</div> | |
@if (Model.IsRequired) | |
{ | |
<span class="@Model.CssClass field-required">*</span> | |
} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment