do not show content container if form has no visible fields

This commit is contained in:
Uwe Steinmann 2025-01-24 11:32:08 +01:00
parent 30682237e9
commit ceddf4d5bf

View File

@ -117,7 +117,8 @@ $(document).ready(function() {
<form class="form-horizontal" method="post" action="../op/op.ReceiptDocument.php" id="form<?= $receipttype ?>" name="form<?= $receipttype ?>"> <form class="form-horizontal" method="post" action="../op/op.ReceiptDocument.php" id="form<?= $receipttype ?>" name="form<?= $receipttype ?>">
<?php echo createHiddenFieldWithKey('receiptdocument'); ?> <?php echo createHiddenFieldWithKey('receiptdocument'); ?>
<?php <?php
$this->contentContainerStart(); if (!$noreceiptcomment || $receiptreject)
$this->contentContainerStart();
if(!$noreceiptcomment) { if(!$noreceiptcomment) {
$this->formField( $this->formField(
getMLText("comment"), getMLText("comment"),
@ -149,7 +150,8 @@ $(document).ready(function() {
} else { } else {
echo '<input type="hidden" name="receiptStatus" value="1" />'; echo '<input type="hidden" name="receiptStatus" value="1" />';
} }
$this->contentContainerEnd(); if (!$noreceiptcomment || $receiptreject)
$this->contentContainerEnd();
$this->formSubmit(getMLText('submit_receipt'), $receipttype.'Receipt'); $this->formSubmit(getMLText('submit_receipt'), $receipttype.'Receipt');
?> ?>
<input type='hidden' name='receiptType' value='<?= $receipttype ?>'/> <input type='hidden' name='receiptType' value='<?= $receipttype ?>'/>
@ -164,4 +166,3 @@ $(document).ready(function() {
$this->htmlEndPage(); $this->htmlEndPage();
} /* }}} */ } /* }}} */
} }
?>