Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

surveyEdit.view copy 8.php 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <?php echo $this->partial('Layout/nav'); ?>
  2. <div class="container">
  3. <div class="container-page-wrapper shodowed bordered">
  4. <div class="container-page-container">
  5. <div class="row">
  6. <div class="col-lg-10">
  7. <h1><?php echo $this->actionTitle; ?></h1>
  8. <?php if($this->view->id > 0): ?>
  9. <small class="text-muted"><?php echo $this->view->survey_domain; ?></small>
  10. <?php endif; ?>
  11. </div>
  12. <div class="col-lg-2 clearfix">
  13. <div class="float-right">
  14. </div>
  15. </div>
  16. </div>
  17. <hr>
  18. <?php //debug($this->view->survey_domain); ?>
  19. <form id="survey-form-edit">
  20. <input type="hidden" name="data[id][value]" value="<?php echo $this->view->id; ?>">
  21. <div class="form-row">
  22. <div class="form-group col-lg-3">
  23. <label class="label-main" for="profile_name"><?php echo _('Name'); ?>*</label>
  24. <input type="text" class="form-control field-name" value="<?php echo isset($this->view->userData['name']) ? $this->view->userData['name'] : ''; ?>" id="profile_name" name="data[name][value]">
  25. <input type="hidden" name="data[name][required]" value="1">
  26. <input type="hidden" name="data[name][type]" value="text">
  27. <input type="hidden" name="data[name][class]" value="field-name">
  28. <input type="hidden" name="data[name][label]" value="<?php echo _('Name'); ?>">
  29. </div>
  30. <div class="form-group col-lg-3">
  31. <label class="label-main" for="profile_surname"><?php echo _('Surname'); ?>*</label>
  32. <input type="text" class="form-control field-surname" value="<?php echo isset($this->view->userData['surname']) ? $this->view->userData['surname'] : ''; ?>" id="profile_surname" name="data[surname][value]">
  33. <input type="hidden" name="data[surname][required]" value="1">
  34. <input type="hidden" name="data[surname][type]" value="text">
  35. <input type="hidden" name="data[surname][class]" value="field-surname">
  36. <input type="hidden" name="data[surname][label]" value="<?php echo _('Surname'); ?>">
  37. </div>
  38. <div class="form-group col-lg-3">
  39. <label class="label-main" for="profile_birthdate"><?php echo _('Birthdate'); ?>*</label>
  40. <input type="text" class="form-control field-birthdate survey-birthdate" autocomplete="off" value="<?php echo isset($this->view->userData['birthdate']) ? $this->view->userData['birthdate'] : ''; ?>" id="profile_birthdate" name="data[birthdate][value]">
  41. <input type="hidden" name="data[birthdate][required]" value="1">
  42. <input type="hidden" name="data[birthdate][type]" value="date">
  43. <input type="hidden" name="data[birthdate][class]" value="field-birthdate">
  44. <input type="hidden" name="data[birthdate][label]" value="<?php echo _('Birth date'); ?>">
  45. </div>
  46. <div class="form-group col-lg-3">
  47. <label class="label-main" for="profile_sex"><?php echo _('Sex'); ?>*</label>
  48. <select class="form-control field-sex" id="profile_sex" name="data[sex][value]">
  49. <option value="">...</option>
  50. <option value="f" <?php echo isset($this->view->userData['sex'])&&$this->view->userData['sex']=='f' ? 'selected' : ''; ?>>F</option>
  51. <option value="m" <?php echo isset($this->view->userData['sex'])&&$this->view->userData['sex']=='m' ? 'selected' : ''; ?>>M</option>
  52. </select>
  53. <input type="hidden" name="data[sex][required]" value="1">
  54. <input type="hidden" name="data[sex][type]" value="date">
  55. <input type="hidden" name="data[sex][class]" value="field-sex">
  56. <input type="hidden" name="data[sex][label]" value="<?php echo _('Sex'); ?>">
  57. </div>
  58. <div class="form-group col-lg-6">
  59. <label class="label-main" for="profile_email"><?php echo _('E-mail'); ?>*</label>
  60. <input type="email" class="form-control field-email" value="<?php echo isset($this->view->userData['email']) ? $this->view->userData['email'] : ''; ?>" id="profile_email" name="data[email][value]">
  61. <input type="hidden" name="data[email][required]" value="1">
  62. <input type="hidden" name="data[email][type]" value="email">
  63. <input type="hidden" name="data[email][class]" value="field-email">
  64. <input type="hidden" name="data[email][label]" value="<?php echo _('E-mail'); ?>">
  65. </div>
  66. <div class="form-group col-lg-6">
  67. <label class="label-main" for="profile_phone">Telefono*</label>
  68. <input type="tel" class="form-control field-phone" value="<?php echo isset($this->view->userData['phone']) ? $this->view->userData['phone'] : ''; ?>" id="profile_phone" name="data[phone][value]">
  69. <input type="hidden" name="data[phone][required]" value="0">
  70. <input type="hidden" name="data[phone][type]" value="text">
  71. <input type="hidden" name="data[phone][class]" value="field-phone">
  72. <input type="hidden" name="data[phone][label]" value="Telefono">
  73. </div>
  74. <div class="form-group col-lg-6">
  75. <label class="label-main" for="profile_cf">Codice fiscale</label>
  76. <input type="tel" class="form-control field-cf" value="<?php echo isset($this->view->userData['cf']) ? $this->view->userData['cf'] : ''; ?>" id="profile_cf" name="data[cf][value]">
  77. <input type="hidden" name="data[cf][required]" value="0">
  78. <input type="hidden" name="data[cf][type]" value="text">
  79. <input type="hidden" name="data[cf][class]" value="field-cf">
  80. <input type="hidden" name="data[cf][label]" value="Codice fiscale">
  81. </div>
  82. <div class="form-group col-lg-6">
  83. <label class="label-main" for="profile_cf">NRE</label>
  84. <input type="tel" class="form-control field-nre" value="<?php echo isset($this->view->userData['nre']) ? $this->view->userData['nre'] : ''; ?>" id="profile_nre" name="data[nre][value]">
  85. <input type="hidden" name="data[nre][required]" value="0">
  86. <input type="hidden" name="data[nre][type]" value="text">
  87. <input type="hidden" name="data[nre][class]" value="field-nre">
  88. <input type="hidden" name="data[nre][label]" value="NRE">
  89. </div>
  90. <div class="form-group col-lg-12">
  91. <hr>
  92. </div>
  93. <div class="form-group col-lg-6">
  94. <div class="form-check">
  95. <input class="form-check-input check-auto-tlc" type="radio" value="1" id="check-auto-tlc-new" name="data[autotlc][value]" <?php echo !isset($this->view->userData['remote_auto_tlc']) || isset($this->view->userData['remote_auto_tlc'])&&(int)$this->view->userData['remote_auto_tlc']==1 ? 'checked' : ''; ?> <?php echo $this->view->is_linked ? 'disabled' : ''; ?>>
  96. <label class="form-check-label" for="check-auto-tlc-new">
  97. Crea una nuova televisita associata a questo nuovo paziente
  98. <?php if(isset($this->view->userData['remote_auto_tlc_id'])&&(int)$this->view->userData['remote_auto_tlc_id']>0): ?>
  99. <span class="badge badge-info"><i class="fa fa-check" aria-hidden="true"></i> #<?php echo $this->view->userData['remote_auto_tlc_id']; ?></span>
  100. <?php endif; ?>
  101. <?php if((isset($this->view->userData['remote_auto_tlc'])&&(int)$this->view->userData['remote_auto_tlc']==1) && (isset($this->view->userData['remote_auto_tlc_id'])&&(int)$this->view->userData['remote_auto_tlc_id']==0)): ?>
  102. <div class="text-muted margin-bottom-10"><small>L'ID della nuova televisita sarà associato quando il paziente risponderà al questionario.</small></div>
  103. <?php endif; ?>
  104. </label>
  105. </div>
  106. <div class="form-check">
  107. <input class="form-check-input check-auto-tlc" type="radio" value="2" id="check-auto-tlc-exists" name="data[autotlc][value]" <?php echo isset($this->view->userData['remote_auto_tlc'])&&(int)$this->view->userData['remote_auto_tlc']==2 ? 'checked' : ''; ?> <?php echo $this->view->is_linked ? 'disabled' : ''; ?>>
  108. <label class="form-check-label" for="check-auto-tlc-exists">
  109. Associa questo paziente a una televisita esistente
  110. </label>
  111. </div>
  112. </div>
  113. <div class="form-group col-lg-6">
  114. <div class="auto-tlc-id <?php echo !isset($this->view->userData['remote_auto_tlc'])||(isset($this->view->userData['remote_auto_tlc'])&&$this->view->userData['remote_auto_tlc']==1) ? 'hide-control' : ''; ?>">
  115. <label class="label-main" for="profile_tlc_number">#ID televisita</label>
  116. <input type="number" class="form-control " value="<?php echo isset($this->view->userData['remote_auto_tlc_id'])&&(int)$this->view->userData['remote_auto_tlc_id']>0 ? (int)$this->view->userData['remote_auto_tlc_id'] : ''; ?>" id="profile_tlc_number" name="data[tlcid][value]" min="1" <?php echo $this->view->is_linked ? 'disabled' : ''; ?>>
  117. <!--<small class="text-muted">Indicare l'ID di un teleconsulto esistente.</small>-->
  118. </div>
  119. </div>
  120. <div class="form-group col-lg-12">
  121. <hr>
  122. </div>
  123. <!--
  124. <div class="form-group col-lg-12">
  125. <label class="label-main" for="request_delay_date">Data ricezione</label>
  126. <input type="text" class="form-control field-delay_date survey-delay_date" autocomplete="off" value="<?php echo isset($this->view->userData['msg_delay_at']) ? $this->view->userData['msg_delay_at'] : ''; ?>" id="profile_delay_date" name="data[delay_date][value]">
  127. <input type="hidden" name="data[delay_date][required]" value="0">
  128. <input type="hidden" name="data[delay_date][type]" value="text">
  129. <input type="hidden" name="data[delay_date][class]" value="field-request_delay_date">
  130. <input type="hidden" name="data[delay_date][label]" value="Data ricezione">
  131. </div>
  132. -->
  133. <div class="form-group col-lg-12">
  134. <label class="label-main" for="request_medremarks"><?php echo _('Note'); ?></label>
  135. <textarea class="form-control field-request_medremarks" name="data[request_medremarks][value]" rows="4"><?php echo isset($this->view->userData['notes']) ? strip_tags($this->view->userData['notes']) : ''; ?></textarea>
  136. <p class="text-muted"><small><b>Attenzione:</b> il testo riportato in questo campo comparirà nel referto inviato al paziente.</small></p>
  137. <input type="hidden" name="data[request_medremarks][required]" value="1">
  138. <input type="hidden" name="data[request_medremarks][type]" value="text">
  139. <input type="hidden" name="data[request_medremarks][class]" value="field-request_medremarks">
  140. <input type="hidden" name="data[request_medremarks][label]" value="<?php echo _('Note'); ?>">
  141. </div>
  142. <div class="form-group col-lg-12">
  143. <hr>
  144. </div>
  145. <div class="form-group col-lg-12">
  146. <div class="custom-control custom-radio" style="margin-bottom: 15px;">
  147. <input type="radio" id="customRadio1" name="customRadio" class="custom-control-input" <?php echo !isset($this->view->userData['msg_delay_at']) || (isset($this->view->userData['msg_delay_at']) && trim($this->view->userData['msg_delay_at'])=='') ? 'checked' : ''; ?>>
  148. <label class="custom-control-label" for="customRadio1">Invia il questionario subito</label>
  149. </div>
  150. <div class="custom-control custom-radio">
  151. <input type="radio" id="customRadio2" name="customRadio" class="custom-control-input" <?php echo isset($this->view->userData['msg_delay_at']) ? 'checked' : ''; ?>>
  152. <label class="custom-control-label" for="customRadio2">Invia il questionario in data: <input type="text" class="form-control field-delay_date survey-delay_date" autocomplete="off" value="<?php echo isset($this->view->userData['msg_delay_at']) ? $this->view->userData['msg_delay_at'] : ''; ?>" id="profile_delay_date" name="data[delay_date][value]" style="display: inline-block; width: 200px; margin-top: -6px;"></label>
  153. </div>
  154. </div>
  155. <div class="form-group col-lg-12">
  156. <hr>
  157. </div>
  158. <div class="form-group col-lg-9">
  159. <label class="label-main" for="survey_type_list">Tipo questionario*</label>
  160. <select class="form-control field-survey_types" id="survey_type_list" name="data[survey_type][value]">
  161. <option value="0">...</option>
  162. <?php foreach($this->view->survey_type_list as $id => $label): ?>
  163. <?php
  164. $selected = '';
  165. if (isset($this->view->userData['type_id'])) {
  166. $selected = $this->view->userData['type_id']==$id ? 'selected' : '';
  167. }
  168. if (count($this->view->survey_type_list) == 1) {
  169. $selected = 'selected';
  170. }
  171. ?>
  172. <option value="<?php echo $id; ?>" <?php echo $selected; ?>><?php echo $label; ?></option>
  173. <?php endforeach; ?>
  174. </select>
  175. <input type="hidden" name="data[survey_type][class]" value="field-survey_types">
  176. </div>
  177. <div class="form-group col-lg-3">
  178. <button type="button" class="btn btn-info btn-block btn-edit-survey-preview" style="margin-top:31px;">Anteprima</button>
  179. </div>
  180. </div>
  181. <hr>
  182. <div class="clearfix">
  183. <?php if(is_array($this->view->survey_type_list) && !empty($this->view->survey_type_list)): ?>
  184. <div class="float-right">
  185. <button type="button" class="btn btn-secondary btn-edit-survey" data-op="saveonly">Salva</button>
  186. <button type="button" class="btn btn-primary btn-edit-survey" data-op="savensend">Salva e invia</button>
  187. </div>
  188. <?php else: ?>
  189. <div class="alert alert-danger">Impossibile inviare la Televisita: l'utente corrente non ha nessun questionario assegnato.</div>
  190. <?php endif; ?>
  191. </div>
  192. </form>
  193. </div>
  194. </div>
  195. </div>
  196. <div class="modal" id="dialog-survey-preview" tabindex="-1" role="dialog">
  197. <div class="modal-dialog modal-lg" role="document">
  198. <div class="modal-content">
  199. <div class="modal-header">
  200. <h5 class="modal-title">Anteprima televisita</h5>
  201. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  202. <span aria-hidden="true">&times;</span>
  203. </button>
  204. </div>
  205. <div class="modal-body">
  206. <div class="text-center" id="dialog-loader"><img src="<?php echo $this->layout->getPublicUri(); ?>images/ajaxloader.svg" width="50"></div>
  207. <div class="modal-body-survey-preview"></div>
  208. </div>
  209. <div class="modal-footer">
  210. <button type="button" class="btn btn-primary" data-dismiss="modal"><?php echo _('Close'); ?></button>
  211. </div>
  212. </div>
  213. </div>
  214. </div>