| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?php
- namespace App;
- /**
- * @var Customer $customer
- */
- $default_customer_id = $customer->id ?? null;
- use App\Helpers\HtmlHelper;
- ?>
- <div class="modal fade" role="dialog" tabindex="-1" data-bs-backdrop="static" id="ticket-modal">
- <div class="modal-dialog modal-lg">
- <form class="modal-content" method="post">
- <?php
- View::include("modals/header", ["title" => __("New Ticket")]);
- ?>
- <div class="modal-body">
- <div class="mb-3">
- <label class="form-label" for="ticket-subject"><?=htmlspecialchars(__("Subject"))?></label>
- <input class="form-control" type="text" name="subject" id="ticket-subject" maxlength="255" placeholder="<?=htmlspecialchars(__("Type subject"))?>" required />
- </div>
- <div class="mb-3">
- <label class="form-label" for="ticket-content"><?=htmlspecialchars(__("Content"))?></label>
- <textarea class="form-control" name="content" id="ticket-content" rows="8" placeholder="<?=htmlspecialchars(__("Type content"))?>" required></textarea>
- </div>
- <div class="mb-3">
- <label class="form-label" for="ticket-contact-name"><?=htmlspecialchars(__("Contact Name"))?></label>
- <input class="form-control" name="contact_name" id="ticket-contact-name" type="text" maxlength="255" placeholder="<?=htmlspecialchars(__("Type contact name"))?>" />
- </div>
- <div id="location-row" class="mb-3">
- <label class="form-label" for="ticket-location">
- <?=htmlspecialchars(__("Location"))?>
- </label>
- <select class="form-control" name="location_id" id="ticket-location" required>
- <option value=""><?=htmlspecialchars(__("Select Location"))?></option>
- </select>
- <a id="no-location-action" href="#"><?=htmlspecialchars(__("Click here if the location is not listed."))?></a>
- </div>
- <div id="no-location-row" class="row" style="display: none;">
- <div class="col-lg-4">
- <div class="mb-3">
- <label class="form-label" for="ticket-customer-id">
- <?=htmlspecialchars(__("Customer"))?>
- </label>
- <select class="form-control" name="customer_id" id="ticket-customer-id">
- <option value=""><?=htmlspecialchars(__("Select Customer"))?></option>
- <?php
- HtmlHelper::renderOptions(Customer::getOptions(), $default_customer_id);
- ?>
- </select>
- </div>
- </div>
- <div class="col-lg-4">
- <div class="mb-3">
- <label class="form-label" for="ticket-location-name">
- <?=htmlspecialchars(__("Location Name"))?>
- </label>
- <input class="form-control" type="text" name="location_name" id="ticket-location-name" maxlength="255" placeholder="<?=htmlspecialchars(__("Type location name"))?>" />
- </div>
- </div>
- <div class="col-lg-4">
- <div class="mb-3">
- <label class="form-label" for="ticket-postal-code">
- <?=htmlspecialchars(__("Location Postcode"))?>
- </label>
- <input class="form-control" type="text" name="postal_code" id="ticket-postal-code" maxlength="255" placeholder="<?=htmlspecialchars(__("Type postcode"))?>" />
- </div>
- </div>
- </div>
- <div class="mb-3">
- <label class="form-label" for="ticket-attachments"><?=htmlspecialchars(__("Attachments"))?></label>
- <input class="form-control" type="file" name="attachments[]" multiple />
- </div>
- <div class="row">
- <div class="col-6">
- <div class="mb-3">
- <label class="form-label" for="ticket-sale-number"><?=htmlspecialchars(__("Lead No."))?></label>
- <input class="form-control" type="number" name="sale_number" id="ticket-sale-number" min="0" placeholder="<?=htmlspecialchars(__("Type lead number"))?>" />
- </div>
- </div>
- <div class="col-6">
- <div class="mb-3">
- <label class="form-label" for="ticket-aru-number"><?=htmlspecialchars(__("ARU No."))?></label>
- <input class="form-control" type="number" name="aru_number" id="ticket-aru-number" min="0" placeholder="<?=htmlspecialchars(__("Type ARU number"))?>" />
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="submit" class="btn btn-success">
- <?= htmlspecialchars(__("Save")) ?>
- </button>
- </div>
- </form>
- </div>
- </div>
|