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

index.view.php 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. <?php
  15. //if (is_array($this->view->centerData)):
  16. if(true) :
  17. ?>
  18. <form id="center-form">
  19. <input type="hidden" name="data[center_id][value]" value="<?php echo $this->view->centerId; ?>">
  20. <input type="hidden" name="data[center_id][required]" value="0">
  21. <div class="form-row">
  22. <div class="form-group col-lg-12">
  23. <hr>
  24. <h4 class="text-center"><?php echo _('Clinical center information'); ?></h4>
  25. <hr>
  26. </div>
  27. <div class="form-group col-lg-8">
  28. <label class="label-main" for="profile_description"><?php echo _('Clinical center name'); ?></label>
  29. <input type="text" class="form-control field-description" value="<?php echo isset($this->view->centerData['description']) ? $this->utility->sureHtml($this->view->centerData['description']) : ''; ?>" id="profile_description" name="data[description][value]">
  30. <input type="hidden" name="data[description][required]" value="1">
  31. <input type="hidden" name="data[description][type]" value="text">
  32. <input type="hidden" name="data[description][class]" value="field-description">
  33. <input type="hidden" name="data[description][label]" value="<?php echo _('Clinical center name'); ?>">
  34. </div>
  35. <div class="form-group col-lg-4">
  36. <label class="label-main"><?php echo _('Anonymize'); ?></label>
  37. <div>
  38. <div class="form-check form-check-inline">
  39. <input type="hidden" name="data[anonymize][value]" value="0">
  40. <input class="form-check-input" type="checkbox" id="profile-anonymize" value="1" name="data[anonymize][value]"
  41. <?php echo (int)$this->view->centerData['anonymize'] == 1 ? 'checked' : ''; ?>
  42. >
  43. <label class="form-check-label" for="profile-anonymize ?>"><?php echo _('Yes') . '/' . _('No'); ?></label>
  44. <input type="hidden" name="data[anonymize][required]" value="0">
  45. <input type="hidden" name="data[anonymize][type]" value="checkbox">
  46. <input type="hidden" name="data[anonymize][class]" value="field-anonymize">
  47. <input type="hidden" name="data[anonymize][label]" value="<?php echo _('Anonymize'); ?>">
  48. </div>
  49. </div>
  50. </div>
  51. <div class="form-group col-lg-6">
  52. <label class="label-main" for="profile_continent_code"><?php echo _('Continent'); ?></label>
  53. <select class="form-control field-continent_code" id="profile_continent_code" name="data[continent_code][value]">
  54. <?php foreach($this->view->continents as $continent): ?>
  55. <option <?php echo $continent['code'] == $this->view->centerData['continent_code'] ? 'selected' : '' ?> value="<?php echo $continent['code']; ?>"><?php echo $continent['name']; ?></option>
  56. <?php endforeach; ?>
  57. </select>
  58. <input type="hidden" name="data[continent_code][required]" value="1">
  59. <input type="hidden" name="data[continent_code][type]" value="select">
  60. <input type="hidden" name="data[continent_code][class]" value="field-continent_code">
  61. <input type="hidden" name="data[continent_code][label]" value="<?php echo _('Continent'); ?>">
  62. </div>
  63. <div class="form-group col-lg-6">
  64. <label class="label-main" for="profile_country_code"><?php echo _('Country'); ?></label>
  65. <select class="form-control field-country_code" id="profile_country_code" name="data[country_code][value]" <?php echo !$this->view->isEditing ? 'disabled' : ''; ?>>
  66. <?php foreach($this->view->countries as $country): ?>
  67. <option <?php echo $country['code'] == $this->view->centerData['country_code'] ? 'selected' : '' ?> value="<?php echo $country['code']; ?>"><?php echo $country['name']; ?></option>
  68. <?php endforeach; ?>
  69. </select>
  70. <input type="hidden" name="data[country_code][required]" value="1">
  71. <input type="hidden" name="data[country_code][type]" value="select">
  72. <input type="hidden" name="data[country_code][class]" value="field-country_code">
  73. <input type="hidden" name="data[country_code][label]" value="<?php echo _('Country'); ?>">
  74. </div>
  75. <div class="form-group col-lg-12">
  76. <label class="label-main" for="profile_address"><?php echo _('Address'); ?></label> <?php //htmlspecialchars($string, ENT_HTML5, 'UTF-8'); ?>
  77. <input type="text" class="form-control field-address" value="<?php echo isset($this->view->centerData['address']) ? $this->utility->sureHtml($this->view->centerData['address']) : ''; ?>" id="profile_address" name="data[address][value]">
  78. <input type="hidden" name="data[address][required]" value="0">
  79. <input type="hidden" name="data[address][type]" value="text">
  80. <input type="hidden" name="data[address][class]" value="field-address">
  81. <input type="hidden" name="data[address][label]" value="<?php echo _('Address'); ?>">
  82. </div>
  83. <div class="form-group col-lg-6">
  84. <label class="label-main" for="profile_lat"><?php echo _('Latitude'); ?></label>
  85. <input type="text" class="form-control field-lat" value="<?php echo isset($this->view->centerData['lat']) && $this->view->centerData['lat']!=0 ? $this->view->centerData['lat'] : ''; ?>" id="profile_lat" name="data[lat][value]">
  86. <input type="hidden" name="data[lat][required]" value="0">
  87. <input type="hidden" name="data[lat][type]" value="text">
  88. <input type="hidden" name="data[lat][class]" value="field-lat">
  89. <input type="hidden" name="data[lat][label]" value="<?php echo _('Latitude'); ?>">
  90. </div>
  91. <div class="form-group col-lg-6">
  92. <label class="label-main" for="profile_lng"><?php echo _('Longitude'); ?></label>
  93. <input type="text" class="form-control field-lng" value="<?php echo isset($this->view->centerData['lng']) && $this->view->centerData['lng']!=0 ? $this->view->centerData['lng'] : ''; ?>" id="profile_lng" name="data[lng][value]">
  94. <input type="hidden" name="data[lng][required]" value="0">
  95. <input type="hidden" name="data[lng][type]" value="text">
  96. <input type="hidden" name="data[lng][class]" value="field-lng">
  97. <input type="hidden" name="data[lng][label]" value="<?php echo _('Longitude'); ?>">
  98. </div>
  99. <div class="form-group col-lg-12">
  100. <label class="label-main" for="profile_notes"><?php echo _('Notes'); ?></label>
  101. <textarea class="form-control field-notes" id="profile_notes" name="data[notes][value]" rows="4"><?php echo isset($this->view->centerData['notes']) ? $this->utility->sureHtml($this->view->centerData['notes']) : ''; ?></textarea>
  102. <input type="hidden" name="data[notes][required]" value="0">
  103. <input type="hidden" name="data[notes][type]" value="textarea">
  104. <input type="hidden" name="data[notes][class]" value="field-notes">
  105. <input type="hidden" name="data[notes][label]" value="<?php echo _('Notes'); ?>">
  106. </div>
  107. <div class="form-group col-lg-12">
  108. <hr>
  109. <h4 class="text-center"><?php echo _('Medical specialties association'); ?></h4>
  110. <hr>
  111. </div>
  112. <div class="col-lg">
  113. <label class="label-main" for="profile_medical_specialties"><?php echo _('Medical specialties'); ?></label>
  114. </div>
  115. <div class="col-lg-auto clearfix">
  116. <div class="float-right">
  117. <div class="btn-group" role="group">
  118. <button type="button" class="btn btn-outline-primary btn-sm font-weight-bold btn-all-medical_specialties" data-action="select"><?php echo _('Select all') ?></button>
  119. <button type="button" class="btn btn-outline-primary btn-sm font-weight-bold btn-all-medical_specialties" data-action="deselect"><?php echo _('Deselect all') ?></button>
  120. </div>
  121. </div>
  122. </div>
  123. <div class="form-group col-lg-12">
  124. <select multiple class="form-control field-medical_specialties chosen-select" id="profile_medical_specialties" name="data[medical_specialties][value][]">
  125. <?php $inactive_specilties_msg = ''; ?>
  126. <?php foreach ($this->view->allSpecialties as $specialty) : ?>
  127. <?php if((int)$specialty['status'] == 1): ?>
  128. <option class="medical_specialty" value="<?php echo $specialty['id']; ?>"
  129. <?php
  130. if(isset($this->view->centerData['medical_specialties']) && is_array($this->view->centerData['medical_specialties']))
  131. echo in_array($specialty['id'], $this->view->centerData['medical_specialties']) ? 'selected' : '';
  132. ?>
  133. ><?php echo _($specialty['description']); ?></option>
  134. <?php endif; ?>
  135. <?php if(isset($this->view->centerData['medical_specialties']) && is_array($this->view->centerData['medical_specialties'])) : ?>
  136. <?php if((int)$specialty['status'] == 0 && in_array($specialty['id'], $this->view->centerData['medical_specialties'])) : ?>
  137. <?php $inactive_specilties_msg .= ' ' . _($specialty['description']) . ','; ?>
  138. <option class="medical_specialty" value="<?php echo $specialty['id']; ?>" selected><?php echo _($specialty['description']); ?></option>
  139. <?php endif; ?>
  140. <?php endif; ?>
  141. <?php endforeach; ?>
  142. </select>
  143. <!-- <?php if($inactive_specilties_msg != ''): ?> -->
  144. <div class="small font-weight-bold text-danger">
  145. <?php echo _('No more active medical specialties are assigned:') . substr($inactive_specilties_msg, 0, -1) . ('.'); ?>
  146. </div>
  147. <!-- <?php endif; ?> -->
  148. <input type="hidden" name="data[medical_specialties][required]" value="0">
  149. <input type="hidden" name="data[medical_specialties][type]" value="multiselect">
  150. <input type="hidden" name="data[medical_specialties][class]" value="field-medical_specialties">
  151. <input type="hidden" name="data[medical_specialties][label]" value="<?php echo _('Medical specialties'); ?>">
  152. </div>
  153. <div class="form-group col-lg-12">
  154. <hr>
  155. <h4 class="text-center"><?php echo _('Medical devices'); ?></h4>
  156. <hr>
  157. </div>
  158. </div>
  159. <div class="form-row">
  160. <?php debug($this->view->DEBUG); ?>
  161. <hr>
  162. <?php debug($this->view->centerData); ?>
  163. </div>
  164. <hr>
  165. <div class="clearfix">
  166. <button type="button" class="btn btn-primary btn-center-save float-right"><?php echo _('Save'); ?></button>
  167. </div>
  168. </form>
  169. <?php else: ?>
  170. <div class="alert alert-warning" role="alert"><?php echo _("Unable to get user's information right now. Please try in a few minutes."); ?></div>
  171. <?php endif; ?>
  172. </div>
  173. </div>
  174. </div>