ticket.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. namespace App;
  3. ?>
  4. <div class="modal fade" role="dialog" tabindex="-1" data-bs-backdrop="static" id="ticket-modal">
  5. <div class="modal-dialog modal-lg">
  6. <form class="modal-content" method="post">
  7. <?php
  8. use App\Helpers\HtmlHelper;
  9. View::include("modals/header", ["title" => __("New Ticket")]);
  10. ?>
  11. <div class="modal-body">
  12. <div class="mb-3">
  13. <label class="form-label" for="ticket-subject"><?=htmlspecialchars(__("Subject"))?></label>
  14. <input class="form-control" type="text" name="subject" id="ticket-subject" maxlength="255" placeholder="<?=htmlspecialchars(__("Type subject"))?>" required />
  15. </div>
  16. <div class="mb-3">
  17. <label class="form-label" for="ticket-content"><?=htmlspecialchars(__("Content"))?></label>
  18. <textarea class="form-control" name="content" id="ticket-content" rows="8" placeholder="<?=htmlspecialchars(__("Type content"))?>" required></textarea>
  19. </div>
  20. <div class="mb-3">
  21. <label class="form-label" for="ticket-contact-name"><?=htmlspecialchars(__("Contact Name"))?></label>
  22. <input class="form-control" name="contact_name" id="ticket-contact-name" type="text" maxlength="255" placeholder="<?=htmlspecialchars(__("Type contact name"))?>" />
  23. </div>
  24. <div id="location-row" class="mb-3">
  25. <label class="form-label" for="ticket-location">
  26. <?=htmlspecialchars(__("Location"))?>
  27. </label>
  28. <select class="form-control" name="location_id" id="ticket-location" required>
  29. <option value=""><?=htmlspecialchars(__("Select Location"))?></option>
  30. </select>
  31. <a id="no-location-action" href="#"><?=htmlspecialchars(__("Click here if the location is not listed."))?></a>
  32. </div>
  33. <div id="no-location-row" class="row" style="display: none;">
  34. <div class="col-lg-4">
  35. <div class="mb-3">
  36. <label class="form-label" for="ticket-customer-id">
  37. <?=htmlspecialchars(__("Customer"))?>
  38. </label>
  39. <select class="form-control" name="customer_id" id="ticket-customer-id">
  40. <option value=""><?=htmlspecialchars(__("Select Customer"))?></option>
  41. <?php
  42. HtmlHelper::renderOptions(Customer::getOptions());
  43. ?>
  44. </select>
  45. </div>
  46. </div>
  47. <div class="col-lg-4">
  48. <div class="mb-3">
  49. <label class="form-label" for="ticket-location-name">
  50. <?=htmlspecialchars(__("Location Name"))?>
  51. </label>
  52. <input class="form-control" type="text" name="location_name" id="ticket-location-name" maxlength="255" placeholder="<?=htmlspecialchars(__("Type location name"))?>" />
  53. </div>
  54. </div>
  55. <div class="col-lg-4">
  56. <div class="mb-3">
  57. <label class="form-label" for="ticket-postal-code">
  58. <?=htmlspecialchars(__("Location Postcode"))?>
  59. </label>
  60. <input class="form-control" type="text" name="postal_code" id="ticket-postal-code" maxlength="255" placeholder="<?=htmlspecialchars(__("Type postcode"))?>" />
  61. </div>
  62. </div>
  63. </div>
  64. <div class="mb-3">
  65. <label class="form-label" for="ticket-attachments"><?=htmlspecialchars(__("Attachments"))?></label>
  66. <input class="form-control" type="file" name="attachments[]" multiple />
  67. </div>
  68. <div class="row">
  69. <div class="col-6">
  70. <div class="mb-3">
  71. <label class="form-label" for="ticket-sale-number"><?=htmlspecialchars(__("Sale No."))?></label>
  72. <input class="form-control" type="number" name="sale_number" id="ticket-sale-number" min="0" placeholder="<?=htmlspecialchars(__("Type sale number"))?>" />
  73. </div>
  74. </div>
  75. <div class="col-6">
  76. <div class="mb-3">
  77. <label class="form-label" for="ticket-aru-number"><?=htmlspecialchars(__("ARU No."))?></label>
  78. <input class="form-control" type="number" name="aru_number" id="ticket-aru-number" min="0" placeholder="<?=htmlspecialchars(__("Type ARU number"))?>" />
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <div class="modal-footer">
  84. <button type="submit" class="btn btn-success">
  85. <?= htmlspecialchars(__("Save")) ?>
  86. </button>
  87. </div>
  88. </form>
  89. </div>
  90. </div>