You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
$(document).ready(function() {
|
|
function show_month() {
|
|
var terms = $('[name="term"]');
|
|
if ($('[name="payform"]:checked').val() == '0'){
|
|
$(terms[0]).closest('li').hide();
|
|
if (terms.index(terms.filter(':checked')) == 0){
|
|
$(terms[1]).prop('checked', true);
|
|
}
|
|
} else {
|
|
$($('[name="term"]')[0]).closest('li').show();
|
|
}
|
|
}
|
|
|
|
// show_month();
|
|
// $('[name="payform"]').change(function(){
|
|
// show_month()
|
|
// });
|
|
|
|
$('.delete_license').click(function(e){
|
|
e.preventDefault();
|
|
var lic_pk = $(this).data('id');
|
|
|
|
$('#dialogs').html('Удалить?');
|
|
$('#dialogs').dialog({
|
|
buttons: {
|
|
"Да": function(){
|
|
$.post('/my/delete_license/' + lic_pk + '/', function(data){
|
|
$('.license_' + data['id']).remove()
|
|
});
|
|
$(this).dialog("close");
|
|
},
|
|
"Нет": function(){
|
|
$(this).dialog("close");
|
|
}
|
|
}
|
|
})
|
|
})
|
|
});
|
|
|
|
|