Lines 134-143
$(document).ready(function(){
Link Here
|
134 |
|
134 |
|
135 |
$(document).on('click', '.delete', function(e) { |
135 |
$(document).on('click', '.delete', function(e) { |
136 |
e.preventDefault(); |
136 |
e.preventDefault(); |
137 |
if (confirmDelete(MSG_CONFIRM_DELETE_ITEM)) { |
137 |
var itemnumber = $(this).data('itemnumber'); |
138 |
return $("#" + $(this).data("item") + "-delete-item-form").submit(); |
138 |
var hasSerialItem = $(this).data('has-serial-item'); |
|
|
139 |
|
140 |
$('#delete-item-itemnumber').val(itemnumber); |
141 |
$('#delete_associated_serial_issues').attr('checked', false); |
142 |
$('#delete-item-modal-btn-submit').data("item", itemnumber); |
143 |
if(!hasSerialItem) { |
144 |
$('.form-group').hide() |
139 |
} |
145 |
} |
140 |
}) ; |
146 |
$('#delete-item-modal').modal(); |
|
|
147 |
}); |
148 |
$(document).on('click', '#delete-item-modal-btn-submit', function(e) { |
149 |
e.preventDefault(); |
150 |
var itemnumber = $('#delete-item-itemnumber').val(); |
151 |
var deleteSerialIssues = $('#delete_associated_serial_issues').prop('checked') ? true : false; |
152 |
$('#delete-item-modal').modal('hide'); |
153 |
if(deleteSerialIssues) { |
154 |
$('#' + itemnumber + '-delete-serial-issues').val('1'); |
155 |
} |
156 |
return $("#" + $(this).data("item") + "-delete-item-form").submit(); |
157 |
}); |
141 |
}); |
158 |
}); |
142 |
|
159 |
|
143 |
function CheckTemplateForm(f) { |
160 |
function CheckTemplateForm(f) { |
144 |
- |
|
|