您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

surveyEdit.view copy 4.php 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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-6">
  7. <h1><?php echo $this->actionTitle; ?></h1>
  8. </div>
  9. <div class="col-lg-6 clearfix">
  10. <div class="float-right">
  11. </div>
  12. </div>
  13. </div>
  14. <hr>
  15. <?php //debug($this->view->userData); ?>
  16. <form id="survey-form-edit">
  17. <input type="hidden" name="data[id][value]" value="<?php echo $this->view->id; ?>">
  18. <div class="form-row">
  19. <div class="form-group col-lg-3">
  20. <label class="label-main" for="profile_name"><?php echo _('Name'); ?>*</label>
  21. <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]">
  22. <input type="hidden" name="data[name][required]" value="1">
  23. <input type="hidden" name="data[name][type]" value="text">
  24. <input type="hidden" name="data[name][class]" value="field-name">
  25. <input type="hidden" name="data[name][label]" value="<?php echo _('Name'); ?>">
  26. </div>
  27. <div class="form-group col-lg-3">
  28. <label class="label-main" for="profile_surname"><?php echo _('Surname'); ?>*</label>
  29. <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]">
  30. <input type="hidden" name="data[surname][required]" value="1">
  31. <input type="hidden" name="data[surname][type]" value="text">
  32. <input type="hidden" name="data[surname][class]" value="field-surname">
  33. <input type="hidden" name="data[surname][label]" value="<?php echo _('Surname'); ?>">
  34. </div>
  35. <div class="form-group col-lg-3">
  36. <label class="label-main" for="profile_birthdate"><?php echo _('Birthdate'); ?>*</label>
  37. <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]">
  38. <input type="hidden" name="data[birthdate][required]" value="1">
  39. <input type="hidden" name="data[birthdate][type]" value="date">
  40. <input type="hidden" name="data[birthdate][class]" value="field-birthdate">
  41. <input type="hidden" name="data[birthdate][label]" value="<?php echo _('Birth date'); ?>">
  42. </div>
  43. <div class="form-group col-lg-3">
  44. <label class="label-main" for="profile_sex"><?php echo _('Sex'); ?>*</label>
  45. <select class="form-control field-sex" id="profile_sex" name="data[sex][value]">
  46. <option value="">...</option>
  47. <option value="f" <?php echo isset($this->view->userData['sex'])&&$this->view->userData['sex']=='f' ? 'selected' : ''; ?>>F</option>
  48. <option value="m" <?php echo isset($this->view->userData['sex'])&&$this->view->userData['sex']=='m' ? 'selected' : ''; ?>>M</option>
  49. </select>
  50. <input type="hidden" name="data[sex][required]" value="1">
  51. <input type="hidden" name="data[sex][type]" value="date">
  52. <input type="hidden" name="data[sex][class]" value="field-sex">
  53. <input type="hidden" name="data[sex][label]" value="<?php echo _('Sex'); ?>">
  54. </div>
  55. <div class="form-group col-lg-6">
  56. <label class="label-main" for="profile_email"><?php echo _('E-mail'); ?>*</label>
  57. <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]">
  58. <input type="hidden" name="data[email][required]" value="1">
  59. <input type="hidden" name="data[email][type]" value="email">
  60. <input type="hidden" name="data[email][class]" value="field-email">
  61. <input type="hidden" name="data[email][label]" value="<?php echo _('E-mail'); ?>">
  62. </div>
  63. <div class="form-group col-lg-6">
  64. <label class="label-main" for="profile_phone"><?php echo _('Phone'); ?>*</label>
  65. <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]">
  66. <input type="hidden" name="data[phone][required]" value="0">
  67. <input type="hidden" name="data[phone][type]" value="text">
  68. <input type="hidden" name="data[phone][class]" value="field-phone">
  69. <input type="hidden" name="data[phone][label]" value="<?php echo _('Phone'); ?>">
  70. </div>
  71. <div class="form-group col-lg-12">
  72. <hr>
  73. </div>
  74. <div class="form-group col-lg-6">
  75. <div class="form-check">
  76. <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' : ''; ?>>
  77. <label class="form-check-label" for="check-auto-tlc-new">
  78. Crea una nuova televisita associata a questo nuovo paziente
  79. <?php if(isset($this->view->userData['remote_auto_tlc_id'])&&(int)$this->view->userData['remote_auto_tlc_id']>0): ?>
  80. <span class="badge badge-info"><i class="fa fa-check" aria-hidden="true"></i> #<?php echo $this->view->userData['remote_auto_tlc_id']; ?></span>
  81. <?php endif; ?>
  82. <?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)): ?>
  83. <div class="text-muted margin-bottom-10"><small>L'ID della nuova televisita sarà associato quando il paziente risponderà al questionario.</small></div>
  84. <?php endif; ?>
  85. </label>
  86. </div>
  87. <div class="form-check">
  88. <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' : ''; ?>>
  89. <label class="form-check-label" for="check-auto-tlc-exists">
  90. Associa questo paziente a una televisita esistente
  91. </label>
  92. </div>
  93. </div>
  94. <div class="form-group col-lg-6">
  95. <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' : ''; ?>">
  96. <label class="label-main" for="profile_tlc_number">#ID televisita</label>
  97. <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' : ''; ?>>
  98. <!--<small class="text-muted">Indicare l'ID di un teleconsulto esistente.</small>-->
  99. </div>
  100. </div>
  101. <div class="form-group col-lg-12">
  102. <hr>
  103. </div>
  104. <div class="form-group col-lg-6">
  105. <label class="label-main" for="request_delay_date">Data ricezione</label>
  106. <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]">
  107. <input type="hidden" name="data[delay_date][required]" value="0">
  108. <input type="hidden" name="data[delay_date][type]" value="text">
  109. <input type="hidden" name="data[delay_date][class]" value="field-request_delay_date">
  110. <input type="hidden" name="data[delay_date][label]" value="Data ricezione">
  111. </div>
  112. <div class="form-group col-lg-6">
  113. <label class="label-main" for="request_medremarks"><?php echo _('Note'); ?></label>
  114. <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>
  115. <input type="hidden" name="data[request_medremarks][required]" value="1">
  116. <input type="hidden" name="data[request_medremarks][type]" value="text">
  117. <input type="hidden" name="data[request_medremarks][class]" value="field-request_medremarks">
  118. <input type="hidden" name="data[request_medremarks][label]" value="<?php echo _('Note'); ?>">
  119. </div>
  120. <div class="form-group col-lg-12">
  121. <hr>
  122. </div>
  123. <div class="form-group col-lg-9">
  124. <label class="label-main" for="survey_type_list"><?php echo _('Survey types'); ?>*</label>
  125. <select class="form-control field-survey_types" id="survey_type_list" name="data[survey_type][value]">
  126. <option value="0">...</option>
  127. <?php foreach($this->view->survey_type_list as $id => $label): ?>
  128. <?php
  129. $selected = '';
  130. if (isset($this->view->userData['type_id'])) {
  131. $selected = $this->view->userData['type_id']==$id ? 'selected' : '';
  132. }
  133. ?>
  134. <option value="<?php echo $id; ?>" <?php echo $selected; ?>><?php echo $label; ?></option>
  135. <?php endforeach; ?>
  136. </select>
  137. <input type="hidden" name="data[survey_type][class]" value="field-survey_types">
  138. </div>
  139. <div class="form-group col-lg-3">
  140. <button type="button" class="btn btn-info btn-block btn-edit-survey-preview" style="margin-top:31px;">Anteprima</button>
  141. </div>
  142. </div>
  143. <hr>
  144. <div class="clearfix">
  145. <button type="button" class="btn btn-primary btn-edit-survey float-right"><?php echo _('Send'); ?></button>
  146. </div>
  147. </form>
  148. </div>
  149. </div>
  150. </div>
  151. <div class="modal" id="dialog-survey-preview" tabindex="-1" role="dialog">
  152. <div class="modal-dialog modal-lg" role="document">
  153. <div class="modal-content">
  154. <div class="modal-header">
  155. <h5 class="modal-title"><?php echo _('Survey preview'); ?></h5>
  156. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  157. <span aria-hidden="true">&times;</span>
  158. </button>
  159. </div>
  160. <div class="modal-body">
  161. <div class="text-center" id="dialog-loader"><img src="<?php echo $this->layout->getPublicUri(); ?>images/ajaxloader.svg" width="50"></div>
  162. <div class="modal-body-survey-preview"></div>
  163. </div>
  164. <div class="modal-footer">
  165. <button type="button" class="btn btn-primary" data-dismiss="modal"><?php echo _('Close'); ?></button>
  166. </div>
  167. </div>
  168. </div>
  169. </div>