| 12345678910111213141516171819202122232425262728293031 |
- <?php
- /**
- * @var int $location_id
- */
- use App\Customer;
- use App\Helpers\HtmlHelper;
- $customers = Customer::getAll();
- ?>
- <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($customers as $customer) {
- ?>
- <optgroup label="<?=htmlspecialchars($customer->name)?>">
- <?php
- HtmlHelper::renderOptions($customer->getLocations(), $location_id);
- ?>
- </optgroup>
- <?php
- }
- ?>
- </select>
- </div>
|