| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace App;
- ?>
- <div class="modal fade" role="dialog" tabindex="-1" data-backdrop="static" id="new-document-modal">
- <div class="modal-dialog modal-lg">
- <form class="modal-content" method="post" action="/documents/submit">
- <?php
- View::include("modals/header", ["title" => __("New Document")]);
- ?>
- <input type="hidden" name="type" value="" />
- <div class="modal-body">
- <div class="mb-3">
- <label class="form-label" for="new-document-supplier-id"><?= htmlspecialchars(__("Supplier")) ?></label>
- <select class="form-control" name="supplier_id" id="new-document-supplier-id">
- <option value=""><?=htmlspecialchars(__("Select Supplier"))?></option>
- <?php
- foreach(Supplier::getAll() as $supplier) {
- ?>
- <option value="<?=$supplier->id?>">
- <?=htmlspecialchars($supplier->name)?>
- </option>
- <?php
- }
- ?>
- </select>
- </div>
- <div class="mb-3">
- <label class="form-label" for="location-id"><?= htmlspecialchars(__("Location")) ?></label>
- <select class="form-control" name="location_id" id="location-id">
- <option value=""><?=htmlspecialchars(__("Select Location"))?></option>
- <?php
- foreach(Customer::getAll() as $customer) {
- ?>
- <optgroup label="<?=htmlspecialchars($customer->name)?>">
- <?php
- foreach($customer->getLocations() as $location) {
- ?>
- <option value="<?=$location->id?>">
- <?=htmlspecialchars($location->name)?>
- </option>
- <?php
- }
- ?>
- </optgroup>
- <?php
- }
- ?>
- </select>
- </div>
- </div>
- <div class="modal-footer">
- <button type="submit" class="btn btn-success">
- <?= htmlspecialchars(__("Submit")) ?>
- </button>
- </div>
- </form>
- </div>
- </div>
|