gi-survey-questions.blade.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. @extends('layouts.app')
  2. @section('content')
  3. <link rel="stylesheet" href="{{ asset('css/nouislider.min.css') }}" />
  4. <script src="{{ asset('js/nouislider.min.js') }}"></script>
  5. <style>
  6. .form-group label {
  7. font-weight: 500;
  8. }
  9. .form-group label span {
  10. font-weight: 400;
  11. }
  12. .noUiSlider {
  13. margin: 58px 0;
  14. padding: 0 15px;
  15. }
  16. .notify.alert-warning {
  17. background-color: #f9f6ee;
  18. border-color: #ffecb5;
  19. }
  20. .notify i {
  21. font-size: 40px;
  22. }
  23. .checkbox label:after {
  24. content: '';
  25. display: table;
  26. clear: both;
  27. }
  28. .checkbox .cr {
  29. position: relative;
  30. display: inline-block;
  31. border: 1px solid #a9a9a9;
  32. border-radius: .25em;
  33. width: 1.3em;
  34. height: 1.3em;
  35. float: left;
  36. margin-right: .5em;
  37. }
  38. .checkbox .cr .cr-icon {
  39. position: absolute;
  40. font-size: .8em;
  41. line-height: 0;
  42. top: 50%;
  43. left: 15%;
  44. }
  45. .checkbox label input[type="checkbox"] {
  46. display: none;
  47. }
  48. .checkbox label input[type="checkbox"]+.cr>.cr-icon {
  49. opacity: 0;
  50. font-weight: bold;
  51. }
  52. .checkbox label input[type="checkbox"]:checked+.cr>.cr-icon {
  53. opacity: 1;
  54. color: var(--pry-color);
  55. }
  56. .checkbox label input[type="checkbox"]:disabled+.cr {
  57. opacity: .5;
  58. }
  59. </style>
  60. <div class="bg-light">
  61. <div class="container pt-3">
  62. <nav class="mb-0">
  63. <ol class="breadcrumb">
  64. <li class="breadcrumb-item"><a href="{{ route('index') }}"><u>Home</u></a></li>
  65. <li class="breadcrumb-item active" aria-current="page">Hemorrhoid Treatment Survey</li>
  66. </ol>
  67. </nav>
  68. </div>
  69. </div>
  70. <div class="bg-grey py-5">
  71. <div class="container">
  72. <div class="row justify-content-center">
  73. <div class="col-lg-7 text-center">
  74. <h5 class="subtitle">Hemorrhoid Treatment Survey</h5>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="container py-4">
  80. <div class="row justify-content-center">
  81. <div class="col-lg-8">
  82. <div class="container shadow p-4">
  83. <div class="row">
  84. <div class="col-md-12">
  85. <div class="notify alert alert-warning d-flex flex-column flex-md-row align-items-center" role="alert">
  86. <i class="fa-duotone fa-circle-info fa-fw"></i>
  87. <div class="ms-2 mt-2 mt-md-0">
  88. <div>Are you a <b>gastroenterologist</b> who treats hemorrhoids?</div>
  89. <div>Receive a <b>$50 Amazon Gift Card</b> to Take a 5 Minute Telephone Survey</div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="row justify-content-center">
  95. @if (session('success'))
  96. <div class="col-12">
  97. <div class="alert alert-success" role="alert">
  98. <h4 class="alert-heading">Congratulations!!</h4>
  99. <p>You have successfully completed this survey. Eligible submissions will receive a
  100. digital gift cards in 7 business days to the email provided in the survey. </p>
  101. </div>
  102. </div>
  103. @else
  104. <div id="surveyQuestionsComponent" class="col-md-12">
  105. <form action="{{ route('submit-gi-survey-questions') }}" method="POST">
  106. @csrf
  107. <div class="row mb-3">
  108. <div class="col-12 question">
  109. <div class="form-group">
  110. <label>Are you a gastroenterologist?</label>
  111. <div class="d-flex">
  112. <label class="me-3"><input type="radio" name="are_you_a_gastroenterologist" v-model="form.are_you_a_gastroenterologist" value="YES" />
  113. <span>Yes</span></label>
  114. <label><input type="radio" name="are_you_a_gastroenterologist" v-model="form.are_you_a_gastroenterologist" value="NO" />
  115. <span>No</span></label>
  116. </div>
  117. </div>
  118. <div v-if="form.are_you_a_gastroenterologist == 'NO'" class="form-group">
  119. <label>Your speciality?<sup class="text-danger">*</sup></label>
  120. <input type="text" class="form-control" name="your_specialty" value="{{ old('your_specialty') }}" required />
  121. </div>
  122. </div>
  123. </div>
  124. <div class="row mb-3">
  125. <div class="col-12 question">
  126. <div class="form-group">
  127. <label>How many patients per week, on average, do you see who have hemorrhoids?</label>
  128. <input type="number" class="form-control" name="number_of_patients_per_week" value="{{ old('number_of_patients_per_week') }}" />
  129. </div>
  130. </div>
  131. </div>
  132. <div class="row mb-3">
  133. <div class="col-12 question">
  134. <div class="form-group">
  135. <label>Do you currently perform rubber band ligation (RBL) for hemorrhoid treatment?</label>
  136. <div class="d-flex">
  137. <label class="me-3"><input type="radio" name="performs_rubber_band_ligation" v-model="form.performs_rubber_band_ligation" value="YES" /> <span>Yes</span></label>
  138. <label><input type="radio" name="performs_rubber_band_ligation" v-model="form.performs_rubber_band_ligation" value="NO" /> <span>No</span></label>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. <div class="row mb-3">
  144. <div class="col-12 question">
  145. <div class="form-group">
  146. <label>What is the best phone number to reach you at to take a 5 minute telephone survey?</label>
  147. <input type="text" class="form-control phone" name="phone_number" value="{{ old('phone_number') }}" />
  148. </div>
  149. </div>
  150. </div>
  151. <div class="row mb-3">
  152. <div class="col-12 question">
  153. <div class="form-group">
  154. <label>Your Name<sup class="text-danger">*</sup></label>
  155. <input type="text" class="form-control" name="name" value="{{ old('name') }}" required />
  156. </div>
  157. </div>
  158. </div>
  159. <div class="row mb-3">
  160. <div class="col-12 question">
  161. <div class="form-group">
  162. <label>What state do you practice in:</label>
  163. <select class="form-control" name="practice_address_state">
  164. <option value=""></option>
  165. @foreach(config('constants.us_states') as $stateKey => $stateLabel)
  166. <option value="{{ $stateKey }}" <?= old('practice_address_state') === $stateKey ? 'selected' : '' ?>>{{ $stateKey }}</option>
  167. @endforeach
  168. </select>
  169. </div>
  170. </div>
  171. </div>
  172. <div class="row mb-3">
  173. <div class="col-12 question">
  174. <div class="form-group">
  175. <label>Your email:<sup class="text-danger">*</sup></label>
  176. <input type="email" class="form-control" name="email" value="{{ old('email') }}" required />
  177. <small class="text-muted"><i class="fa-duotone fa-circle-info fa-fw"></i> We will use this email address to process your $50 Amazon gift card</small>
  178. </div>
  179. </div>
  180. </div>
  181. <div class="row mb-3">
  182. <div class="col-12 question">
  183. <div class="form-group">
  184. <label>Preferred time to call:</label>
  185. <div class="mb-3">
  186. <label class="me-3 text-muted">Day(s):</label>
  187. <div class="d-flex flex-wrap mt-1">
  188. <?php
  189. $preferred_days_to_call = [
  190. 'M',
  191. 'Tu',
  192. 'W',
  193. 'Th',
  194. 'F',
  195. 'Sa',
  196. 'Su'
  197. ];
  198. ?>
  199. @foreach($preferred_days_to_call as $day)
  200. <div class="checkbox me-3">
  201. <label>
  202. <input type="checkbox" name="preferred_day_to_call[]" value="{{ $day }}">
  203. <span class="cr"><i class="cr-icon fa-duotone fa-check fa-fw"></i></span>
  204. <span>{{ $day }}</span>
  205. </label>
  206. </div>
  207. @endforeach
  208. </div>
  209. </div>
  210. <div class="mb-3">
  211. <label class="me-3 text-muted">Time(s):</label>
  212. <div class="d-flex flex-wrap mt-1">
  213. <?php
  214. $preferred_time_to_call = [
  215. '8-10',
  216. '10-12',
  217. '12-2',
  218. '2-4',
  219. '4-6'
  220. ];
  221. ?>
  222. @foreach($preferred_time_to_call as $time)
  223. <div class="checkbox me-3">
  224. <label>
  225. <input type="checkbox" name="preferred_time_to_call[]" value="{{ $time }}">
  226. <span class="cr"><i class="cr-icon fa-duotone fa-check fa-fw"></i></span>
  227. <span>{{ $time }}</span>
  228. </label>
  229. </div>
  230. @endforeach
  231. </div>
  232. <small class="text-muted mt-1"><i class="fa-duotone fa-circle-info fa-fw"></i> Your local time</small>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. <div class="row mt-3">
  238. <div class="col-md-12">
  239. <div class="form-group mb-4">
  240. {!! htmlFormSnippet() !!}
  241. @error('g-recaptcha-response')
  242. <small class="text-danger"><i class="fas fa-exclamation-triangle mr-2"></i>Invalid</small>
  243. @enderror
  244. </div>
  245. </div>
  246. <div class="col-12">
  247. <button type="submit" class="btn btn-pry w-100 py-3">SUBMIT</button>
  248. </div>
  249. </div>
  250. </form>
  251. </div>
  252. @endif
  253. </div>
  254. </div>
  255. </div>
  256. </div>
  257. </div>
  258. <script>
  259. var surveyQuestionsComponent = new Vue({
  260. el: '#surveyQuestionsComponent',
  261. data: {
  262. form: {
  263. are_you_a_gastroenterologist: "{{ old('are_you_a_gastroenterologist') }}",
  264. performs_rubber_band_ligation: "{{ old('performs_rubber_band_ligation') }}"
  265. }
  266. },
  267. methods: {
  268. init: function() {}
  269. },
  270. mounted: function() {
  271. this.init();
  272. }
  273. });
  274. </script>
  275. @endsection