kreta/KretaWeb/Areas/Tantargy/Views/Shared/TantargyFelosztasModositasModal.cshtml
2024-03-13 00:33:46 +01:00

79 lines
3.8 KiB
Text

@using Kreta.Enums.ManualEnums
@using Kreta.Resources
@using Kreta.Web.Areas.Tantargy.Models;
@model TantargyFelosztasModositasaModel
<div class="container-fluid details">
@{
using (Html.KretaForm("tantargyFelosztasModositasForm"))
{
@Html.KretaValidationSummary()
<div class="row">
@Html.KretaComboBoxFor(x => x.TanarId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetTanar", IsFromSzervezet = Model.IsFromSzervezet, tanarId = Model.TanarId })).AutoBind(true).RenderWithName(3, 3)
</div>
<div class="row @(Model.IsFromSzervezet ? "disabledItem" : string.Empty)">
@Html.KretaComboBoxFor(x => x.TantargyId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetTantargy" })).AutoBind(true).RenderWithName(3, 3)
</div>
<div class="row">
@Html.KretaComboBoxFor(x => x.CsoportID, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetOsztalyCsoportListByEvfolyam", isDualisKepzohelyiCsoport = Model.IsFromSzervezet, tanarId = Model.TanarId, szervezetAdatokHalmaza = (int)SzervezetAdatokHalmazaEnum.SzervezetEsAlSzervezetek }), useGroup: true).AutoBind(true).RenderWithName(3, 3)
</div>
if (!Model.IsFromSzervezet)
{
<div class="row">
@Html.KretaNumericFor(x => x.Oraszam).Min(0).Max(50).Value(Model.Oraszam).Step(0.25).RenderWithName(3, 3)
@Html.KretaNumericFor(x => x.TuloraSzam).Min(0).Max(50).Value(Model.TuloraSzam).Step(0.25).RenderWithName(3, 3)
</div>
<div class="row">
@Html.KretaCheckBoxFor(x => x.OsszevontOra).RenderWithName(3, 3)
@Html.KretaCheckBoxFor(x => x.NemzetisegiOra).RenderWithName(3, 3)
</div>
<div class="row">
@Html.KretaNumericFor(x => x.MegbizasiOraszam).Min(0).Max(50).Value(Model.MegbizasiOraszam).Step(0.25).RenderWithName(3, 3)
</div>
}
else
{
@Html.Hidden("Oraszam", Model.Oraszam.ToString("F2", System.Globalization.CultureInfo.GetCultureInfo("hu-HU")))
}
<div class="row">
@Html.KretaCheckBoxFor(x => x.VisszamenolegesModositas).RenderWithName(3, 3)
<div style="padding: 30px; color: #a94442;" id="VisszamenolegesTartalom">
<p><em>@TantargyResource.VisszamenolegesModositasDescription</em></p>
<p>
<strong>@TantargyResource.DiakokSzama: @Html.Raw(Model.DiakokSzama)</strong>
<br />
<strong>@TantargyResource.TanorakSzama: @Html.Raw(Model.TanorakSzama)</strong>
<br />
<strong>@TantargyResource.ErtekelesekSzama: @Html.Raw(Model.ErtekelesekSzama)</strong>
</p>
</div>
</div>
<div class="row">
@Html.KretaCheckBoxFor(x => x.KapcsolodoOrarendiOrakModositasa).RenderWithName(3, 3)
</div>
@Html.HiddenFor(x => x.Id)
@Html.HiddenFor(x => x.TipusId)
@Html.HiddenFor(x => x.TanorakSzama)
@Html.HiddenFor(x => x.ErtekelesekSzama)
@Html.HiddenFor(x => x.MulasztasokSzama)
}
}
</div>
<script type="text/javascript">
function VisszamenolegesChange() {
if ($("#VisszamenolegesModositas").is(':checked')) {
$("#VisszamenolegesTartalom").show();
}
else {
$("#VisszamenolegesTartalom").hide();
}
}
$(document).ready(VisszamenolegesChange);
$("#VisszamenolegesModositas").change(VisszamenolegesChange);
</script>