Skip to content

Commit

Permalink
some_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
interduo committed Jun 16, 2023
1 parent dc20273 commit f496453
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
9 changes: 4 additions & 5 deletions js/pdlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
document.getElementById("addpd-form").setAttribute('action', '?m=pdlist&action=add');
change_currency();
change_pay_type();
$( "input[id='use_current_supplier_info']" ).val('1').prop( "disabled", true );

$( "#addpdmodal" ).dialog({
width: 'auto',
Expand All @@ -32,10 +31,9 @@
change_currency();
change_pay_type();

$( "#use_current_supplier_info-tr" ).removeClass('lms-ui-disabled');
$( "#files" ).addClass('hidden');
$( "#fileanteroom" ).val(attid);
$( "#fileanteroom" ).removeClass('hidden');
$( "#fileanteroom" ).html(filename);
$( "#fileanteroom" ).val(attid).removeClass('hidden').html(filename);

show_inline_pdf_from_link('?m=pdview&attid=' + attid);

Expand Down Expand Up @@ -74,7 +72,8 @@
$( "#addpd-form" ).attr('action', '?m=pdlist&action=modify&id=' + template_id).attr('data-templateid-number', template_id);
change_currency();
change_pay_type();
$( "input[form='addpd-form'][id='use_current_supplier_info']" ).val('1').prop('disabled', false);
$( "#use_current_supplier_info" ).val('1').removeAttr('disabled');
$( "#use_current_supplier_info-tr" ).removeClass('lms-ui-disabled');
$( "#submit-modal-button" ).html('<i class="lms-ui-icon-submit"></i><span class="lms-ui-label">{trans("Submit")}</span>');

if (template_id) {
Expand Down
3 changes: 2 additions & 1 deletion js/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ function clear_pd_form(formid) {
$("select[form='" + formid + "'] option:selected").removeAttr('selected');
$( "#files").removeClass('hidden');
$( "#fileanteroom" ).addClass('hidden');
$( "input[form='" + formid + "'][name='use_current_supplier_info']" ).val('1').prop( "disabled", true );
$( "input[id='use_current_supplier_info']" ).val('1').prop( "disabled", true );
$( "#use_current_supplier_info-tr" ).addClass('lms-ui-disabled');

$("#dialog-iban").show();
$("#bankaccounts-container").empty();
Expand Down
2 changes: 1 addition & 1 deletion templates/pdmodify.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h2>{trans("Purchase Document")}</h2>
</div>
</td>
</tr>
<tr>
<tr id="use_current_supplier_info-tr">
<td>
{icon name="summary" label="Use current supplier info"}
</td>
Expand Down

0 comments on commit f496453

Please sign in to comment.