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

index.view.php 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <?php echo $this->partial('Layout/nav'); ?>
  2. <div class="container">
  3. <div class="container-page-wrapper">
  4. <div class="container-page-container shodowed bordered">
  5. <?php //debug($this->user->getUser()); ?>
  6. <h1><?php echo $this->actionTitle; ?></h1>
  7. <hr>
  8. <h4 class="text-center"><?php echo _('Personal information'); ?></h4>
  9. <?php echo $this->partial('User/profile-summary', ['showBottomLink'=>false]); ?>
  10. <form id="profile-form-edit">
  11. <div class="form-row">
  12. <div class="form-group col-lg-6">
  13. <label for="profile_passwd1" class="label-main"><?php echo _('Password'); ?></label>
  14. <input type="password" class="form-control field-passwd1" value="" id="profile_passwd1" name="data[profile_passwd1][value]">
  15. <small class="form-text text-muted"><?php echo _('Provide a new password to change the current one.'); ?></small>
  16. <input type="hidden" name="data[profile_passwd1][required]" value="0">
  17. <input type="hidden" name="data[profile_passwd1][type]" value="password1">
  18. <input type="hidden" name="data[profile_passwd1][class]" value="field-passwd1">
  19. <input type="hidden" name="data[profile_passwd1][label]" value="<?php echo _('Password'); ?>">
  20. </div>
  21. <div class="form-group col-lg-6">
  22. <label for="profile_passwd2" class="label-main"><?php echo _('Confirm password'); ?></label>
  23. <input type="password" class="form-control field-passwd2" value="" id="profile_passwd2" name="data[profile_passwd2][value]">
  24. <input type="hidden" name="data[profile_passwd2][required]" value="0">
  25. <input type="hidden" name="data[profile_passwd2][type]" value="password2">
  26. <input type="hidden" name="data[profile_passwd2][class]" value="field-passwd2">
  27. <input type="hidden" name="data[profile_passwd2][label]" value="<?php echo _('Confirm password'); ?>">
  28. </div>
  29. <div class="form-group col-lg-12">
  30. <hr>
  31. </div>
  32. <div class="form-group col-lg-6">
  33. <label for="profile_default_lang" class="label-main"><?php echo _('First language'); ?></label>
  34. <select class="form-control" id="profile_default_lang" name="data[default_lang][value]">
  35. <?php foreach($this->view->languageList as $language): ?>
  36. <option value="<?php echo $language['lang_code']; ?>" <?php echo $language['selected'] ? 'selected': ''; ?>><?php echo $language['name_string']; ?></option>
  37. <?php endforeach; ?>
  38. </select>
  39. </div>
  40. <div class="form-group col-lg-6">
  41. <label for="profile_default_lang" class="label-main"><?php echo _('Alternative languages'); ?></label>
  42. <div>
  43. <?php foreach($this->view->alternativeLanguages as $index => $language): ?>
  44. <div class="form-check form-check-inline">
  45. <input class="form-check-input" type="checkbox" id="alt-lang-<?php echo $index; ?>" value="<?php echo $language['lang_code']; ?>" <?php echo $language['checked'] ? 'checked' : ''; ?> name="data[alt_langs][value][<?php echo $language['id']; ?>]">
  46. <label class="form-check-label" for="alt-lang-<?php echo $index; ?>"><?php echo $language['name_string']; ?></label>
  47. </div>
  48. <?php endforeach; ?>
  49. </div>
  50. </div>
  51. <div class="form-group col-md-12">
  52. <label class="label-main" for="user_country"><?php echo _('Country'); ?></label>
  53. <select class="form-control field-country chosen-select" name="data[country][value]" id="user_country">
  54. <option value="">...</option>
  55. <?php if(is_array($this->view->countries)): ?>
  56. <?php foreach($this->view->countries as $country): ?>
  57. <option value="<?php echo $country['country_iso2_code']; ?>" <?php echo $country['selected'] ? 'selected' : ''; ?>><?php echo $country['country_name']; ?></option>
  58. <?php endforeach; ?>
  59. <?php endif; ?>
  60. </select>
  61. <input type="hidden" name="data[country][required]" value="1">
  62. <input type="hidden" name="data[country][type]" value="text">
  63. <input type="hidden" name="data[country][class]" value="field-country">
  64. <input type="hidden" name="data[country][label]" value="<?php echo _('Country'); ?>">
  65. </div>
  66. <div class="form-group col-lg-12">
  67. <hr>
  68. </div>
  69. <div class="row col-lg-12">
  70. <div class="col-md-2 text-center">
  71. <?php echo $this->helper->setAvatarView($this->view->userAvatar, ['timestamp'=>md5($this->view->userUpdatedAt), 'class'=>'edit-avatar']); ?>
  72. </div>
  73. <div class="col-md-10">
  74. <?php echo $this->partial('User/avatar'); ?>
  75. </div>
  76. </div>
  77. <div class="form-group col-lg-12">
  78. <hr>
  79. </div>
  80. <div class="form-group col-lg-12">
  81. <label for="profile_passwd1"><?php echo _('Remarks'); ?></label>
  82. <textarea rows="4" class="form-control field-remarks" id="profile_remarks" name="data[public_remarks][value]"><?php echo $this->view->userRemarks; ?></textarea>
  83. <input type="hidden" name="data[public_remarks][required]" value="0">
  84. <input type="hidden" name="data[public_remarks][type]" value="text">
  85. <input type="hidden" name="data[public_remarks][class]" value="field-remarks">
  86. <input type="hidden" name="data[public_remarks][label]" value="<?php echo _('Remarks'); ?>">
  87. </div>
  88. <div class="form-group col-lg-12">
  89. <hr>
  90. <h4 class="text-center"><?php echo _('Contact preferences'); ?></h4>
  91. <hr>
  92. </div>
  93. <div class="form-group col-lg-12">
  94. <label for="profile_email" class="label-main"><?php echo _('E-mail'); ?></label>
  95. <input type="email" class="form-control field-email" value="<?php echo $this->view->userEmail; ?>" id="profile_email" name="data[email][value]">
  96. <input type="hidden" name="data[email][required]" value="1">
  97. <input type="hidden" name="data[email][type]" value="email">
  98. <input type="hidden" name="data[email][class]" value="field-email">
  99. <input type="hidden" name="data[email][label]" value="<?php echo _('E-mail'); ?>">
  100. </div>
  101. <?php /*
  102. <div class="form-group col-lg-6">
  103. <label for="profile_alt_email" class="label-main"><?php echo _('Alternative e-mail'); ?></label>
  104. <input type="email" class="form-control field-alt-email" value="<?php echo $this->view->userAltEmail; ?>" id="profile_alt_email" name="data[alt_email][value]">
  105. <input type="hidden" name="data[alt_email][required]" value="0">
  106. <input type="hidden" name="data[alt_email][type]" value="email">
  107. <input type="hidden" name="data[alt_email][class]" value="field-alt-email">
  108. <input type="hidden" name="data[alt_email][label]" value="<?php echo _('Alternative e-mail'); ?>">
  109. </div>
  110. */ ?>
  111. <div class="form-group col-lg-6">
  112. <label for="profile_default_mobile" class="label-main"><?php echo _('Mobile (All communications)'); ?></label>
  113. <input type="tel" class="form-control field-mobile-default" value="<?php echo $this->view->userMobNumber; ?>" id="profile_default_mobile" name="data[default_mobile][value]">
  114. <small class="text-muted"><?php echo _('With international code without + or 00.'); ?></small>
  115. <input type="hidden" name="data[default_mobile][required]" value="1">
  116. <input type="hidden" name="data[default_mobile][type]" value="text">
  117. <input type="hidden" name="data[default_mobile][class]" value="field-mobile-default">
  118. <input type="hidden" name="data[default_mobile][label]" value="<?php echo _('Mobile (All communications)'); ?>">
  119. </div>
  120. <div class="form-group col-lg-6">
  121. <label for="profile_mobile_chat" class="label-main"><?php echo _('Mobile (Preferred for WhatsApp)'); ?></label>
  122. <input type="tel" class="form-control field-mobile-chat" value="<?php echo $this->view->userMobWA; ?>" id="profile_mobile_chat" name="data[mobile_chat][value]">
  123. <small class="text-muted"><?php echo _('With international code without + or 00.'); ?></small>
  124. <input type="hidden" name="data[mobile_chat][required]" value="0">
  125. <input type="hidden" name="data[mobile_chat][type]" value="text">
  126. <input type="hidden" name="data[mobile_chat][class]" value="field-mobile-chat">
  127. <input type="hidden" name="data[mobile_chat][label]" value="<?php echo _('Mobile (Preferred for WhatsApp)'); ?>">
  128. </div>
  129. <div class="form-group col-lg-6">
  130. <label for="profile_default_lang" class="label-main"><?php echo _('Communication preferences'); ?></label>
  131. <div>
  132. <div class="form-check form-check-inline">
  133. <input type="hidden" name="data[phone_pref][value]" value="1">
  134. <input class="form-check-input" type="checkbox" id="phone_pref" name="data[phone_pref][value]" value="0" <?php echo (int)$this->view->userPhoneText == 0 ? 'checked' : ''; ?>>
  135. <label class="form-check-label" for="phone_pref"><?php echo _('Do not send SMS/Text by phone'); ?></label>
  136. </div>
  137. <div class="form-check form-check-inline">
  138. <input type="hidden" name="data[wa_pref][value]" value="1">
  139. <input class="form-check-input" type="checkbox" id="wa_pref" name="data[wa_pref][value]" value="0" <?php echo (int)$this->view->userPhoneChat == 0 ? 'checked' : ''; ?>>
  140. <label class="form-check-label" for="wa_pref"><?php echo _('Do not send messages by WhatsApp'); ?></label>
  141. </div>
  142. <div class="form-check form-check-inline">
  143. <input type="hidden" name="data[wa_email][value]" value="1">
  144. <input class="form-check-input" type="checkbox" id="wa_email" name="data[wa_email][value]" value="0" <?php echo (int)$this->view->userEmailMsgs == 0 ? 'checked' : ''; ?>>
  145. <label class="form-check-label" for="wa_email"><?php echo _('Do not send messages by e-mail'); ?></label>
  146. </div>
  147. </div>
  148. </div>
  149. <div class="form-group col-lg-12">
  150. <hr>
  151. </div>
  152. <div class="clearfix col-lg-12">
  153. <button type="button" class="btn btn-primary btn-edit-profile float-right"><?php echo _('Save'); ?></button>
  154. </div>
  155. </div>
  156. </form>
  157. <?php
  158. //debug($this->view->roles, true);
  159. ?>
  160. </div>
  161. </div>
  162. </div>