Ver Fonte

Rearrange fields

Alan Lam há 3 anos atrás
pai
commit
bab2963360
2 ficheiros alterados com 28 adições e 37 exclusões
  1. 21 25
      views/document.php
  2. 7 12
      views/sale.php

+ 21 - 25
views/document.php

@@ -52,27 +52,34 @@ $location = $document->getLocation();
 				$user->insertCsrfToken();
 				?>
 
+				<div class="mb-3">
+					<label for="invoice-status" class="form-label">
+						<b><?=htmlspecialchars(__("Status"))?></b>
+					</label>
+					<span class="ms-1"></span>
+					<span class="badge rounded-pill text-bg-danger">
+						<?=htmlspecialchars(__("Important"))?>
+					</span>
+					<select class="form-control" name="invoice_status" id="invoice-status">
+						<?php
+						HtmlHelper::renderOptions(SalesOrderStatuses::options(), $document->invoice_status);
+						?>
+					</select>
+				</div>
+
 				<div class="row">
 					<?php
 					if($document->isSalesOrder()) {
 						?>
 						<div class="col-sm-6">
 							<div class="mb-3">
-								<div class="row">
-									<div class="col">
-										<label for="invoice-status" class="form-label">
-											<b><?=htmlspecialchars(__("Status"))?></b>
-										</label>
-									</div>
-									<div class="col-auto">
-										<span class="badge rounded-pill text-bg-danger">
-											<?=htmlspecialchars(__("Important"))?>
-										</span>
-									</div>
-								</div>
-								<select class="form-control" name="invoice_status" id="invoice-status">
+								<label class="form-label" for="company-id">
+									<?=htmlspecialchars(__("Company"))?>
+								</label>
+								<select class="form-control" name="company_id" id="company-id" required>
+									<option value=""><?=htmlspecialchars(__("Select Company"))?></option>
 									<?php
-									HtmlHelper::renderOptions(SalesOrderStatuses::options(), $document->invoice_status);
+									HtmlHelper::renderOptions(Company::getOptions(), $document->company_id);
 									?>
 								</select>
 							</div>
@@ -299,17 +306,6 @@ $location = $document->getLocation();
 					</label>
 					<input type="text" class="form-control" name="contact_email" id="contact-email" placeholder="<?=htmlspecialchars(__("Type contact email address"))?>" value="<?=htmlspecialchars($document->contact_email)?>" />
 				</div>
-				<div class="mb-3">
-					<label class="form-label" for="company-id">
-						<?=htmlspecialchars(__("Company"))?>
-					</label>
-					<select class="form-control" name="company_id" id="company-id" required>
-						<option value=""><?=htmlspecialchars(__("Select Company"))?></option>
-						<?php
-						HtmlHelper::renderOptions(Company::getOptions(), $document->company_id);
-						?>
-					</select>
-				</div>
 
 				<dl>
 					<?php

+ 7 - 12
views/sale.php

@@ -29,18 +29,13 @@ $location = $sale->getLocation();
 				<h4><?=htmlspecialchars(__("Main Details"))?></h4>
 
 				<div class="mb-3">
-					<div class="row">
-						<div class="col">
-							<label class="form-label" for="status">
-								<b><?=htmlspecialchars(__("Status"))?></b>
-							</label>
-						</div>
-						<div class="col-auto">
-							<span class="badge rounded-pill text-bg-danger">
-								<?=htmlspecialchars(__("Important"))?>
-							</span>
-						</div>
-					</div>
+					<label class="form-label" for="status">
+						<b><?=htmlspecialchars(__("Status"))?></b>
+					</label>
+					<span class="ms-1"></span>
+					<span class="badge rounded-pill text-bg-danger">
+						<?=htmlspecialchars(__("Important"))?>
+					</span>
 					<select class="form-control" name="status" id="status">
 						<?php
 						HtmlHelper::renderOptions(SaleStatuses::options(), $sale->status);