kreta/KretaWeb/Areas/Tanulo/Views/KollegiumTanulo/_Gondviselo_Bevitel.cshtml
2024-03-13 00:33:46 +01:00

81 lines
3.8 KiB
Text

@using Kreta.Resources
@using Kreta.Web.Areas.Tanulo.Models
@using Kreta.Web.Security;
@model TanuloModGondviseloModel
<script>
function changeTelefon() {
var widget = $("#TanuloElerhetosegTelId").data('kendoComboBox');
if (widget.value() != '' && widget.selectedIndex != -1) { $(".GondviseloHiddenInputsDivTel").addClass('displayNone'); $(".emptyDiv").removeClass('displayNone'); }
else { $(".GondviseloHiddenInputsDivTel").removeClass('displayNone'); $(".emptyDiv").addClass('displayNone'); }
if (widget.selectedIndex == -1) { widget.value(''); }
}
function changeEmail() {
var widget = $("#TanuloElerhetosegEmailId").data('kendoComboBox');
if (widget.value() != '' && widget.selectedIndex != -1) { $(".GondviseloHiddenInputsDivEmail").addClass('displayNone'); }
else { $(".GondviseloHiddenInputsDivEmail").removeClass('displayNone'); }
if (widget.selectedIndex == -1) { widget.value(''); }
}
</script>
@{
var disabledItem = Model.IsSzirIntezmeny ? "disabledItem" : string.Empty;
}
@using (Html.KretaForm("GondviseloForm", new Dictionary<string, object> { { "autocomplete", "new-password" } }))
{
@Html.KretaValidationSummary()
<div class="container-fluid details">
<h4>@TanuloResource.Gondviseloje</h4>
<div class="row">
@Html.KretaTextBoxFor(x => x.GondviseloNeve).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloNeveTooltip)
@Html.KretaComboBoxFor(x => x.RokonsagiFok, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetRokonsagiFokList" }), "Text", "Value").AutoBind(true).RenderWithName(3, 3)
</div>
<div class="row">
@Html.KretaCheckBoxFor(x => x.IsTorvenyesKepviselo).RenderWithName(3, 3)
</div>
<h4 class="@disabledItem">@TanuloResource.BelepesiAdatok</h4>
<div class="row @disabledItem">
@Html.KretaTextBoxFor(x => x.GondviseloBejelentkezesiNev, new Dictionary<string, object> { { "autocomplete", "new-password" } }).Enable(ClaimData.IsActivTanev).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloFelhasznaloNeveTooltip)
@Html.KretaPasswordFor(x => x.GondviseloJelszo, new Dictionary<string, object> { { "autocomplete", "new-password" } }).Enable(ClaimData.IsActivTanev).RenderWithName(3, 3)
</div>
<div class="row @disabledItem">
@if (!Model.Id.HasValue)
{
@Html.KretaCheckBoxFor(x => x.GondviseloAutoEmail).Enable(ClaimData.IsActivTanev).RenderWithName(3, 3)
}
else
{
@Html.KretaEmpty()
}
@Html.KretaPasswordFor(x => x.IsmeteltGondviseloJelszo).Enable(ClaimData.IsActivTanev).RenderWithName(3, 3)
</div>
@if (!Model.Id.HasValue)
{
<div class="row @disabledItem">
@Html.KretaCheckBoxFor(x => x.FileLetoltesSzukseges).Enable(ClaimData.IsActivTanev).RenderWithName(3, 3)
</div>
}
<br />
<h4>@TanuloResource.Elerhetosegek</h4>
@Html.Partial("_Cim_Elerhetoseg_Partial", Model)
</div>
}
<script type="text/javascript">
$(document).ready(function () {
setTimeout(function () {
if ($("#TanuloElerhetosegTelId").val() == '') { $(".GondviseloHiddenInputsDivTel").removeClass('displayNone'); }
else { $(".GondviseloHiddenInputsDivTel").addClass('displayNone'); }
if ($("#TanuloElerhetosegEmailId").val() == '') { $(".GondviseloHiddenInputsDivEmail").removeClass('displayNone'); }
else { $(".GondviseloHiddenInputsDivEmail").addClass('displayNone'); }
$(".emptyDiv").addClass('displayNone');
}, 1);
});
</script>