181 lines
No EOL
10 KiB
Text
181 lines
No EOL
10 KiB
Text
@using Kreta.Web.Models
|
|
@using Kreta.Resources
|
|
@using Kreta.Web.Helpers
|
|
@using Kreta.Enums
|
|
|
|
@model GondviseloCimElerhetosegModel
|
|
|
|
<script>
|
|
function GondviseloIranyitoszamFilterData() {
|
|
var ret = KretaComboBoxHelper.getServerFilteringComboBoxTextData("#Iranyitoszam_Gondviselo");
|
|
return ret;
|
|
}
|
|
</script>
|
|
|
|
@Html.HiddenFor(x => x.TanuloId_Gondviselo)
|
|
@Html.HiddenFor(x => x.IsAlapertelmezettModosithato_Gondviselo)
|
|
|
|
<div class="container-fluid details">
|
|
<div class="row">
|
|
@Html.KretaTextBoxFor(x => x.Emailcim_Gondviselo_Input).RenderWithName(3, 3)
|
|
@Html.KretaTextBoxFor(x => x.Telefon_Gondviselo).RenderWithName(3, 3)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaEmpty()
|
|
@Html.KretaComboBoxFor(x => x.TelefonTipus_Gondviselo, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetTelefonTipusList" }), "Text", "Value").AutoBind(true).RenderWithName(3, 3)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanulovalEgyezik_Gondviselo).RenderWithName(3, 3)
|
|
</div>
|
|
<div id="GondviseloHiddenInputsDiv2">
|
|
<div class="row">
|
|
@Html.KretaComboBoxFor(x => x.Orszag_Gondviselo, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetOrszagList" }), "Text", "Value").AutoBind(true).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloAllandoLakcimenekOrszagaTooltip)
|
|
@Html.KretaComboBoxFor(x => x.CimTipus_Gondviselo, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetCimTipusList" }), "Text", "Value").AutoBind(true).RenderWithName(3, 3)
|
|
</div>
|
|
<div class="row">
|
|
<div class="magyarorszagigondviselocim">
|
|
@Html.KretaComboBoxFor(x => x.Iranyitoszam_Gondviselo, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetIranyitoszamList" }), "Iranyitoszam", "Iranyitoszam", isCustomAllowed: true, isServerFiltering: false).Filter(FilterType.StartsWith).AutoBind(false).Filter(FilterType.StartsWith).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloAllandoLakcimenekPostaiIranyitoszamaTooltip)
|
|
@Html.KretaCascadeComboBoxFor(x => x.HelysegNev_Gondviselo, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetHelysegNevList" }), "GondviseloIranyitoszam", "TelepulesNev", "TelepulesNev", isAutoComplete: true, isCustomAllowed: true).AutoBind(false).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloAllandoLakcimenekHelysegeTooltip)
|
|
</div>
|
|
<div class="kulfoldigondviselocim">
|
|
@Html.KretaTextBoxFor(x => x.Iranyitoszam_Gondviselo_Str).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloAllandoLakcimenekPostaiIranyitoszamaTooltip)
|
|
@Html.KretaTextBoxFor(x => x.HelysegNev_Gondviselo_Str).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloAllandoLakcimenekHelysegeTooltip)
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaTextBoxFor(x => x.KozteruletNev_Gondviselo).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloAllandoLakcimenekKozteruletenekTeljesNeveTooltip)
|
|
</div>
|
|
<div class="row">
|
|
<div class="magyarorszagigondviselocim">
|
|
@Html.KretaComboBoxFor(x => x.KozteruletTipus_Gondviselo, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetKozteruletJellegList" }), "Text", "Value").RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloAllandoLakcimenekKozteruletJellegeTooltip)
|
|
</div>
|
|
<div class="kulfoldigondviselocim">
|
|
@Html.KretaTextBoxFor(x => x.KozteruletTipus_Gondviselo_Str).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloAllandoLakcimenekKozteruletJellegeTooltip)
|
|
</div>
|
|
@Html.KretaTextBoxFor(x => x.Hazszam_Gondviselo).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloAllandoLakcimenekHazszamaTooltip)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaTextBoxFor(x => x.Emelet_Gondviselo).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloAllandoLakcimenekEmeletSzamaTooltip)
|
|
@Html.KretaTextBoxFor(x => x.Ajto_Gondviselo).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloGondviseloAllandoLakcimenekAjtoSzamaTooltip)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
var g_orszag = "Orszag_Gondviselo";
|
|
var $g_orszag = $("#" + g_orszag);
|
|
var $g_orszagComboBox = $g_orszag.data("kendoComboBox");
|
|
$g_orszag.on("focusout", G_SetControlsVisibleByOrszag);
|
|
$g_orszag.on("change", G_SetControlsVisibleByOrszag);
|
|
|
|
var g_helysegnev = "HelysegNev_Gondviselo";
|
|
var $g_helysegnev = $("#" + g_helysegnev);
|
|
$g_helysegnev.on("focusout", G_helysegnevchanged);
|
|
$g_helysegnev.on("change", G_helysegnevchanged);
|
|
|
|
var g_iranyitoszam = "Iranyitoszam_Gondviselo";
|
|
var $g_iranyitoszam = $("#" + g_iranyitoszam);
|
|
var $g_iranyitoszamComboBox = $g_iranyitoszam.data("kendoComboBox");
|
|
$g_iranyitoszam.on("focusout", G_helysegNevIranyitoszamAlapjan);
|
|
$g_iranyitoszam.on("change", G_helysegNevIranyitoszamAlapjan);
|
|
|
|
var g_tanulovalEgyezik = "TanulovalEgyezik_Gondviselo";
|
|
var $g_tanulovalEgyezik = $("#" + g_tanulovalEgyezik);
|
|
var $g_tanulovalEgyezikCheckBox = $g_tanulovalEgyezik[0];
|
|
$g_tanulovalEgyezik.on("focusout", G_tanulovalEgyezikchanged);
|
|
$g_tanulovalEgyezik.on("change", G_tanulovalEgyezikchanged);
|
|
|
|
var g_kozteruletTipus = "KozteruletTipus_Gondviselo";
|
|
var $g_kozteruletTipus = $("#" + g_kozteruletTipus);
|
|
var $g_kozteruletTipusComboBox = $g_kozteruletTipus.data("kendoComboBox");
|
|
$g_kozteruletTipus.on("focusout", G_kozteruletTipuschanged);
|
|
$g_kozteruletTipus.on("change", G_kozteruletTipuschanged);
|
|
|
|
var $g_helysegNeveComboBox = $g_helysegnev.data("kendoComboBox");
|
|
|
|
setTimeout(function () {
|
|
G_tanulovalEgyezikchanged();
|
|
}, 100);
|
|
|
|
function G_tanulovalEgyezikchanged() {
|
|
if (!$g_tanulovalEgyezikCheckBox.checked) {
|
|
$("#GondviseloHiddenInputsDiv2").removeClass('displayNone');
|
|
}
|
|
else {
|
|
$g_orszagComboBox.select(0);
|
|
$("#GondviseloHiddenInputsDiv2").addClass('displayNone');
|
|
}
|
|
G_SetControlsVisibleByOrszag();
|
|
}
|
|
|
|
function G_SetControlsVisibleByOrszag() {
|
|
var g_isTanulovalEgyezik = $g_tanulovalEgyezikCheckBox.checked;
|
|
var g_isMagyarorszagSelected = $g_orszagComboBox.value() == "@((int)Kreta.Enums.OrszagTipusEnum.Magyarorszag)";
|
|
if (g_isMagyarorszagSelected) {
|
|
$('.magyarorszagigondviselocim').removeClass('displayNone');
|
|
$('.kulfoldigondviselocim').addClass('displayNone');
|
|
$.each($('.kulfoldigondviselocim').find('[id$=_Gondviselo_Str]'), function () {
|
|
if (!CommonUtils.isNullOrUndefined($(this))) {
|
|
$(this).val('-');
|
|
}
|
|
});
|
|
}
|
|
else {
|
|
$('.magyarorszagigondviselocim').addClass('displayNone');
|
|
$('.kulfoldigondviselocim').removeClass('displayNone');
|
|
}
|
|
//set textbox values
|
|
if (g_isTanulovalEgyezik || g_isMagyarorszagSelected) {
|
|
if (g_isTanulovalEgyezik) {
|
|
$g_orszagComboBox.select(-1);
|
|
$g_orszagComboBox.value('');
|
|
g_isMagyarorszagSelected = false;
|
|
}
|
|
G_setDefaultTextBoxValues(true, '');
|
|
}
|
|
if (!g_isTanulovalEgyezik && !g_isMagyarorszagSelected) {
|
|
G_setDefaultTextBoxValues(false, '');
|
|
}
|
|
$('#CimTipus_Gondviselo').data('kendoComboBox').value($('#CimTipus_Gondviselo').data('kendoComboBox').value());
|
|
}
|
|
|
|
function G_setDefaultTextBoxValues(updateifempty, value) {
|
|
$.each($('.kulfoldigondviselocim').find('[id$=_Gondviselo_Str]'), function () {
|
|
if (!updateifempty || CommonUtils.isNullOrEmpty($(this).val())) {
|
|
$(this).val(value);
|
|
}
|
|
});
|
|
}
|
|
|
|
function G_helysegNevIranyitoszamAlapjan() {
|
|
if (CommonUtils.isNullOrEmpty($g_helysegNeveComboBox.value())) {
|
|
if ($g_iranyitoszamComboBox.value() != "") {
|
|
AjaxHelper.DoPostQuery("@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetHelysegNevByIranyitoszamList" })", null, { 'iranyitoSzam': $(this).val() }, G_updateTelepulesNev);
|
|
$("#" + g_iranyitoszam + "_Str").val($(this).val());
|
|
}
|
|
else { $g_helysegNeveComboBox.select(-1); $g_helysegNeveComboBox.value(''); }
|
|
}
|
|
}
|
|
|
|
function G_updateTelepulesNev(data) {
|
|
if (data.length > 0) {
|
|
$g_helysegNeveComboBox.value(data[0].TelepulesNev);
|
|
$("#" + g_helysegnev + "_Str").val(data[0].TelepulesNev);
|
|
}
|
|
}
|
|
|
|
function G_helysegnevchanged() {
|
|
if (!CommonUtils.isNullOrEmpty($g_helysegNeveComboBox.value().trim())) {
|
|
$("#" + g_helysegnev + "_Str").val($g_helysegNeveComboBox.value());
|
|
}
|
|
}
|
|
|
|
function G_kozteruletTipuschanged() {
|
|
if (!CommonUtils.isNullOrUndefined($g_kozteruletTipusComboBox)) {
|
|
$g_kozteruletTipusComboBox.value($g_kozteruletTipusComboBox.value());
|
|
$("#" + g_kozteruletTipus + "_Str").val($g_kozteruletTipusComboBox.text());
|
|
}
|
|
}
|
|
});
|
|
</script> |