Files
zszq-trs/YLErpWeb/Views/calendar/calendarEdit.cshtml
T
2024-05-09 14:06:26 +08:00

45 lines
1.4 KiB
Plaintext

@model calendar
@{
ViewBag.Title = "日历 | 编辑";
Layout = "~/Views/Shared/_InfoLayout.cshtml";
}
@section JS
{
<script type="text/javascript">
var submitclick_calendar = false;
$(function () {
$(".form-group").removeClass("col-md-6");
});
function checkSubmitData() {
var pass = $('#calendarEditForm').valid();
return pass;
}
function savecalendar() {
if (!checkSubmitData()) return false;
var data = $("#calendarEditForm").serialize();
main.post("/calendar/calendarEditJson", data).done(function (res) {
try {
window.parent.reloadcalendar();
parent.layer.closeAll();
} catch (e) { }
});
}
</script>
}
@using (Html.BeginForm("calendarEdit", "calendar", FormMethod.Post, new { id = "calendarEditForm" }))
{
<div class="yc-panel">
<input type="hidden" value="@Model.id" name="id" id="id" />
@Html.HiddenFor(model => model.EncryptId)
@Html.MyTextFor(model => model.Country)
@Html.MyTextFor(model => model.Year)
@Html.MyDropdownFor1(model => model.ValidState, ConsGlobal.ValidStates(), appendBlank: false)
</div>
<div class="offset-4">
@MyControls.Btn("保存", "savecalendar()")
@MyControls.Btn("关闭", "layer.closeMe()")
</div>
}