Newer
Older
var $ = jQuery;
$(function() {
// Изменения базовых параметров дисциплины
$(".AddDiscipline").click(function(){
$(this).attr("disabled", true);
var main = $(".main_content");
var BonusRate = main.find(".BonusRate").prop("checked");
URLdir + 'handler/map/AddDiscipline',
'Grade': main.find('.SelectGrade').val(),
'SubjectID': main.find('.SelectSubject').val(),
'ExamType': main.find('input:radio[name=ExamType]:checked').val(),
'LectionCount': main.find('.InputLectionCount').val(),
'PracticeCount': main.find('.InputPracticeCount').val(),
'FacultyID': main.find('.SelectFaculty').val()
},
function(data){
data = $.parseJSON(data);
if(data.success === true) {
EventInspector_ShowMsg('Дисциплина добавлена', 'success');
setTimeout('location.replace("'+URLdir+'discipline/structure/'+data.DisciplineID+'")',1000);
EventInspector_ShowMsg('Ошибка при добавление дисциплины', 'error');
}