293 lines
No EOL
16 KiB
Text
293 lines
No EOL
16 KiB
Text
@using Kreta.Web.Areas.OsztalyCsoport.Models
|
|
@using Kreta.Resources;
|
|
@using Kreta.Web.Security
|
|
@using Kreta.BusinessLogic.Security
|
|
@model AlapkepzesCsoportModel
|
|
|
|
@{
|
|
string amiAutoGeneraltCsoportDisableClass = "";
|
|
string amiAutoGeneraltCsoportEvfolyamDisableClass = "";
|
|
if (Model.IsAutoEgyeniCsoport)
|
|
{
|
|
amiAutoGeneraltCsoportDisableClass = "disabledItem";
|
|
if (!Model.OsszevontOsztaly) { amiAutoGeneraltCsoportEvfolyamDisableClass = "disabledItem"; }
|
|
}
|
|
}
|
|
|
|
<div class="container-fluid details">
|
|
@Html.HiddenFor(x => x.IsFeladatellatasiHelySzures)
|
|
@Html.HiddenFor(x => x.IsAmiAlapkepzesesGimnaziumkentKezelendo)
|
|
@Html.HiddenFor(x => x.IsFromSzervezet)
|
|
|
|
<div class="row">
|
|
@Html.KretaTextBoxFor(x => x.CsoportNeve).RenderWithName(tooltipResource: OsztalyCsoportResource.CsoportAlapadatokNevTooltip)
|
|
</div>
|
|
@if (!Model.IsFromSzervezet)
|
|
{
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaComboBoxFor(x => x.CsoportTipusId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetCsoportTipusList", isKellDualisKepzesiCsoport = false })).AutoBind(true).RenderWithName(tooltipResource: OsztalyCsoportResource.CsoportAlapadatokCsoportTipus)
|
|
</div>
|
|
}
|
|
@if (Model.ID.HasValue) {
|
|
<div class="row" id="csoportSzervezetIdDiv">
|
|
@Html.KretaComboBoxFor(x => x.CsoportSzervezetId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = Constants.ComboBoxHelperApiActions.GetDualisKepzohelyek }), "Text", "Value", useGroup: true, isSingleElementSet: Model.IsFromSzervezet).AutoBind(true).RenderWithName()
|
|
</div>
|
|
}
|
|
@if (!Model.IsFromSzervezet) {
|
|
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaCheckBoxFor(x => x.OsztalyBontas).RenderWithName(tooltipResource: OsztalyCsoportResource.CsoportAlapadatokOsztalybontas)
|
|
<div class="col-xs-12">
|
|
<div class="row OsztalyBontasCombo @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaComboBoxFor(x => x.OsztalyBontasId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = Model.IsAmiAlapkepzesesGimnaziumkentKezelendo ? "GetAmiOsztalyListForCascadeCB" : "GetOsztalyListForCascadeCB" }), "Text", "Value", onChangeFunction: "CsoportBevitelHelper.OsztalyComboOnChange(false)", isSingleElementSet: false).AutoBind(true).RenderWithName()
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportEvfolyamDisableClass">
|
|
@Html.KretaComboBoxFor(x => x.EvfolyamTipusa, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = Model.IsAmiAlapkepzesesGimnaziumkentKezelendo ? "GetAmiEvfolyamList" : "GetEvfolyamListForCombo" })).AutoBind(true).RenderWithName(tooltipResource: OsztalyCsoportResource.CsoportAlapadatokEvfolyamNeve)
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaComboBoxFor(x => x.FeladatEllatasiHelyId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = Model.IsFeladatellatasiHelySzures ? Model.IsAmiAlapkepzesesGimnaziumkentKezelendo ? "GetAmiFeladatellatasiHelyek" : "GetAlapkepzesFeladatellatasiHelyek" : "GetFeladatellatasiHelyek" })).AutoBind(true).RenderWithName(tooltipResource: OsztalyCsoportResource.CsoportAlapadatokFeladatellatasiHely)
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaComboBoxFor(x => x.CsoportTeremId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetTeremList" }), "Text", "Value", useGroup: false).AutoBind(true).RenderWithName()
|
|
</div>
|
|
}
|
|
@if (Model.IsFromSzervezet && (ClaimManager.HasPackage("Adminisztrator") || ClaimManager.HasPackage(KretaClaimPackages.Dualis_Admin.ClaimValue)))
|
|
{
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaCascadeComboBoxFor(x => x.CsoportvezetoId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetTanar", isFromSzervezet = true }), "CsoportSzervezetId", isSingleElementSet: false).RenderWithName()
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaComboBoxFor(x => x.CsoportvezetoId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetOsztalyFonokList" }), "Text", "Value").AutoBind(true).RenderWithName()
|
|
</div>
|
|
}
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaTextBoxFor(x => x.Megjegyzes).RenderWithName(tooltipResource: OsztalyCsoportResource.CsoportAlapadatokMegjegyzes)
|
|
</div>
|
|
@if (!Model.IsFromSzervezet)
|
|
{
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaCheckBoxFor(x => x.Vegzos).RenderWithName(tooltipResource: OsztalyCsoportResource.CsoportAlapadatokVegzosEvfolyam)
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaCheckBoxFor(x => x.Keresztfeleves).RenderWithName()
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaCheckBoxFor(x => x.IsGyogypedagogiaiLogopediai).RenderWithName()
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaCheckBoxFor(x => x.TechnikaiCsoport).RenderWithName(tooltipResource: OsztalyCsoportResource.CsoportAlapadatokTechnikaiCsoportToolTip)
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaDatePickerFor(x => x.CsoportNaploMegnyitasa).RenderWithName(tooltipResource: OsztalyCsoportResource.CsoportAlapadatokCsoportnaploMegnyitasDatuma)
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaDatePickerFor(x => x.CsoportNaploLezarasa).RenderWithName(tooltipResource: OsztalyCsoportResource.CsoportAlapadatokCsoportnaploLezarasDatuma)
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass" id="NaploszamRow">
|
|
@Html.KretaTextBoxFor(x => x.Naploszam).RenderWithName(6, 6)
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaTextAreaFor(x => x.CsoportNaploLeirasa).RenderWithName(tooltipResource: OsztalyCsoportResource.CsoportAlapadatokCsoportnaploLeirasa)
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass">
|
|
@Html.KretaNumericFor(x => x.TervezettLetszam).Min(0).Max(999).RenderWithName()
|
|
</div>
|
|
<div class="row @amiAutoGeneraltCsoportDisableClass" id="KepzesiForma">
|
|
@Html.KretaComboBoxFor(x => x.KepzesiFormaId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetKepzesListS" })).AutoBind(true).RenderWithName(tooltipResource: OsztalyCsoportResource.KepzesTipusa)
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
@if (!Model.IsFromSzervezet)
|
|
{
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
SetKepzesiFormaVisibility();
|
|
SetDualisKepzohelyVisibility();
|
|
|
|
if (CommonUtils.parseBool('@ClaimData.IsSzakkepzoIntezmeny')) {
|
|
SetMentorCsoportProperties();
|
|
}
|
|
|
|
if ($("#OsztalyBontas").is(':checked')) {
|
|
$(".OsztalyBontasCombo").show();
|
|
$('#Vegzos').prop("disabled", true);
|
|
$('#EvfolyamTipusa').data("kendoComboBox").enable(false);
|
|
$('#FeladatEllatasiHelyId').data("kendoComboBox").readonly();
|
|
}
|
|
else {
|
|
$(".OsztalyBontasCombo").hide();
|
|
$('#Vegzos').prop("disabled", false);
|
|
$('#EvfolyamTipusa').data("kendoComboBox").enable(true);
|
|
}
|
|
|
|
SetNaploszamVisibility();
|
|
|
|
var osztalyID = $('#OsztalyBontasId').data("kendoComboBox").value();
|
|
$('#IsGyogypedagogiaiLogopediai').prop("disabled", typeof osztalyID !== "undefined" && osztalyID != "");
|
|
$('#TechnikaiCsoport').prop("disabled", typeof osztalyID !== "undefined" && osztalyID != "");
|
|
});
|
|
|
|
$("#FeladatEllatasiHelyId").change(function () {
|
|
SetNaploszamVisibility();
|
|
SetKepzesiFormaVisibility();
|
|
});
|
|
|
|
$("#OsztalyBontas").change(function () {
|
|
var isTobbesModositas = false;
|
|
CsoportBevitelHelper.OsztalyBontasCheckBoxChange(this.checked, isTobbesModositas);
|
|
});
|
|
|
|
function SetNaploszamVisibility() {
|
|
var feladatEllatasiHelyId = $('#FeladatEllatasiHelyId').data("kendoComboBox").value();
|
|
var amiFeladatellatasiHelyek = CommonUtils.JSONparse("@Model.AmiFelhelyIdsJSON");
|
|
var isAmi = false;
|
|
$.each(amiFeladatellatasiHelyek, function (index, value) {
|
|
if (value == feladatEllatasiHelyId) {
|
|
isAmi = true;
|
|
return false;
|
|
}
|
|
});
|
|
if (isAmi) {
|
|
$('#NaploszamRow').show();
|
|
}
|
|
else {
|
|
$('#NaploszamRow').hide();
|
|
}
|
|
}
|
|
|
|
function SetKepzesiFormaVisibility() {
|
|
var isNotSzakkapzoIntezmenyAnd21_22OrLater = CommonUtils.parseBool("@(!(ClaimData.IsSzakkepzoIntezmeny && ClaimData.IsSelectedTanev21_22OrLater))");
|
|
var feladatEllatasiHelyId = $('#FeladatEllatasiHelyId').data("kendoComboBox").value();
|
|
var amiFeladatellatasiHelyek = CommonUtils.JSONparse("@Model.AmiFelhelyIdsJSON");
|
|
var isAmi = false;
|
|
$.each(amiFeladatellatasiHelyek, function (index, value) {
|
|
if (value == feladatEllatasiHelyId) {
|
|
isAmi = true;
|
|
return false;
|
|
}
|
|
});
|
|
|
|
if (isNotSzakkapzoIntezmenyAnd21_22OrLater) {
|
|
$('#KepzesiForma').show();
|
|
if ($("#OsztalyBontas").is(':checked')) {
|
|
$('#KepzesiFormaId').data("kendoComboBox").readonly();
|
|
} else {
|
|
$('#KepzesiFormaId').data("kendoComboBox").enable(true);
|
|
}
|
|
}
|
|
else {
|
|
if (isAmi) {
|
|
$('#KepzesiForma').show();
|
|
if ($("#OsztalyBontas").is(':checked')) {
|
|
$('#KepzesiFormaId').data("kendoComboBox").readonly();
|
|
} else {
|
|
$('#KepzesiFormaId').data("kendoComboBox").enable(true);
|
|
}
|
|
} else {
|
|
$('#KepzesiForma').hide();
|
|
}
|
|
}
|
|
}
|
|
|
|
$("#CsoportTipusId").change(function () {
|
|
SetDualisKepzohelyVisibility();
|
|
if (CommonUtils.parseBool('@ClaimData.IsSzakkepzoIntezmeny')) {
|
|
SetMentorCsoportProperties();
|
|
}
|
|
});
|
|
|
|
function SetDualisKepzohelyVisibility() {
|
|
var csoportTipusId = $('#CsoportTipusId').data("kendoComboBox").value();
|
|
if (CommonUtils.parseBool((csoportTipusId == '@((int)Kreta.Enums.CsoportTipusEnum.dualis_kepzesi_csoport)'))) {
|
|
$('#csoportSzervezetIdDiv').show();
|
|
$('#CsoportSzervezetId').rules("add", "required");
|
|
$('#CsoportSzervezetId').attr("data-rule-required", "true");
|
|
$('#CsoportSzervezetId').attr("data-msg-required", '@Html.Raw(DualisResource.DualisKepzohelyMegadasaKotelezo.Replace(Environment.NewLine, ""))');
|
|
$('#CsoportSzervezetId').attr("aria-required", "true");
|
|
|
|
var szervezetLabelText = $('#csoportSzervezetIdDiv').find('label[for="CsoportSzervezetId"]').text();
|
|
if (szervezetLabelText.indexOf(" *") === -1) {
|
|
$('#csoportSzervezetIdDiv').find('label[for="CsoportSzervezetId"]').text(szervezetLabelText + " *");
|
|
}
|
|
|
|
var szervezet = $('#CsoportSzervezetId').data("kendoComboBox");
|
|
if (szervezet.dataSource.data.length == 1) {
|
|
szervezet.select(0);
|
|
}
|
|
|
|
} else {
|
|
$('#csoportSzervezetIdDiv').hide();
|
|
$('#CsoportSzervezetId-error').parent().css("display", "none");
|
|
$('#CsoportSzervezetId').attr("aria-required", "false");
|
|
$('#CsoportSzervezetId').attr("data-msg-required", "");
|
|
$('#CsoportSzervezetId').attr("data-rule-required", "false");
|
|
$('#CsoportSzervezetId').rules("add", { required: false });
|
|
|
|
var szervezetLabelText = $('#csoportSzervezetIdDiv').find('label[for="CsoportSzervezetId"]').text();
|
|
if (szervezetLabelText.indexOf(" *") > -1) {
|
|
$('#csoportSzervezetIdDiv').find('label[for="CsoportSzervezetId"]').text(szervezetLabelText.slice(0, -2));
|
|
}
|
|
|
|
$('#CsoportSzervezetId').data("kendoComboBox").select(-1);
|
|
}
|
|
};
|
|
|
|
function SetMentorCsoportProperties() {
|
|
var csoportTipusId = $('#CsoportTipusId').data("kendoComboBox").value();
|
|
var csoportVezetoId = $('#CsoportvezetoId').data('kendoComboBox').value();
|
|
var csoportvezetoLabelText = $('label[for="CsoportvezetoId"]:not(.error)').text();
|
|
if (CommonUtils.parseBool((csoportTipusId == '@((int)Kreta.Enums.CsoportTipusEnum.apaczai_mentorcsoport)'))) {
|
|
// csoportvezető kötelező
|
|
$('#CsoportvezetoId').attr("aria-required", "true");
|
|
$('#CsoportvezetoId').attr("data-msg-required", "Csoportvezető megadása kötelező");
|
|
$('#CsoportvezetoId').attr("data-rule-required", "true");
|
|
$('#CsoportvezetoId').rules("add", { required: true });
|
|
if (csoportvezetoLabelText.indexOf(" *") === -1) {
|
|
$('label[for="CsoportvezetoId"]').text(csoportvezetoLabelText + " *");
|
|
}
|
|
// csoportvezetők feltöltése csak mentornak jelöltekkel
|
|
$('#CsoportvezetoId').data('kendoComboBox').dataSource.transport.options.read.url = '@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetCsoportNelkuliMentorTanarokList", aktualisCsoportvezetoId = Model.CsoportvezetoId })';
|
|
$('#CsoportvezetoId').data('kendoComboBox').dataSource.read();
|
|
$('#CsoportvezetoId').data('kendoComboBox').refresh();
|
|
// osztálybontás nem engedfélyezett, false érték
|
|
if ($('#OsztalyBontas').is(':checked')) {
|
|
CsoportBevitelHelper.OsztalyBontasCheckBoxChange(false, false);
|
|
}
|
|
$("#OsztalyBontas").prop('checked', false);
|
|
$("#OsztalyBontas").parents('div.row').hide();
|
|
// gyógyped/logopédiai jelölő nem engedélyezett, false érték
|
|
$('#IsGyogypedagogiaiLogopediai').prop('checked', false);
|
|
$('#IsGyogypedagogiaiLogopediai').parents('div.row').hide();
|
|
}
|
|
else {
|
|
// csoportvezető nem kötelező
|
|
$('#CsoportvezetoId').attr("aria-required", "false");
|
|
$('#CsoportvezetoId').attr("data-msg-required", "");
|
|
$('#CsoportvezetoId').attr("data-rule-required", "false");
|
|
$('#CsoportvezetoId').rules("add", { required: false });
|
|
if (csoportvezetoLabelText.indexOf(" *") > -1) {
|
|
$('label[for="CsoportvezetoId"]').text(csoportvezetoLabelText.slice(0, -2));
|
|
}
|
|
$('label[for="CsoportvezetoId"].error').parent().remove();
|
|
$('label[for="CsoportvezetoId"]:not(.error)').removeClass('labelError');
|
|
// csoportvezetők feltöltése tanárokkal
|
|
$('#CsoportvezetoId').data('kendoComboBox').dataSource.transport.options.read.url = '@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetOsztalyFonokList" })';
|
|
$('#CsoportvezetoId').data('kendoComboBox').dataSource.read();
|
|
$('#CsoportvezetoId').data('kendoComboBox').refresh();
|
|
|
|
// gyógyped/logopédiai jelölő engedélyezett, false érték
|
|
$('#IsGyogypedagogiaiLogopediai').prop('checked', false);
|
|
$('#IsGyogypedagogiaiLogopediai').parents('div.row').show();
|
|
}
|
|
if (csoportVezetoId) {
|
|
$('#CsoportvezetoId').data('kendoComboBox').value(csoportVezetoId);
|
|
}
|
|
};
|
|
</script>
|
|
} |