125 lines
6.1 KiB
Plaintext
125 lines
6.1 KiB
Plaintext
@model NP.Model.VMCM
|
|
@{
|
|
if (Model.CMSD.sdno > 0)
|
|
{
|
|
ViewBag.PopupMenuName = "토론수정";
|
|
if (Model.CMSD.sdtype == 0)
|
|
{
|
|
ViewBag.PopupMenuName = "과제수정";
|
|
}
|
|
}
|
|
Layout = "~/Views/Shared/_PopupLayout.cshtml";
|
|
}
|
|
<div class="row">
|
|
<form id="mform" method="post" enctype="multipart/form-data" class="form-horizontal">
|
|
<section class="panel panel-default">
|
|
<div class="panel-body">
|
|
<div class="form-group">
|
|
<label class="col-sm-4 col-md-2 control-label req">평가구분</label>
|
|
<div class="col-sm-8 col-md-10">
|
|
@if (Model.examsavable == "")
|
|
{
|
|
@Html.Partial("./Partial/Radio", "0:과제", new ViewDataDictionary { { "special", "stringlist" }, { "name", "CMSD.sdtype" }, { "checked", 0 } })
|
|
@*@Html.Partial("./Partial/Radio", "0:과제;1:토론", new ViewDataDictionary { { "special", "stringlist" }, { "name", "CMSD.sdtype" }, { "checked", Model.CMSD.sdtype } })*@
|
|
}
|
|
else
|
|
{
|
|
@Html.HiddenFor(m=>m.CMSD.sdtype)@Model.CMSD.sdname
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
<label class="col-sm-4 col-md-2 control-label req">평가명</label>
|
|
<div class="col-sm-8 col-md-10">@Html.TextBoxFor(m => m.CMSD.sdname, new { @class = "form-control", @maxlength = "100" })</div>
|
|
</div>
|
|
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
<label class="col-sm-4 col-md-2 control-label">평가내용</label>
|
|
<div class="col-sm-8 col-md-10">@Html.TextAreaFor(m => m.CMSD.sddesc, new { @class = "form-control", @maxlength = "700", @style = "resize: none; height: 70px;" })</div>
|
|
</div>
|
|
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
<label class="col-sm-2 control-label">만점기준</label>
|
|
<div class="col-sm-8 col-md-10">@Html.TextBoxFor(m => m.CMSD.tpoint, new { @class = "form-control int nocomma disp-init text-center", @maxlength = "3", @style = "width: 100px;" })</div>
|
|
</div>
|
|
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
<label class="col-sm-4 col-md-2 control-label req">참여조건</label>
|
|
<div class="col-sm-8 col-md-10">출석률 @Html.TextBoxFor(m => m.CMSD.sdcondition, new { @class = "form-control disp-init int nocomma text-center", @maxlength = "3", @style = "width: 80px;" }) % 이상</div>
|
|
</div>
|
|
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
<label class="col-sm-4 col-md-2 control-label">첨부파일</label>
|
|
<div class="col-sm-8 col-md-10">
|
|
@Html.Partial("./Partial/File", Model.FileList, new ViewDataDictionary {
|
|
{ "name", "CMSD.fgno" },{"value", Model.CMSD.fgno},{ "fname", "file"},
|
|
{"width", null },{"table", "cmsd" },{ "column", "fgno"},{"filecount", 10 },
|
|
{"readmode", 0 },{"hidemode", 0 },
|
|
{ "isimage", 0 },{ "imageid", "imgprofile" },{ "dftsrc", "/img/common/profile_sample.jpg" },
|
|
{ "fileext", "" }, { "loginfo",Model.CMSD.sdno+"|9"}
|
|
})
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<div>
|
|
<div class="text-center">
|
|
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
|
@if (Model.CMSD.sdno > 0)
|
|
{
|
|
<a href="#" class="btn btn-danger" onclick="del();">삭제</a>
|
|
}
|
|
<a href="#" class="btn btn-default" onclick="goparent(val('IsSavedForParent') == '1');">닫기</a>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="CMSD.sdno" id="datakey" value="@Model.CMSD.sdno" />
|
|
@Html.HiddenFor(m => m.CMSD.cmno)
|
|
@Html.HiddenFor(m => m.cmno)
|
|
@Html.HiddenFor(m => m.IsSavedForParent)
|
|
@Html.Partial("./Partial/DForm", Model)
|
|
</form>
|
|
</div>
|
|
@section styles{
|
|
<style type="text/css">
|
|
</style>
|
|
}
|
|
@section scriptsHeader{
|
|
@Html.Partial("./Partial/FileScript")
|
|
}
|
|
@section scripts{
|
|
<script>
|
|
$(document).ready(function () {
|
|
focus("CMSD_sdname");
|
|
});
|
|
function save() {
|
|
if (val("datakey")=="0" && checkrv("CMSD.sdtype", null, "평가구분을 선택해주세요.")) { }
|
|
else if (check("CMSD_sdname", null, "평가명을 입력해주세요.")) { }
|
|
else if (getDouble(val("CMSD_sdcondition")) > 100 || getDouble(val("CMSD_sdcondition")) < 0) { msg("출석률은 0 ~ 100 사이의 값을 입력해주세요."); }
|
|
else if (confirm("저장하시겠습니까?")) {
|
|
capfileform("/acommon/cmsdsave", "mform", "cbsave");
|
|
}
|
|
}
|
|
function cbsave() {
|
|
if (capOK) {
|
|
if ('@(Model.CMSD.sdno)' == '0') {
|
|
$("#intval").val(capResult.obj);
|
|
}
|
|
setv("IsSavedForParent", 1);
|
|
msgok(1, "", true);
|
|
timesubmit();
|
|
}
|
|
else {
|
|
msgadmin();
|
|
}
|
|
}
|
|
function del() {
|
|
if (confirm("삭제하시겠습니까?")) {
|
|
capp("/acommon/estdel", { extype: getrv("CMSD.sdtype") == "0" ? 11:21, no: @Model.CMSD.sdno }, "cbdel");
|
|
}
|
|
}
|
|
function cbdel() {
|
|
if (capResult.code == 1000) {
|
|
msg("삭제했습니다.", null, true, null, true);
|
|
goparent(true);
|
|
} else {
|
|
msgadmin();
|
|
}
|
|
}
|
|
</script>
|
|
} |