kreta/KretaWeb/Areas/Orarend/Views/AdminTanariOrarend/NemKotottMunkaido_Bevitel.cshtml
2024-03-13 00:33:46 +01:00

64 lines
3.1 KiB
Text

@using Kreta.Web.Helpers
@using Kreta.Web.Areas.Orarend.Models
@model NemKotottMunkaidoModel
@using (Html.KretaForm("NemKotottMunkaidoForm"))
{
@Html.HiddenFor(x => x.Id)
@Html.HiddenFor(x => x.GroupId)
@Html.HiddenFor(x => x.TulajId)
@Html.HiddenFor(x => x.ModositasiIdoszakTipus)
@Html.HiddenFor(x => x.JSHelperNev)
@Html.HiddenFor(x => x.isMegtartott)
if (Model.Id.HasValue && Model.Id.Value > 0)
{
@Html.HiddenFor(x => x.HetirendId)
}
@Html.KretaValidationSummary()
<div class="container-fluid details">
<div class="row">
@Html.KretaComboBoxFor(x => x.TanarId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetTanar" })).Enable(!Model.Id.HasValue || Model.Id.Value == 0 ? true : false).AutoBind(true).RenderWithName(2, 4)
</div>
<div class="row">
@Html.KretaDatePickerFor(x => x.Datum, new Dictionary<string, object>() { { "readonly", "readonly" } }).RenderWithName(2, 2)
@Html.KretaTimePickerFor(x => x.Kezdet, Model.isReadonly ? new Dictionary<string, object>() { { "readonly", "readonly" } } : null).RenderWithName(2, 2)
@Html.KretaTimePickerFor(x => x.Veg, Model.isReadonly ? new Dictionary<string, object>() { { "readonly", "readonly" } } : null).RenderWithName(2, 2)
</div>
@if (!Model.Id.HasValue || Model.Id.Value == 0)
{
<div class="row">
@Html.KretaComboBoxFor(x => x.HetirendId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "AdminTanariOrarendApi", action = "GetHetirendList" }), "Text", "Value", htmlAttributes: Model.isReadonly ? new Dictionary<string, object>() { { "readonly", "readonly" } } : null).AutoBind(true).RenderWithName(2, 10)
</div>
}
<div class="row">
@Html.KretaComboBoxFor(x => x.TorvenyKategoria, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetTorvenyKategoriaList" }), "Text", "Value", htmlAttributes: Model.isReadonly ? new Dictionary<string, object>() { { "readonly", "readonly" } } : null).AutoBind(true).RenderWithName(2, 10)
</div>
<div class="row">
@Html.KretaTextAreaFor(m => m.Megjegyzes, 6, Model.isReadonly ? new Dictionary<string, object>() { { "readonly", "readonly" } } : null).RenderWithName(2, 10)
</div>
</div>
}
@if (!Model.Id.HasValue || Model.Id.Value == 0)
{
<script type="text/javascript">
$(document).ready(function () {
var searchTanarValue = $("#searchForm #Tanar").val();
if (typeof searchTanarValue !== "undefined" && searchTanarValue != "") {
var tanarComboBox = $("#TanarId").data("kendoComboBox");
tanarComboBox.value(searchTanarValue);
tanarComboBox.enable(false);
$("#TanarId").removeAttr("disabled");
}
});
</script>
}
else
{
<script type="text/javascript">
$(document).ready(function () {
$("#TanarId").removeAttr("disabled");
});
</script>
}