123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- @using System.Linq;
- @using WeApp.Views.Shared.Modals
- @model ModalBodyViewModel
- @{
- //string type = "text";
- foreach (var i in Model.Inputs)
- {
- if (i.IsHidden)
- {
- <input id="@i.Id" name="@i.Id" type="hidden" />
- continue;
- }
- string oBefore = "", oAfter = "", iBefore = "", iAfter = "";
- var special = Model.Specials?.FirstOrDefault(a => a.Id == i.Id);
- string help = i.Help.IsEmpty() ? "" : "<span class=\"help-block\">" + i.Help + "</span>";
- if (!string.IsNullOrEmpty(i.DivOutBefore))
- {
- oBefore = i.DivOutBefore;
- }
- if (!string.IsNullOrEmpty(i.DivOutAfter))
- {
- oAfter = i.DivOutAfter;
- }
- if (!string.IsNullOrEmpty(i.DivInterBefore))
- {
- iBefore = i.DivInterBefore;
- }
- if (!string.IsNullOrEmpty(i.DivInterAfter))
- {
- iAfter = i.DivInterAfter;
- }
- @Html.Raw(oBefore)
- <div class="@i.DivClass" @i.DivOther>
- @Html.Raw(i.Label)
- @if (special != null)
- {
- @Html.Raw(special.InputStr)
- continue;
- }
- <div class="@(i.InputLayoutClass)">
- @Html.Raw(iBefore)
- @Html.Partial("Modals/_InputView", i)
- @Html.Raw(help)
- @Html.Raw(iAfter)
- </div>
- </div>
- @Html.Raw(oAfter)
- }
- }
|