kreta/KretaWeb/Areas/Adminisztracio/Views/Adatszotar/Adatszotar_Bevitel.cshtml
2024-03-13 00:33:46 +01:00

106 lines
No EOL
5.2 KiB
Text

@using Kreta.Web.Areas.Adminisztracio.Models
@using Kreta.Enums.ManualEnums
@using Kreta.Enums
@using Kreta.BusinessLogic.Classes
@using Kreta.Web.Security
@model AdatszotarGridModel
@{
var adatszotarTipus = Model.AdatszotarTipusList.First(x => x.Value == Model.AdatszotarTipusId.ToString());
}
<div class="container-fluid details">
@using (Html.KretaForm("AdatszotarForm"))
{
@Html.KretaValidationSummary()
@Html.HiddenFor(x => x.AdatszotarID)
@Html.HiddenFor(x => x.AdatszotarTipusId)
@Html.HiddenFor(x => x.IsProtected)
@Html.HiddenFor(x => x.Suly)
<div class="row">
<div class="col-xs-6 col-sm-6">
@Html.LabelFor(x => x.AdatszotarTipusNev)
</div>
<div class="col-xs-6 col-sm-6">
@Html.HiddenFor(x => x.AdatszotarTipusNev)
<label>@adatszotarTipus.Text</label>
</div>
</div>
<div class="row">
@Html.KretaTextBoxFor(x => x.Megnevezes).Enable(!Model.IsProtected).RenderWithName()
</div>
<div class="row">
@Html.KretaTextBoxFor(x => x.Megnevezes1).Enable(!Model.IsProtected).RenderWithName()
</div>
<div class="row">
@Html.KretaTextBoxFor(x => x.Megnevezes2).Enable(!Model.IsProtected).RenderWithName()
</div>
<div class="row">
@Html.KretaTextBoxFor(x => x.Megnevezes3).Enable(!Model.IsProtected).RenderWithName()
</div>
<div class="row">
@Html.KretaTextBoxFor(x => x.Megnevezes4).Enable(!Model.IsProtected).RenderWithName()
</div>
if (!Model.AdatszotarID.HasValue || !Model.IsLathato || Model.AdatszotarID.Value != (int)Kreta.Enums.HetiRendTipusEnum.MindegyikHet)
{
<div class="row">
@Html.KretaCheckBoxFor(x => x.IsLathato).RenderWithName()
</div>
}
<div class="row">
<div class="col-xs-6 col-sm-6">
@Html.LabelFor(x => x.Sorszam)
</div>
<div class="col-xs-6 col-sm-6">
@Html.HiddenFor(x => x.Sorszam)
<label>@Model.Sorszam.Value</label>
</div>
</div>
if (Model.AdatszotarTipusId == (int)Kreta.Enums.GeneratedAdatszotarTipusEnum.ErtekelesMod)
{
@Html.KretaColorPickerFor(x => x.Color).Messages(m => m.Apply(AdminisztracioResource.Ok).Cancel(AdminisztracioResource.Megsem)).RenderWithName()
@Html.KretaCheckBoxFor(x => x.IsBold).RenderWithName()
}
if (Model.AdatszotarTipusId == (int)Kreta.Enums.GeneratedAdatszotarTipusEnum.NapTipus)
{
bool IsOrarendi = Model.AdatszotarID.HasValue ? !Enum.IsDefined(typeof(NapTipusNemOrarendiEnum), Model.AdatszotarID) : true;
<div class="row">
@Html.KretaCheckBoxFor(x => x.IsSorszamozando).RenderWithName(3, 3, tooltipResource: AdminisztracioResource.IsSorszamozandoTooltip)
@Html.KretaCheckBoxFor(x => x.IsTanorai).RenderWithName(3, 3, customClass: IsOrarendi ? "" : "disabledItem", tooltipResource: AdminisztracioResource.IsTanoraiTooltip)
</div>
<div class="row">
@Html.KretaCheckBoxFor(x => x.IsTanorankivuli).RenderWithName(3, 3, customClass: IsOrarendi ? "" : "disabledItem", tooltipResource: AdminisztracioResource.IsTanorankivuliTooltip)
@Html.KretaCheckBoxFor(x => x.IsLeNemKotottMunkaido).RenderWithName(3, 3, tooltipResource: AdminisztracioResource.IsLeNemKotottMunkaidoTooltip)
</div>
}
if (Model.AdatszotarTipusId == (int)GeneratedAdatszotarTipusEnum.SorolasOkaTipus)
{
<div class="row">
@Html.KretaCheckBoxFor(x => x.IsNaplobanMegjelenik).Enable(!Model.IsProtected).RenderWithName(3, 3)
@Html.KretaCheckBoxFor(x => x.IsTorzslaponMegjelenik).Enable(!Model.IsProtected).RenderWithName(3, 3)
</div>
<div class="row">
@Html.KretaCheckBoxFor(x => x.IsBizonyitvanybanMegjelenik).Enable(!Model.IsProtected).RenderWithName(3, 3)
</div>
foreach (var zaradekSzoveg in Model.ZaradekSzovegList)
{
<div class="row">
<div class="col-sm-3">
@{
var zaradekSzovegLabel = OsztalyCsoportResource.ZaradekSzovege + (zaradekSzoveg.NyelvId == (int)AnyanyelvEnum.magyar ? " *" : " (" + zaradekSzoveg.NyelvId.GetDisplayName<AnyanyelvEnum>(ClaimData.SelectedTanevID.Value) + ")");
var zaradekSzovegTextAreaName = "ZaradekSzovegTextArea_" + zaradekSzoveg.NyelvId;
}
<label class="windowInputLabel" for="@zaradekSzovegTextAreaName">@zaradekSzovegLabel</label>
</div>
<div class="col-sm-9">
@Html.KretaTextArea(zaradekSzovegTextAreaName, new List<string> { zaradekSzoveg.Szoveg }, rows: 6, htmlAttributes: new Dictionary<string, object> { { "class", "k-textbox" }, { "data-nyelv-id", zaradekSzoveg.NyelvId.ToString() } })
</div>
</div>
}
}
}
</div>