You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  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 if (is_array($this->view->userData)): ?>
  16. <form id="user-form-edit">
  17. <input type="hidden" name="data[user_id][value]" value="<?php echo $this->view->userId; ?>">
  18. <input type="hidden" name="data[user_id][required]" value="0">
  19. <div class="form-row">
  20. <div class="form-group col-lg-12">
  21. <h4 class="text-center"><?php echo _('Account information'); ?></h4>
  22. <hr>
  23. </div>
  24. <div class="form-group col-lg-12">
  25. <label class="label-main" for="profile_username"><?php echo _('Username'); ?></label>
  26. <input type="text" class="form-control field-username" value="<?php echo isset($this->view->userData['username']) ? $this->view->userData['username'] : ''; ?>" id="profile_username" name="data[username][value]">
  27. <input type="hidden" name="data[username][required]" value="1">
  28. <input type="hidden" name="data[username][type]" value="text">
  29. <input type="hidden" name="data[username][class]" value="field-username">
  30. <input type="hidden" name="data[username][label]" value="<?php echo _('Username'); ?>">
  31. </div>
  32. <div class="form-group col-lg-6">
  33. <label class="label-main" for="profile_passwd1"><?php echo _('Password'); ?></label>
  34. <input type="password" class="form-control field-passwd1" value="" id="profile_passwd1" name="data[profile_passwd1][value]">
  35. <small class="form-text text-muted"><?php echo _('Provide a new password to change the current one.'); ?></small>
  36. <input type="hidden" name="data[profile_passwd1][required]" value="0">
  37. <input type="hidden" name="data[profile_passwd1][type]" value="password1">
  38. <input type="hidden" name="data[profile_passwd1][class]" value="field-passwd1">
  39. <input type="hidden" name="data[profile_passwd1][label]" value="<?php echo _('Password'); ?>">
  40. </div>
  41. <div class="form-group col-lg-6">
  42. <label class="label-main" for="profile_passwd2"><?php echo _('Confirm password'); ?></label>
  43. <input type="password" class="form-control field-passwd2" value="" id="profile_passwd2" name="data[profile_passwd2][value]">
  44. <input type="hidden" name="data[profile_passwd2][required]" value="0">
  45. <input type="hidden" name="data[profile_passwd2][type]" value="password2">
  46. <input type="hidden" name="data[profile_passwd2][class]" value="field-passwd2">
  47. <input type="hidden" name="data[profile_passwd2][label]" value="<?php echo _('Confirm password'); ?>">
  48. </div>
  49. <div class="form-group col-lg-6">
  50. <label class="label-main" for="profile_default_lang"><?php echo _('First language'); ?></label>
  51. <select class="form-control" id="profile_default_lang" name="data[default_lang][value]">
  52. <?php foreach($this->view->supportedLanguages as $language): ?>
  53. <option <?php echo isset($language['selected']) && $language['selected'] ? 'selected' : ''; ?> value="<?php echo $language['lang_code']; ?>"><?php echo $language['name_string']; ?></option>
  54. <?php endforeach; ?>
  55. </select>
  56. </div>
  57. <div class="form-group col-lg-6">
  58. <label class="label-main"><?php echo _('Alternative languages'); ?></label>
  59. <div>
  60. <?php foreach($this->view->userAltLanguages as $index => $language): ?>
  61. <div class="form-check form-check-inline">
  62. <input class="form-check-input" type="checkbox" id="alt-lang-<?php echo $index; ?>" value="<?php echo $language['id']; ?>" <?php echo isset($language['checked']) && $language['checked'] ? 'checked' : ''; ?> name="data[alt_langs][value][<?php echo $language['id']; ?>]">
  63. <label class="form-check-label" for="alt-lang-<?php echo $index; ?>"><?php echo $language['name_string']; ?></label>
  64. </div>
  65. <?php endforeach; ?>
  66. </div>
  67. </div>
  68. <div class="form-group col-lg-6">
  69. <label class="label-main" for="profile_puremarks"><?php echo vsprintf(_('(Public) Remarks (Max. %s char.)'), $this->config['settings']['public-remarks-size']); ?></label>
  70. <textarea rows="4" class="form-control field-puremarks" id="profile_puremarks" name="data[public_remarks][value]"><?php echo isset($this->view->userData['remarks_public']) ? $this->view->userData['remarks_public'] : ''; ?></textarea>
  71. <input type="hidden" name="data[public_remarks][required]" value="0">
  72. <input type="hidden" name="data[public_remarks][type]" value="text">
  73. <input type="hidden" name="data[public_remarks][class]" value="ield-puremarks">
  74. <input type="hidden" name="data[public_remarks][label]" value="<?php echo _('(Public) Remarks'); ?>">
  75. </div>
  76. <div class="form-group col-lg-6">
  77. <label class="label-main" for="field-prremarks"><?php echo _('(Private) Remarks'); ?></label>
  78. <textarea rows="4" class="form-control field-remarks" id="field-prremarks" name="data[private_remarks][value]"><?php echo isset($this->view->userData['remarks_private']) ? $this->view->userData['remarks_private'] : ''; ?></textarea>
  79. <input type="hidden" name="data[private_remarks][required]" value="0">
  80. <input type="hidden" name="data[private_remarks][type]" value="text">
  81. <input type="hidden" name="data[private_remarks][class]" value="field-remarks">
  82. <input type="hidden" name="data[private_remarks][label]" value="<?php echo _('(Private) Remarks'); ?>">
  83. </div>
  84. <div class="form-group col-lg-6">
  85. <label class="label-main"><?php echo _('Status'); ?></label>
  86. <input type="hidden" name="data[status][value]" value="0">
  87. <div class="clearfix">
  88. <div class="form-check form-check-inline">
  89. <input <?php echo $this->view->isSelf ? 'disabled' : ''; ?> class="form-check-input" type="radio" id="user-status-1" value="1" <?php echo !isset($this->view->userData['status']) || (isset($this->view->userData['status']) && (int)$this->view->userData['status'] == 1) ? 'checked' : ''; ?> name="data[status][value]">
  90. <label class="form-check-label" for="user-status"><?php echo _('Active'); ?></label>
  91. </div>
  92. <div class="form-check form-check-inline">
  93. <input <?php echo $this->view->isSelf ? 'disabled' : ''; ?> class="form-check-input" type="radio" id="user-status-0" value="0" <?php echo isset($this->view->userData['status']) && (int)$this->view->userData['status'] == 0 ? 'checked' : ''; ?> name="data[status][value]">
  94. <label class="form-check-label" for="user-status"><?php echo _('Not active'); ?></label>
  95. </div>
  96. <div class="form-check form-check-inline">
  97. <input <?php echo $this->view->isSelf ? 'disabled' : ''; ?> class="form-check-input" type="radio" id="user-status-2" value="2" <?php echo isset($this->view->userData['status']) && (int)$this->view->userData['status'] == 2 ? 'checked' : ''; ?> name="data[status][value]">
  98. <label class="form-check-label" for="user-status"><?php echo STATUS_TECH_NAME; ?></label>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="form-group col-lg-12">
  103. <hr>
  104. <h4 class="text-center"><?php echo _('Personal information'); ?></h4>
  105. <hr>
  106. </div>
  107. <div class="form-group col-lg-6">
  108. <label class="label-main" for="profile_name"><?php echo _('Name'); ?></label>
  109. <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]">
  110. <input type="hidden" name="data[name][required]" value="1">
  111. <input type="hidden" name="data[name][type]" value="text">
  112. <input type="hidden" name="data[name][class]" value="field-name">
  113. <input type="hidden" name="data[name][label]" value="<?php echo _('Name'); ?>">
  114. </div>
  115. <div class="form-group col-lg-6">
  116. <label class="label-main" for="profile_surname"><?php echo _('Surname'); ?></label>
  117. <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]">
  118. <input type="hidden" name="data[surname][required]" value="1">
  119. <input type="hidden" name="data[surname][type]" value="text">
  120. <input type="hidden" name="data[surname][class]" value="field-surname">
  121. <input type="hidden" name="data[surname][label]" value="<?php echo _('Surname'); ?>">
  122. </div>
  123. <div class="form-group col-md-6 mb-3">
  124. <label class="label-main" for="user_country"><?php echo _('Country'); ?></label>
  125. <select class="form-control field-country chosen-select" name="data[country][value]" id="user_country">
  126. <option value="0">...</option>
  127. <?php if(is_array($this->view->countries)): ?>
  128. <?php foreach($this->view->countries as $country): ?>
  129. <option value="<?php echo $country['country_iso2_code']; ?>" <?php echo (isset($this->view->userData['country_code']) && ($this->view->userData['country_code'] == $country['country_iso2_code'])) ? 'selected' : ''; ?>><?php echo $country['country_name']; ?></option>
  130. <?php endforeach; ?>
  131. <?php endif; ?>
  132. </select>
  133. <input type="hidden" name="data[country][required]" value="1">
  134. <input type="hidden" name="data[country][type]" value="text">
  135. <input type="hidden" name="data[country][class]" value="field-country">
  136. <input type="hidden" name="data[country][label]" value="<?php echo _('Country'); ?>">
  137. </div>
  138. <div class="form-group col-md-1 mb-3 text-center">
  139. <!--<div class="edit-avatar" id="edit-user-avatar" style="background-image: url(<?php echo $this->view->userAvatar, '?t=', time(); ?>);"></div>-->
  140. <?php
  141. echo $this->helper->setAvatarView($this->view->userAvatarImage, ['class'=>'edit-avatar', 'cssId'=>'edit-user-avatar']);
  142. ?>
  143. </div>
  144. <div class="form-group col-md-5 mb-3">
  145. <?php echo $this->partial('User/avatar'); ?>
  146. </div>
  147. <?php /*
  148. <div class="form-group col-lg-6">
  149. <label class="label-main" for="profile_fiscal_code"><?php echo _('Fiscal code'); ?></label>
  150. <input type="text" class="form-control field-fiscal-code" value="<?php echo isset($this->view->userData['fiscal_code']) ? $this->view->userData['fiscal_code'] : ''; ?>" id="profile_fiscal_code" name="data[fiscal_code][value]">
  151. <input type="hidden" name="data[fiscal_code][required]" value="0">
  152. <input type="hidden" name="data[fiscal_code][type]" value="text">
  153. <input type="hidden" name="data[fiscal_code][class]" value="field-fiscal-code">
  154. <input type="hidden" name="data[fiscal_code][label]" value="<?php echo _('Fiscal code'); ?>">
  155. </div>
  156. <div class="form-group col-lg-6">
  157. <label class="label-main" for="profile_birth_date"><?php echo _('Birth date'); ?></label>
  158. <input type="date" class="form-control field-birth-date" value="<?php echo isset($this->view->userData['birth_date']) ? $this->view->userData['birth_date'] : ''; ?>" id="profile_birth_date" name="data[birth_date][value]">
  159. <input type="hidden" name="data[birth_date][required]" value="0">
  160. <input type="hidden" name="data[birth_date][type]" value="text">
  161. <input type="hidden" name="data[birth_date][class]" value="field-birth-date">
  162. <input type="hidden" name="data[birth_date][label]" value="<?php echo _('Birth date'); ?>">
  163. </div>
  164. <div class="form-group col-lg-6">
  165. <label class="label-main" for="profile_city_birth"><?php echo _('City birth'); ?></label>
  166. <input type="text" class="form-control field-city-birth" value="<?php echo isset($this->view->userData['city_birth']) ? $this->view->userData['city_birth'] : ''; ?>" id="profile_city_birth" name="data[city_birth][value]">
  167. <input type="hidden" name="data[city_birth][required]" value="0">
  168. <input type="hidden" name="data[city_birth][type]" value="text">
  169. <input type="hidden" name="data[city_birth][class]" value="field-city-birth">
  170. <input type="hidden" name="data[city_birth][label]" value="<?php echo _('City birth'); ?>">
  171. </div>
  172. <div class="form-group col-lg-6">
  173. <label class="label-main" for="profile_province_birth"><?php echo _('Province birth'); ?></label>
  174. <input type="text" class="form-control field-province-birth" value="<?php echo isset($this->view->userData['province_birth']) ? $this->view->userData['province_birth'] : ''; ?>" id="profile_province_birth" name="data[province_birth][value]">
  175. <input type="hidden" name="data[province_birth][required]" value="0">
  176. <input type="hidden" name="data[province_birth][type]" value="text">
  177. <input type="hidden" name="data[province_birth][class]" value="field-province-birth">
  178. <input type="hidden" name="data[province_birth][label]" value="<?php echo _('Province birth'); ?>">
  179. </div>
  180. <div class="form-group col-lg-12" style="border-bottom: 1px solid #888888; border-top: 1px solid #888888; padding-top:10px">
  181. <label><?php echo _('Residence info'); ?></label>
  182. </div>
  183. <div class="form-group col-lg-6">
  184. <label class="label-main" for="profile_residence_province"><?php echo _('Province residence'); ?></label>
  185. <input type="text" class="form-control field-residence-province" value="<?php echo isset($this->view->userData['residence_province']) ? $this->view->userData['residence_province'] : ''; ?>" id="profile_residence_province" name="data[residence_province][value]">
  186. <input type="hidden" name="data[residence_province][required]" value="0">
  187. <input type="hidden" name="data[residence_province][type]" value="text">
  188. <input type="hidden" name="data[residence_province][class]" value="field-residence-province">
  189. <input type="hidden" name="data[residence_province][label]" value="<?php echo _('Province residence'); ?>">
  190. </div>
  191. <div class="form-group col-lg-6">
  192. <label class="label-main" for="profile_residence_city"><?php echo _('City residence'); ?></label>
  193. <input type="text" class="form-control field-residence-city" value="<?php echo isset($this->view->userData['residence_city']) ? $this->view->userData['residence_city'] : ''; ?>" id="profile_residence_city" name="data[residence_city][value]">
  194. <input type="hidden" name="data[residence_city][required]" value="0">
  195. <input type="hidden" name="data[residence_city][type]" value="text">
  196. <input type="hidden" name="data[residence_city][class]" value="field-residence-city">
  197. <input type="hidden" name="data[residence_city][label]" value="<?php echo _('City residence'); ?>">
  198. </div>
  199. <div class="form-group col-lg-6">
  200. <label class="label-main" for="profile_residence_address"><?php echo _('Address residence'); ?></label>
  201. <input type="text" class="form-control field-residence-address" value="<?php echo isset($this->view->userData['residence_address']) ? $this->view->userData['residence_address'] : ''; ?>" id="profile_residence_address" name="data[residence_address][value]">
  202. <input type="hidden" name="data[residence_address][required]" value="0">
  203. <input type="hidden" name="data[residence_address][type]" value="text">
  204. <input type="hidden" name="data[residence_address][class]" value="field-residence-address">
  205. <input type="hidden" name="data[residence_address][label]" value="<?php echo _('Address residence'); ?>">
  206. </div>
  207. <div class="form-group col-lg-12" style="border-bottom: 1px solid #888888; border-top: 1px solid #888888; padding-top:10px">
  208. <label><?php echo _('Domicile info'); ?></label>
  209. </div>
  210. <div class="form-group col-lg-6">
  211. <label class="label-main" for="profile_domicile_province"><?php echo _('Province domicile'); ?></label>
  212. <input type="text" class="form-control field-domicile-province" value="<?php echo isset($this->view->userData['domicile_province']) ? $this->view->userData['domicile_province'] : ''; ?>" id="profile_domicile_province" name="data[domicile_province][value]">
  213. <input type="hidden" name="data[domicile_province][required]" value="0">
  214. <input type="hidden" name="data[domicile_province][type]" value="text">
  215. <input type="hidden" name="data[domicile_province][class]" value="field-domicile-province">
  216. <input type="hidden" name="data[domicile_province][label]" value="<?php echo _('Province domicile'); ?>">
  217. </div>
  218. <div class="form-group col-lg-6">
  219. <label class="label-main" for="profile_domicile_city"><?php echo _('City domicile'); ?></label>
  220. <input type="text" class="form-control field-domicile-city" value="<?php echo isset($this->view->userData['domicile_city']) ? $this->view->userData['domicile_city'] : ''; ?>" id="profile_domicile_city" name="data[domicile_city][value]">
  221. <input type="hidden" name="data[domicile_city][required]" value="0">
  222. <input type="hidden" name="data[domicile_city][type]" value="text">
  223. <input type="hidden" name="data[domicile_city][class]" value="field-domicile-city">
  224. <input type="hidden" name="data[domicile_city][label]" value="<?php echo _('City domicile'); ?>">
  225. </div>
  226. <div class="form-group col-lg-6">
  227. <label class="label-main" for="profile_domicile_address"><?php echo _('Address domicile'); ?></label>
  228. <input type="text" class="form-control field-domicile-address" value="<?php echo isset($this->view->userData['domicile_address']) ? $this->view->userData['domicile_address'] : ''; ?>" id="profile_domicile_address" name="data[domicile_address][value]">
  229. <input type="hidden" name="data[domicile_address][required]" value="0">
  230. <input type="hidden" name="data[domicile_address][type]" value="text">
  231. <input type="hidden" name="data[domicile_address][class]" value="field-domicile-address">
  232. <input type="hidden" name="data[domicile_address][label]" value="<?php echo _('Address domicile'); ?>">
  233. </div>
  234. */ ?>
  235. <div class="form-group col-lg-12">
  236. <hr>
  237. <h4 class="text-center"><?php echo _('Role details'); ?></h4>
  238. <hr>
  239. </div>
  240. <!-- <div class="form-group col-md-6 mb-3">
  241. <label class="label-main"><?php echo _('Roles'); ?></label>
  242. <div>
  243. <?php foreach($this->view->roles as $index => $roleItem): ?>
  244. <div class="form-check form-check-inline">
  245. <input class="form-check-input" type="checkbox" id="alt-role-<?php echo $index; ?>" value="<?php echo $roleItem['id']; ?>" <?php echo isset($roleItem['checked']) && $roleItem['checked'] ? 'checked' : ''; ?> name="data[role][value][<?php echo $roleItem['id']; ?>]">
  246. <label class="form-check-label" for="alt-role-<?php echo $index; ?>"><?php echo $roleItem['name']; ?></label>
  247. </div>
  248. <?php endforeach; ?>
  249. </div>
  250. </div> -->
  251. <div class="form-group col-md-6 mb-3">
  252. <label class="label-main"><?php echo _('Roles'); ?></label>
  253. <div>
  254. <?php /*if($this->config['settings']['free'] == 0){ ?>
  255. <div class="form-check form-check-inline" data-toggle="tooltip" data-placement="top" title="<?php echo _('Free')." ".($this->view->getMaxAddAdmins-$this->view->getTotAdmins); ?>">
  256. <input class="form-check-input" type="checkbox" id="alt-role-0" value="2" name="data[role][value][2]" <?php echo ($this->view->getUserHasRoles[2]) && $this->view->getUserHasRoles[2] ? "checked" : (($this->view->getMaxAddAdmins-$this->view->getTotAdmins) > 0 ? "" : "disabled"); ?> >
  257. <label class="form-check-label" for="alt-role-0"><?php echo _('Administrator'); ?></label>
  258. </div>
  259. <div class="form-check form-check-inline" data-toggle="tooltip" data-placement="top" title="<?php echo _('Free')." ".($this->view->getMaxAddModerators-$this->view->getTotModerators); ?>">
  260. <input class="form-check-input" type="checkbox" id="alt-role-1" value="3" name="data[role][value][3]" <?php echo ($this->view->getUserHasRoles[3] ) && $this->view->getUserHasRoles[3] ? "checked" : ( ($this->view->getMaxAddModerators-$this->view->getTotModerators) > 0 ? "" : "disabled"); ?> >
  261. <label class="form-check-label" for="alt-role-1"><?php echo _('Moderator'); ?></label>
  262. </div>
  263. <div class="form-check form-check-inline" data-toggle="tooltip" data-placement="top" title="<?php echo _('Free')." ".($this->view->getMaxAddResponders-$this->view->getTotResponders); ?>">
  264. <input class="form-check-input" type="checkbox" id="alt-role-3" value="4" name="data[role][value][4]" <?php echo ($this->view->getUserHasRoles[4] ) && $this->view->getUserHasRoles[4] ? "checked" : ( ($this->view->getMaxAddResponders-$this->view->getTotResponders) > 0 ? "" : "disabled"); ?> >
  265. <label class="form-check-label" for="alt-role-3"><?php echo _('Responder'); ?></label>
  266. </div>
  267. <div class="form-check form-check-inline" data-toggle="tooltip" data-placement="top" title="<?php echo _('Free')." ".($this->view->getMaxAddRequesters-$this->view->getTotRequesters); ?>">
  268. <input class="form-check-input" type="checkbox" id="alt-role-4" value="5" name="data[role][value][5]" <?php echo ($this->view->getUserHasRoles[5] ) && $this->view->getUserHasRoles[5] ? "checked" : (($this->view->getMaxAddRequesters-$this->view->getTotRequesters) > 0 ? "" : "disabled"); ?> >
  269. <label class="form-check-label" for="alt-role-4"><?php echo _('Requester'); ?></label>
  270. </div>
  271. <div class="form-check form-check-inline" data-toggle="tooltip" data-placement="top" title="<?php echo _('Free')." ".($this->view->getMaxAddGuests-$this->view->getTotGuests); ?>">
  272. <input class="form-check-input" type="checkbox" id="alt-role-2" value="6" name="data[role][value][6]" <?php echo ($this->view->getUserHasRoles[6] ) && $this->view->getUserHasRoles[6] ? "checked" : (($this->view->getMaxAddGuests-$this->view->getTotGuests) > 0 ? "" : "disabled"); ?> >
  273. <label class="form-check-label" for="alt-role-2"><?php echo _('Guest'); ?></label>
  274. </div>
  275. <?php
  276. }else{*/
  277. foreach($this->view->roles as $index => $roleItem): ?>
  278. <div class="form-check form-check-inline">
  279. <input class="form-check-input" type="checkbox" id="alt-role-<?php echo $index; ?>" value="<?php echo $roleItem['id']; ?>" <?php echo isset($roleItem['checked']) && $roleItem['checked'] ? 'checked' : ''; ?> name="data[role][value][<?php echo $roleItem['id']; ?>]"
  280. <?php
  281. if ($this->config['settings']['free'] == 0) {
  282. switch($roleItem['id']) {
  283. case MODERATOR_ROLE_ID:
  284. echo $this->view->getMaxAddModerators-$this->view->getTotModerators <= 0 ? 'disabled' : '';
  285. break;
  286. case REFERRER_ROLE_ID:
  287. echo $this->view->getMaxAddResponders-$this->view->getTotResponders <= 0 ? 'disabled' : '';
  288. break;
  289. case APPLICANT_ROLE_ID:
  290. echo $this->view->getMaxAddRequesters-$this->view->getTotRequesters <= 0 ? 'disabled' : '';
  291. break;
  292. case GUEST_ROLE_ID:
  293. echo $this->view->getMaxAddGuests-$this->view->getTotGuests <= 0 ? 'disabled' : '';
  294. break;
  295. }
  296. }
  297. ?>
  298. >
  299. <label class="form-check-label" for="alt-role-<?php echo $index; ?>"><?php echo $roleItem['name']; ?></label>
  300. </div>
  301. <?php endforeach;
  302. //}
  303. ?>
  304. </div>
  305. </div>
  306. <div class="form-group col-md-6 mb-3">
  307. <label class="label-main" for="med_specialties"><?php echo _('Medical specialties (Responder)'); ?></label>
  308. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-med_specialties chosen-select" multiple="multiple" name="data[med_specialties][value][]" id="med_specialties">
  309. <?php if(is_array($this->view->medicalSpecialties)): ?>
  310. <?php foreach($this->view->medicalSpecialties as $specialty): ?>
  311. <?php
  312. $selected = isset($this->view->userMedicalSpecialties[$specialty['id']]) ? 'selected' : '';
  313. ?>
  314. <option value="<?php echo $specialty['id']; ?>" <?php echo $selected; ?>><?php echo $specialty['description']; ?></option>
  315. <?php endforeach; ?>
  316. <?php endif; ?>
  317. </select>
  318. <input type="hidden" name="data[med_specialties][required]" value="0">
  319. <input type="hidden" name="data[med_specialties][type]" value="text">
  320. <input type="hidden" name="data[med_specialties][class]" value="field-med_specialties">
  321. <input type="hidden" name="data[med_specialties][label]" value="<?php echo _('Medical specialties'); ?>">
  322. </div>
  323. <!-- <div class="form-group col-md-3 mb-3">
  324. <label class="label-main" for="responder_structure"><?php echo _('Structure (Responder)'); ?></label>
  325. <select class="form-control" name="data[responder_structure][value][]" id="responder_structure">
  326. <?php /*if(is_array($this->view->medicalSpecialties)): ?>
  327. <?php foreach($this->view->medicalSpecialties as $specialty): ?>
  328. <?php
  329. $selected = isset($this->view->userMedicalSpecialties[$specialty['id']]) ? 'selected' : '';
  330. ?>
  331. <option value="<?php echo $specialty['id']; ?>" <?php echo $selected; ?>><?php echo $specialty['description']; ?></option>
  332. <?php endforeach; ?>
  333. <?php endif;*/ ?>
  334. </select>
  335. <input type="hidden" name="data[responder_structure][required]" value="0">
  336. <input type="hidden" name="data[responder_structure][type]" value="text">
  337. <input type="hidden" name="data[responder_structure][class]" value="field-responder_structure">
  338. <input type="hidden" name="data[responder_structure][label]" value="<?php echo _('Structure (Responder)'); ?>">
  339. </div> -->
  340. <div class="form-group col-md-5">
  341. <label class="label-main" for="cn_applicant"><?php echo _('Country filter (Requester)'); ?></label>
  342. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cn_applicant chosen-select" multiple="multiple" id="cn_applicant" <?php echo ($this->view->getUserHasRoles[5] ) && $this->view->getUserHasRoles[5] ? "" : (($this->view->getMaxAddRequesters-$this->view->getTotRequesters) > 0 ? "" : "disabled"); ?> >
  343. <?php if(is_array($this->view->clinicalCenterCountries)): ?>
  344. <?php foreach($this->view->clinicalCenterCountries as $countryCode => $ccCountry): ?>
  345. <optgroup label="<?php echo $ccCountry['name']; ?>">
  346. <option value="all|<?php echo $countryCode; ?>"><?php echo vsprintf(_('All in %s'), [$ccCountry['name']]); ?> (<?php echo $ccCountry['count']; ?>)</option>
  347. <?php if(is_array($ccCountry['list'])): ?>
  348. <?php foreach($ccCountry['list'] as $ccList): ?>
  349. <option value="<?php echo $ccList['country_code']; ?>"><?php echo $ccList['country_name']; ?> (<?php echo $ccList['cc_count']; ?>)</option>
  350. <?php endforeach; ?>
  351. <?php endif; ?>
  352. </optgroup>
  353. <?php endforeach; ?>
  354. <?php endif; ?>
  355. </select>
  356. </div>
  357. <!--//--><div class="form-group col-md-2 text-center"><button type="button" data-lefthand="cn_applicant" data-righthand="cc_applicant" class="btn btn-outline-info btn-countries-hand" <?php echo ($this->view->getUserHasRoles[5] ) && $this->view->getUserHasRoles[5] ? "" : (($this->view->getMaxAddRequesters-$this->view->getTotRequesters) > 0 ? "" : "disabled"); ?> ><span class="icon-point-right"></span></button></div>
  358. <div class="form-group col-md-5">
  359. <label class="label-main" for="cc_applicant"><?php echo _('Clinical Center (Requester)'); ?></label>
  360. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cc_applicant chosen-select" multiple="multiple" name="data[cc_applicant][value][]" id="cc_applicant" <?php echo ($this->view->getUserHasRoles[5] ) && $this->view->getUserHasRoles[5] ? "" : (($this->view->getMaxAddRequesters-$this->view->getTotRequesters) > 0 ? "" : "disabled"); ?> >
  361. <?php if(is_array($this->view->clinicalCenters)): ?>
  362. <?php foreach($this->view->clinicalCenters as $center): ?>
  363. <?php
  364. $clinicalCenterList = isset($this->view->userClinicalCenters[APPLICANT_ROLE_ID]) ? $this->view->userClinicalCenters[APPLICANT_ROLE_ID] : $this->view->userClinicalCenters[0];
  365. $selected = isset($clinicalCenterList[$center['id']]) ? 'selected' : '';
  366. ?>
  367. <option value="<?php echo $center['id']; ?>" <?php echo $selected; ?>><?php echo $center['description']; ?></option>
  368. <?php endforeach; ?>
  369. <?php endif; ?>
  370. </select>
  371. <input type="hidden" name="data[cc_applicant][required]" value="0">
  372. <input type="hidden" name="data[cc_applicant][type]" value="text">
  373. <input type="hidden" name="data[cc_applicant][class]" value="field-cc_applicant">
  374. <input type="hidden" name="data[cc_applicant][label]" value="<?php echo _('Clinical Center (Requester)'); ?>">
  375. </div>
  376. <div class="form-group col-md-5">
  377. <label class="label-main" for="cn_referrer"><?php echo _('Country filter (Responder)'); ?></label>
  378. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cn_referrer chosen-select" multiple="multiple" id="cn_referrer" <?php echo ($this->view->getUserHasRoles[4] ) && $this->view->getUserHasRoles[4] ? "" : ( ($this->view->getMaxAddResponders-$this->view->getTotResponders) > 0 ? "" : "disabled"); ?> >
  379. <?php if(is_array($this->view->clinicalCenterCountries)): ?>
  380. <?php foreach($this->view->clinicalCenterCountries as $countryCode => $ccCountry): ?>
  381. <optgroup label="<?php echo $ccCountry['name']; ?>">
  382. <option value="all|<?php echo $countryCode; ?>"><?php echo vsprintf(_('All in %s'), [$ccCountry['name']]); ?> (<?php echo $ccCountry['count']; ?>)</option>
  383. <?php if(is_array($ccCountry['list'])): ?>
  384. <?php foreach($ccCountry['list'] as $ccList): ?>
  385. <option value="<?php echo $ccList['country_code']; ?>"><?php echo $ccList['country_name']; ?> (<?php echo $ccList['cc_count']; ?>)</option>
  386. <?php endforeach; ?>
  387. <?php endif; ?>
  388. </optgroup>
  389. <?php endforeach; ?>
  390. <?php endif; ?>
  391. </select>
  392. </div>
  393. <!--//--><div class="form-group col-md-2 text-center"><button type="button" data-lefthand="cn_referrer" data-righthand="cc_referrer" class="btn btn-outline-info btn-countries-hand" <?php echo ($this->view->getUserHasRoles[4] ) && $this->view->getUserHasRoles[4] ? "" : ( ($this->view->getMaxAddResponders-$this->view->getTotResponders) > 0 ? "" : "disabled"); ?> ><span class="icon-point-right"></span></button></div>
  394. <div class="form-group col-md-5">
  395. <label class="label-main" for="cc_referrer"><?php echo _('Clinical Center (Responder)'); ?></label>
  396. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cc_referrer chosen-select" multiple="multiple" name="data[cc_referrer][value][]" id="cc_referrer" <?php echo ($this->view->getUserHasRoles[4] ) && $this->view->getUserHasRoles[4] ? "" : ( ($this->view->getMaxAddResponders-$this->view->getTotResponders) > 0 ? "" : "disabled"); ?> >
  397. <?php if(is_array($this->view->clinicalCenters)): ?>
  398. <?php foreach($this->view->clinicalCenters as $center): ?>
  399. <?php
  400. $clinicalCenterList = isset($this->view->userClinicalCenters[REFERRER_ROLE_ID]) ? $this->view->userClinicalCenters[REFERRER_ROLE_ID] : $this->view->userClinicalCenters[0];
  401. $selected = isset($clinicalCenterList[$center['id']]) ? 'selected' : '';
  402. ?>
  403. <option value="<?php echo $center['id']; ?>" <?php echo $selected; ?>><?php echo $center['description']; ?></option>
  404. <?php endforeach; ?>
  405. <?php endif; ?>
  406. </select>
  407. <input type="hidden" name="data[cc_referrer][required]" value="0">
  408. <input type="hidden" name="data[cc_referrer][type]" value="text">
  409. <input type="hidden" name="data[cc_referrer][class]" value="field-cc_referrer">
  410. <input type="hidden" name="data[cc_referrer][label]" value="<?php echo _('Clinical Center (Responder)'); ?>">
  411. </div>
  412. <div class="form-group col-md-5">
  413. <label class="label-main" for="cn_moderator"><?php echo _('Country filter (Moderator)'); ?></label>
  414. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cn_moderator chosen-select" multiple="multiple" id="cn_moderator" <?php echo ($this->view->getUserHasRoles[3] ) && $this->view->getUserHasRoles[3] ? "" : ( ($this->view->getMaxAddModerators-$this->view->getTotModerators) > 0 ? "" : "disabled"); ?> >
  415. <?php if(is_array($this->view->clinicalCenterCountries)): ?>
  416. <?php foreach($this->view->clinicalCenterCountries as $countryCode => $ccCountry): ?>
  417. <optgroup label="<?php echo $ccCountry['name']; ?>">
  418. <option value="all|<?php echo $countryCode; ?>"><?php echo vsprintf(_('All in %s'), [$ccCountry['name']]); ?> (<?php echo $ccCountry['count']; ?>)</option>
  419. <?php if(is_array($ccCountry['list'])): ?>
  420. <?php foreach($ccCountry['list'] as $ccList): ?>
  421. <option value="<?php echo $ccList['country_code']; ?>"><?php echo $ccList['country_name']; ?> (<?php echo $ccList['cc_count']; ?>)</option>
  422. <?php endforeach; ?>
  423. <?php endif; ?>
  424. </optgroup>
  425. <?php endforeach; ?>
  426. <?php endif; ?>
  427. </select>
  428. </div>
  429. <!--//--><div class="form-group col-md-2 text-center"><button type="button" data-lefthand="cn_moderator" data-righthand="cc_moderator" class="btn btn-outline-info btn-countries-hand" <?php echo ($this->view->getUserHasRoles[3] ) && $this->view->getUserHasRoles[3] ? "" : ( ($this->view->getMaxAddModerators-$this->view->getTotModerators) > 0 ? "" : "disabled"); ?> ><span class="icon-point-right"></span></button></div>
  430. <div class="form-group col-md-5">
  431. <label class="label-main" for="cc_moderator"><?php echo _('Clinical Center (Moderator)'); ?></label>
  432. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cc_moderator chosen-select" multiple="multiple" name="data[cc_moderator][value][]" id="cc_moderator"<?php echo ($this->view->getUserHasRoles[3] ) && $this->view->getUserHasRoles[3] ? "" : ( ($this->view->getMaxAddModerators-$this->view->getTotModerators) > 0 ? "" : "disabled"); ?> >
  433. <?php if(is_array($this->view->clinicalCenters)): ?>
  434. <?php foreach($this->view->clinicalCenters as $center): ?>
  435. <?php
  436. $clinicalCenterList = isset($this->view->userClinicalCenters[MODERATOR_ROLE_ID]) ? $this->view->userClinicalCenters[MODERATOR_ROLE_ID] : $this->view->userClinicalCenters[0];
  437. $selected = isset($clinicalCenterList[$center['id']]) ? 'selected' : '';
  438. ?>
  439. <option value="<?php echo $center['id']; ?>" <?php echo $selected; ?>><?php echo $center['description']; ?></option>
  440. <?php endforeach; ?>
  441. <?php endif; ?>
  442. </select>
  443. <input type="hidden" name="data[cc_moderator][required]" value="0">
  444. <input type="hidden" name="data[cc_moderator][type]" value="text">
  445. <input type="hidden" name="data[cc_moderator][class]" value="field-cc_moderator">
  446. <input type="hidden" name="data[cc_moderator][label]" value="<?php echo _('Clinical Center (Moderator)'); ?>">
  447. </div>
  448. <div class="form-group col-md-5">
  449. <label class="label-main" for="cn_guest"><?php echo _('Country filter (Guest)'); ?></label>
  450. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cn_guest chosen-select" multiple="multiple" id="cn_guest" <?php echo ($this->view->getUserHasRoles[6] ) && $this->view->getUserHasRoles[6] ? '' : (($this->view->getMaxAddGuests-$this->view->getTotGuests) > 0 ? "" : "disabled"); ?> >
  451. <?php if(is_array($this->view->clinicalCenterCountries)): ?>
  452. <?php foreach($this->view->clinicalCenterCountries as $countryCode => $ccCountry): ?>
  453. <optgroup label="<?php echo $ccCountry['name']; ?>">
  454. <option value="all|<?php echo $countryCode; ?>"><?php echo vsprintf(_('All in %s'), [$ccCountry['name']]); ?> (<?php echo $ccCountry['count']; ?>)</option>
  455. <?php if(is_array($ccCountry['list'])): ?>
  456. <?php foreach($ccCountry['list'] as $ccList): ?>
  457. <option value="<?php echo $ccList['country_code']; ?>"><?php echo $ccList['country_name']; ?> (<?php echo $ccList['cc_count']; ?>)</option>
  458. <?php endforeach; ?>
  459. <?php endif; ?>
  460. </optgroup>
  461. <?php endforeach; ?>
  462. <?php endif; ?>
  463. </select>
  464. </div>
  465. <!--//--><div class="form-group col-md-2 text-center"><button type="button" data-lefthand="cn_guest" data-righthand="cc_guest" class="btn btn-outline-info btn-countries-hand" <?php echo ($this->view->getUserHasRoles[6] ) && $this->view->getUserHasRoles[6] ? '' : (($this->view->getMaxAddGuests-$this->view->getTotGuests) > 0 ? "" : "disabled"); ?> ><span class="icon-point-right"></span></button></div>
  466. <div class="form-group col-md-5">
  467. <label class="label-main" for="cc_guest"><?php echo _('Clinical Center (Guest)'); ?></label>
  468. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cc_guest chosen-select" multiple="multiple" name="data[cc_guest][value][]" id="cc_guest" <?php echo ($this->view->getUserHasRoles[6] ) && $this->view->getUserHasRoles[6] ? '' : (($this->view->getMaxAddGuests-$this->view->getTotGuests) > 0 ? "" : "disabled"); ?> >
  469. <?php if(is_array($this->view->clinicalCenters)): ?>
  470. <?php foreach($this->view->clinicalCenters as $center): ?>
  471. <?php
  472. $clinicalCenterList = isset($this->view->userClinicalCenters[GUEST_ROLE_ID]) ? $this->view->userClinicalCenters[GUEST_ROLE_ID] : $this->view->userClinicalCenters[0];
  473. $selected = isset($clinicalCenterList[$center['id']]) ? 'selected' : '';
  474. ?>
  475. <option value="<?php echo $center['id']; ?>" <?php echo $selected; ?>><?php echo $center['description']; ?></option>
  476. <?php endforeach; ?>
  477. <?php endif; ?>
  478. </select>
  479. <input type="hidden" name="data[cc_guest][required]" value="0">
  480. <input type="hidden" name="data[cc_guest][type]" value="text">
  481. <input type="hidden" name="data[cc_guest][class]" value="field-cc_guest">
  482. <input type="hidden" name="data[cc_guest][label]" value="<?php echo _('Clinical Center (Guest)'); ?>">
  483. </div>
  484. <!--<div class="form-group col-md-12">
  485. <hr>
  486. </div>-->
  487. <?php /*
  488. <div class="form-group col-md-5">
  489. <label class="label-main" for="cn_manager">Filtro paese (Gestore)</label>
  490. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cn_manager chosen-select" id="cn_manager">
  491. <?php if(is_array($this->view->clinicalCenterCountries)): ?>
  492. <?php foreach($this->view->clinicalCenterCountries as $countryCode => $ccCountry): ?>
  493. <optgroup label="<?php echo $ccCountry['name']; ?>">
  494. <option value="all|<?php echo $countryCode; ?>"><?php echo vsprintf(_('All in %s'), [$ccCountry['name']]); ?> (<?php echo $ccCountry['count']; ?>)</option>
  495. <?php if(is_array($ccCountry['list'])): ?>
  496. <?php foreach($ccCountry['list'] as $ccList): ?>
  497. <option value="<?php echo $ccList['country_code']; ?>"><?php echo $ccList['country_name']; ?> (<?php echo $ccList['cc_count']; ?>)</option>
  498. <?php endforeach; ?>
  499. <?php endif; ?>
  500. </optgroup>
  501. <?php endforeach; ?>
  502. <?php endif; ?>
  503. </select>
  504. </div>
  505. <!--//--><div class="form-group col-md-2 text-center"><button type="button" data-lefthand="cn_manager" data-righthand="cc_manager" class="btn btn-outline-info btn-countries-hand"><span class="icon-point-right"></span></button></div>
  506. */ ?>
  507. <?php /*
  508. <div class="form-group col-md-6">
  509. <label class="label-main" for="cc_manager">Centro clinico (Gestore)</label>
  510. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cc_manager chosen-select" name="data[cc_manager][value][]" id="cc_manager">
  511. <option value="">...</option>
  512. <?php if(is_array($this->view->clinicalCenters)): ?>
  513. <?php foreach($this->view->clinicalCenters as $center): ?>
  514. <?php
  515. $clinicalCenterList = isset($this->view->userClinicalCenters[MANAGER_ID]) ? $this->view->userClinicalCenters[MANAGER_ID] : $this->view->userClinicalCenters[0];
  516. $selected = isset($clinicalCenterList[$center['id']]) ? 'selected' : '';
  517. ?>
  518. <option value="<?php echo $center['id']; ?>" <?php echo $selected; ?>><?php echo $center['description']; ?></option>
  519. <?php endforeach; ?>
  520. <?php endif; ?>
  521. </select>
  522. <input type="hidden" name="data[cc_manager][required]" value="0">
  523. <input type="hidden" name="data[cc_manager][type]" value="text">
  524. <input type="hidden" name="data[cc_manager][class]" value="field-cc_manager">
  525. <input type="hidden" name="data[cc_manager][label]" value="Centro clinico (Gestore)">
  526. </div>
  527. */ ?>
  528. <?php /*
  529. <div class="form-group col-md-5">
  530. <label class="label-main" for="cn_global_manager">Filtro paese (Gestore generale)</label>
  531. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cn_manager chosen-select" id="cn_global_manager">
  532. <?php if(is_array($this->view->clinicalCenterCountries)): ?>
  533. <?php foreach($this->view->clinicalCenterCountries as $countryCode => $ccCountry): ?>
  534. <optgroup label="<?php echo $ccCountry['name']; ?>">
  535. <option value="all|<?php echo $countryCode; ?>"><?php echo vsprintf(_('All in %s'), [$ccCountry['name']]); ?> (<?php echo $ccCountry['count']; ?>)</option>
  536. <?php if(is_array($ccCountry['list'])): ?>
  537. <?php foreach($ccCountry['list'] as $ccList): ?>
  538. <option value="<?php echo $ccList['country_code']; ?>"><?php echo $ccList['country_name']; ?> (<?php echo $ccList['cc_count']; ?>)</option>
  539. <?php endforeach; ?>
  540. <?php endif; ?>
  541. </optgroup>
  542. <?php endforeach; ?>
  543. <?php endif; ?>
  544. </select>
  545. </div>
  546. <!--//--><div class="form-group col-md-2 text-center"><button type="button" data-lefthand="cn_global_manager" data-righthand="cc_global_manager" class="btn btn-outline-info btn-countries-hand"><span class="icon-point-right"></span></button></div>
  547. */ ?>
  548. <?php /*
  549. <div class="form-group col-md-6">
  550. <label class="label-main" for="cc_global_manager">Centro clinico (Gestore generale)</label>
  551. <select data-placeholder="<?php echo _('Select...'); ?>" class="form-control field-cc_global_manager chosen-select" name="data[cc_global_manager][value][]" id="cc_global_manager" multiple="multiple">
  552. <option value="">...</option>
  553. <?php if(is_array($this->view->clinicalCenters)): ?>
  554. <?php foreach($this->view->clinicalCenters as $center): ?>
  555. <?php
  556. $clinicalCenterList = isset($this->view->userClinicalCenters[GLOBAL_MANAGER_ID]) ? $this->view->userClinicalCenters[GLOBAL_MANAGER_ID] : $this->view->userClinicalCenters[0];
  557. $selected = isset($clinicalCenterList[$center['id']]) ? 'selected' : '';
  558. ?>
  559. <option value="<?php echo $center['id']; ?>" <?php echo $selected; ?>><?php echo $center['description']; ?></option>
  560. <?php endforeach; ?>
  561. <?php endif; ?>
  562. </select>
  563. <input type="hidden" name="data[cc_global_manager][required]" value="0">
  564. <input type="hidden" name="data[cc_global_manager][type]" value="text">
  565. <input type="hidden" name="data[cc_global_manager][class]" value="field-cc_manager">
  566. <input type="hidden" name="data[cc_global_manager][label]" value="Centro clinico (Gestore generale)">
  567. </div>
  568. */ ?>
  569. <div class="form-group col-lg-12" style="display: none;">
  570. <label class="label-main" for=""><?php echo _('Advanced Request Filters'); ?></label>
  571. <div class="form-check">
  572. <input type="hidden" name="data[advanced_request][value]" value="0">
  573. <input class="form-check-input field-advanced-request" type="checkbox" name="data[advanced_request][value]" value="1" id="advanced-request" <?php echo $this->view->userData['advanced_request'] == 1 ? 'checked' : ''; ?>>
  574. <label class="form-check-label" for="advanced-request">
  575. <?php echo _('Show advanced filters in Request page.'); ?>
  576. </label>
  577. </div>
  578. <input type="hidden" name="data[advanced_request][required]" value="0">
  579. <input type="hidden" name="data[advanced_request][type]" value="checkbox">
  580. <input type="hidden" name="data[advanced_request][class]" value="field-advanced-request">
  581. <input type="hidden" name="data[advanced_request][label]" value="<?php echo _('Advanced Request Filters'); ?>">
  582. </div>
  583. <div class="form-group col-lg-12">
  584. <hr>
  585. <h4 class="text-center"><?php echo _('Contact preferences'); ?></h4>
  586. <hr>
  587. </div>
  588. <div class="form-group col-lg-12">
  589. <label class="label-main" for="profile_email"><?php echo _('E-mail'); ?></label>
  590. <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]">
  591. <input type="hidden" name="data[email][required]" value="1">
  592. <input type="hidden" name="data[email][type]" value="email">
  593. <input type="hidden" name="data[email][class]" value="field-email">
  594. <input type="hidden" name="data[email][label]" value="<?php echo _('E-mail'); ?>">
  595. </div>
  596. <?php /*
  597. <div class="form-group col-lg-6">
  598. <label class="label-main" for="profile_alt_email"><?php echo _('Alternative e-mail'); ?></label>
  599. <input type="email" class="form-control field-alt-email" value="<?php echo isset($this->view->userData['alternative_email']) ? $this->view->userData['alternative_email'] : ''; ?>" id="profile_alt_email" name="data[alt_email][value]">
  600. <input type="hidden" name="data[alt_email][required]" value="0">
  601. <input type="hidden" name="data[alt_email][type]" value="email">
  602. <input type="hidden" name="data[alt_email][class]" value="field-alt-email">
  603. <input type="hidden" name="data[alt_email][label]" value="<?php echo _('Alternative e-mail'); ?>">
  604. </div>
  605. */ ?>
  606. <div class="form-group col-lg-6">
  607. <label class="label-main" for="profile_default_mobile"><?php echo _('Mobile (All communications)'); ?></label>
  608. <input type="tel" class="form-control field-mobile-default" value="<?php echo isset($this->view->userData['mobile_number']) ? $this->view->userData['mobile_number'] : ''; ?>" id="profile_default_mobile" name="data[default_mobile][value]">
  609. <input type="hidden" name="data[default_mobile][required]" value="1">
  610. <input type="hidden" name="data[default_mobile][type]" value="text">
  611. <input type="hidden" name="data[default_mobile][class]" value="field-mobile-default">
  612. <input type="hidden" name="data[default_mobile][label]" value="<?php echo _('Mobile (All communications)'); ?>">
  613. </div>
  614. <div class="form-group col-lg-6">
  615. <label class="label-main" for="profile_mobile_chat"><?php echo _('Mobile 2'); ?></label>
  616. <input type="tel" class="form-control field-mobile-chat" value="<?php echo isset($this->view->userData['mobile_number_chat']) ? $this->view->userData['mobile_number_chat'] : ''; ?>" id="profile_mobile_chat" name="data[mobile_chat][value]">
  617. <input type="hidden" name="data[mobile_chat][required]" value="0">
  618. <input type="hidden" name="data[mobile_chat][type]" value="text">
  619. <input type="hidden" name="data[mobile_chat][class]" value="field-mobile-chat">
  620. <input type="hidden" name="data[mobile_chat][label]" value="<?php echo _('Mobile 2)'); ?>">
  621. </div>
  622. <div class="form-group col-lg-6">
  623. <label class="label-main" for="profile_default_lang"><?php echo _('Communication preferences'); ?></label>
  624. <div>
  625. <div class="form-check form-check-inline">
  626. <input type="hidden" name="data[phone_pref][value]" value="1">
  627. <input class="form-check-input" type="checkbox" id="phone_pref" name="data[phone_pref][value]" value="0" <?php echo isset($this->view->userData['allow_phone_text']) && (int)$this->view->userData['allow_phone_text'] == 0 ? 'checked' : ''; ?>>
  628. <label class="form-check-label" for="phone_pref"><?php echo _('Do not send SMS/Text by phone'); ?></label>
  629. </div>
  630. <input type="hidden" name="data[wa_pref][value]" value="1">
  631. <?php /*
  632. <div class="form-check form-check-inline">
  633. <input type="hidden" name="data[wa_pref][value]" value="1">
  634. <input class="form-check-input" type="checkbox" id="wa_pref" name="data[wa_pref][value]" value="0" <?php echo isset($this->view->userData['allow_phone_chat']) && (int)$this->view->userData['allow_phone_chat'] == 0 ? 'checked' : ''; ?>>
  635. <label class="form-check-label" for="wa_pref"><?php echo _('Do not send messages by WhatsApp'); ?></label>
  636. </div>
  637. */ ?>
  638. <div class="form-check form-check-inline">
  639. <input type="hidden" name="data[email_pref][value]" value="1">
  640. <input class="form-check-input" type="checkbox" id="email_pref" name="data[email_pref][value]" value="0" <?php echo isset($this->view->userData['allow_email_msgs']) && (int)$this->view->userData['allow_email_msgs'] == 0 ? 'checked' : ''; ?>>
  641. <label class="form-check-label" for="wa_email"><?php echo _('Do not send messages by e-mail'); ?></label>
  642. </div>
  643. </div>
  644. </div>
  645. </div>
  646. <hr>
  647. <div class="clearfix">
  648. <button type="button" class="btn btn-primary btn-edit-user float-right"><?php echo _('Save'); ?></button>
  649. </div>
  650. </form>
  651. <?php else: ?>
  652. <div class="alert alert-warning" role="alert"><?php echo _("Unable to get user's information right now. Please try in a few minutes."); ?></div>
  653. <?php endif; ?>
  654. </div>
  655. </div>
  656. </div>
  657. <script>
  658. $(function () {
  659. $("[data-toggle='tooltip']").tooltip();
  660. });
  661. </script>