gi-survey-questions.blade.php 16 KB

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