profileSuccess.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <?php
  2. define('RENDER_MODE', 'catalyz');
  3. $node = $page->getNode();
  4. use_helper('Form');
  5. $properties = array();
  6. $properties['page'] = $page;
  7. $properties['node'] = $node;
  8. $properties['ContentTree'] = $ContentTree;
  9. ob_start();
  10. use_helper('I18N');
  11. $allLanguages = sfConfig::get('app_translations_available_languages');
  12. $default = sfConfig::get('app_translations_default_language');
  13. // $existing_languages = $node->getAvailableTranslations();
  14. $allLanguages = Catalyz::getAllTranslations();
  15. unset($allLanguages[$default]);
  16. // $perms = array();
  17. // $available_languages = array();
  18. // foreach($allLanguages as $iso => $name) {
  19. // if (!isset($existing_languages[$iso])) {
  20. // $available_languages[$iso] = ucfirst($name);
  21. // }
  22. // $perms[$iso]['edit'] = true;
  23. // $perms[$iso]['delete'] = ($iso != $default);
  24. // }
  25. // include_partial('catalyz/header');
  26. ?>
  27. <div class="content-add01">
  28. <div class="heading01"><h1>Mon compte</h1></div>
  29. <?php echo form_tag('@katao_profile_update') ?>
  30. <table>
  31. <tfoot>
  32. <tr>
  33. <td colspan="2">
  34. <br /><input type="submit" value="Sauver" /> ou <?php echo link_to('annuler', $sf_request->getReferer()) ?>
  35. </td>
  36. </tr>
  37. </tfoot>
  38. <tbody>
  39. <?php echo $form->renderGlobalErrors() ?>
  40. <tr valign="top">
  41. <td colspan="2" align="left"><u>Informations personnelles</u></td>
  42. </tr>
  43. <?php if ($katao_user->isBothMemberAndSupplier()): ?>
  44. <?php elseif ($katao_user->isMember()): ?>
  45. <tr valign="top">
  46. <th align="left"><?php echo $form['first_name']->renderLabel() ?></th>
  47. <td>
  48. <?php echo $form['first_name'] ?>
  49. <?php echo $form['first_name']->renderError() ?>
  50. </td>
  51. </tr>
  52. <tr valign="top">
  53. <th align="left"><?php echo $form['last_name']->renderLabel() ?></th>
  54. <td>
  55. <?php echo $form['last_name'] ?>
  56. <?php echo $form['last_name']->renderError() ?>
  57. </td>
  58. </tr>
  59. <tr valign="top">
  60. <th align="left"><?php echo $form['user_email']->renderLabel() ?></th>
  61. <td>
  62. <?php echo $form['user_email'] ?>
  63. <?php echo $form['user_email']->renderError() ?>
  64. </td>
  65. </tr>
  66. <tr valign="top">
  67. <th align="left"><?php echo $form['user_phone']->renderLabel() ?></th>
  68. <td>
  69. <?php echo $form['user_phone'] ?>
  70. <?php echo $form['user_phone']->renderError() ?>
  71. </td>
  72. </tr>
  73. <tr valign="top">
  74. <th align="left"><?php echo $form['user_fax']->renderLabel() ?></th>
  75. <td>
  76. <?php echo $form['user_fax'] ?>
  77. <?php echo $form['user_fax']->renderError() ?>
  78. </td>
  79. </tr>
  80. <?php elseif ($katao_user->isSupplier()): ?>
  81. <tr valign="top">
  82. <th align="left"><?php echo $form['name']->renderLabel() ?></th>
  83. <td>
  84. <?php echo $form['name'] ?>
  85. <?php echo $form['name']->renderError() ?>
  86. </td>
  87. </tr>
  88. <tr valign="top">
  89. <th align="left"><?php echo $form['email']->renderLabel() ?></th>
  90. <td>
  91. <?php echo $form['email'] ?>
  92. <?php echo $form['email']->renderError() ?>
  93. </td>
  94. </tr>
  95. <?php endif ?>
  96. <?php if ($katao_user->isMember()): ?>
  97. <tr valign="top">
  98. <th align="left"><?php echo $form['is_anonymous']->renderLabel() ?></th>
  99. <td>
  100. <?php echo $form['is_anonymous'] ?>
  101. <?php echo $form['is_anonymous']->renderError() ?>
  102. </td>
  103. </tr>
  104. <?php endif ?>
  105. <tr valign="top">
  106. <td colspan="2" align="left"><br /><u>Adresse</u></td>
  107. </tr>
  108. <tr valign="top">
  109. <th align="left"><?php echo $form['user_address1']->renderLabel() ?></th>
  110. <td>
  111. <?php echo $form['user_address1'] ?>
  112. <?php echo $form['user_address1']->renderError() ?>
  113. </td>
  114. </tr>
  115. <tr valign="top">
  116. <th align="left"><?php echo $form['user_address2']->renderLabel() ?></th>
  117. <td>
  118. <?php echo $form['user_address2'] ?>
  119. <?php echo $form['user_address2']->renderError() ?>
  120. </td>
  121. </tr>
  122. <tr valign="top">
  123. <th align="left"><?php echo $form['user_zip']->renderLabel() ?></th>
  124. <td>
  125. <?php echo $form['user_zip'] ?>
  126. <?php echo $form['user_zip']->renderError() ?>
  127. </td>
  128. </tr>
  129. <tr valign="top">
  130. <th align="left"><?php echo $form['user_city']->renderLabel() ?></th>
  131. <td>
  132. <?php echo $form['user_city'] ?>
  133. <?php echo $form['user_city']->renderError() ?>
  134. </td>
  135. </tr>
  136. <tr valign="top">
  137. <td colspan="2" align="left"><br /><u>Accès application</u></td>
  138. </tr>
  139. <tr valign="top">
  140. <th align="left"><?php echo $form['user_login']->renderLabel() ?></th>
  141. <td>
  142. <?php echo $form['user_login'] ?>
  143. <?php echo $form['user_login']->renderError() ?>
  144. </td>
  145. </tr>
  146. <tr valign="top">
  147. <th align="left"><?php echo $form['user_password']->renderLabel() ?></th>
  148. <td>
  149. <?php echo $form['user_password'] ?>
  150. <?php echo $form['user_password']->renderError() ?>
  151. </td>
  152. </tr>
  153. <tr valign="top">
  154. <th align="left"><?php echo $form['user_password_confirmation']->renderLabel() ?></th>
  155. <td>
  156. <?php echo $form['user_password_confirmation'] ?>
  157. <?php echo $form['user_password_confirmation']->renderError() ?>
  158. </td>
  159. </tr>
  160. </tbody>
  161. </table>
  162. </form>
  163. <?php if (0 < count($histories)): ?>
  164. <br />
  165. <div class="heading01"><h1>Historique</h1></div>
  166. <table class="profile-list">
  167. <tr>
  168. <th nowrap="nowrap" width="1%">Date</th>
  169. <th>Nature</th>
  170. <th nowrap="nowrap" width="1%">Montant</th>
  171. <th nowrap="nowrap" width="1%">Solde</th>
  172. </tr>
  173. <?php foreach ($histories as $history): ?>
  174. <tr valign="top">
  175. <td nowrap="nowrap" width="1%"><?php echo CatalyzDate::formatShort($history['date']) ?></td>
  176. <td><?php echo $history['summary'] ?></td>
  177. <td nowrap="nowrap" width="1%" style="text-align: right!important"><?php echo Utils::formatCurrencyEuro($history['amount']) ?></td>
  178. <td nowrap="nowrap" width="1%" style="text-align: right!important"><?php echo Utils::formatCurrencyEuro($history['account']) ?></td>
  179. </tr>
  180. <?php endforeach ?>
  181. </table>
  182. <?php endif ?>
  183. </div>
  184. <?php
  185. $content = ob_get_contents();
  186. ob_end_clean();
  187. // $layout = LayoutManager::instance()->getCatalyzTemplate($ContentTreeNode->getCurrentLayoutNameForAction());
  188. $properties['layout_family'] = 'katao';
  189. $properties['layout_name'] = 'layoutv2';
  190. $properties['content'] = $content;
  191. include_component($properties['layout_family'], $properties['layout_name'], $properties);
  192. ?>