95 lines
3.3 KiB
Text
95 lines
3.3 KiB
Text
@using Kreta.Web.Areas.Orarend.Models
|
|
|
|
@model FelhelyOrarendTorleseModel
|
|
|
|
@{
|
|
var formName = "felhelyOrarendTorleseForm";
|
|
}
|
|
|
|
<style type="text/css">
|
|
.k-checkbox-label::before {
|
|
top: 3px;
|
|
}
|
|
|
|
.k-checkbox-label {
|
|
line-height: 1.5em;
|
|
}
|
|
|
|
#FelhelyOrarendTorlesVisszaBtn {
|
|
margin-left: 80px;
|
|
}
|
|
|
|
#felhelyOrarendTorlesTorles {
|
|
margin-right: 80px;
|
|
}
|
|
</style>
|
|
|
|
<div style="padding: 40px;">@Html.Raw(OrarendekTorleseResource.FelhelyInformaciosSzoveg)</div>
|
|
@using (Html.KretaForm("FelhelyOrarendekTorlese", Constants.Controllers.OrarendekTorlese, FormMethod.Post, formName))
|
|
{
|
|
@Html.KretaValidationSummary()
|
|
<div style="display: none;">
|
|
@Html.KretaTextBoxFor(x => x.KivalasztottFelhelyekIds)
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="@BootsrapHelper.GetSizeClasses(12)">
|
|
<div class="@BootsrapHelper.GetSizeClasses(6)">
|
|
<div class="hiba">Feladatellátási helyek:</div>
|
|
@Html.KretaCheckBoxList("FeladatEllatasiHelyIds", Model.FelhelyList, isPostAsArray: false)
|
|
</div>
|
|
<div class="@BootsrapHelper.GetSizeClasses(6)">
|
|
@Html.Partial("KozosParameterekView")
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row" style="margin-top: 40px;">
|
|
<div class="@BootsrapHelper.GetSizeClasses(6)">
|
|
@Html.KretaButton("FelhelyOrarendTorlesVisszaBtn", CommonResource.Vissza, clickEventName: "OrarendekTorleseHelper.vissza")
|
|
</div>
|
|
<div class="@BootsrapHelper.GetSizeClasses(6) BtnDelete">
|
|
@Html.KretaButton("felhelyOrarendTorlesTorles", CommonResource.Torles, clickEventName: "function () { OrarendekTorleseHelper.torles(FelhelyOrarendTorleseHelper.submitForm); }")
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<script type="text/javascript">
|
|
var FelhelyOrarendTorleseHelper = (function () {
|
|
var felhelyOrarendTorleseHelper = function () { };
|
|
|
|
var urls = {
|
|
FelhelyOrarendTorlesUrl: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.OrarendekTorleseApi, action = "FelhelyOrarendekTorlese" })"
|
|
}
|
|
|
|
felhelyOrarendTorleseHelper.submitForm = function () {
|
|
if ($('#@formName').valid()) {
|
|
var data = $('#@formName').toObject();
|
|
AjaxHelper.DoValidationPost(urls.FelhelyOrarendTorlesUrl, "@formName", data, OrarendekTorleseHelper.torlesSuccessCallBack, felhelyOrarendTorleseHelper.error);
|
|
}
|
|
}
|
|
|
|
felhelyOrarendTorleseHelper.error = function (data) {
|
|
if (data.responseJSON.ModelState === undefined) {
|
|
KretaWindowHelper.warningWindow("@Html.Raw(ErrorResource.Hiba)", data.responseJSON.Message);
|
|
}
|
|
}
|
|
|
|
return felhelyOrarendTorleseHelper;
|
|
})();
|
|
|
|
$(document).ready(function () {
|
|
$('[name^="FeladatEllatasiHelyIds"]').unbind("change");
|
|
$('[name^="FeladatEllatasiHelyIds"]').bind("change", felhelychanged);
|
|
});
|
|
|
|
function felhelychanged(e) {
|
|
var yourArray = [];
|
|
$("input:checkbox:checked").each(function () {
|
|
yourArray.push($(this).val());
|
|
});
|
|
var a = yourArray.join();
|
|
var container = $("#KivalasztottFelhelyekIds")
|
|
container.val(a);
|
|
container.trigger('keyup');
|
|
}
|
|
</script>
|