profileSupplierSuccess.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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. <tr valign="top">
  44. <th align="left"><?php echo $form['name']->renderLabel() ?></th>
  45. <td>
  46. <?php echo $form['name'] ?>
  47. <?php echo $form['name']->renderError() ?>
  48. </td>
  49. </tr>
  50. <tr valign="top">
  51. <th align="left"><?php echo $form['email']->renderLabel() ?></th>
  52. <td>
  53. <?php echo $form['email'] ?>
  54. <?php echo $form['email']->renderError() ?>
  55. </td>
  56. </tr>
  57. <tr valign="top">
  58. <th align="left"><?php echo $form['phone']->renderLabel() ?></th>
  59. <td>
  60. <?php echo $form['phone'] ?>
  61. <?php echo $form['phone']->renderError() ?>
  62. </td>
  63. </tr>
  64. <tr valign="top">
  65. <th align="left"><?php echo $form['fax']->renderLabel() ?></th>
  66. <td>
  67. <?php echo $form['fax'] ?>
  68. <?php echo $form['fax']->renderError() ?>
  69. </td>
  70. </tr>
  71. <tr valign="top">
  72. <td colspan="2" align="left"><br /><u>Adresse</u></td>
  73. </tr>
  74. <tr valign="top">
  75. <th align="left"><?php echo $form['address1']->renderLabel() ?></th>
  76. <td>
  77. <?php echo $form['address1'] ?>
  78. <?php echo $form['address1']->renderError() ?>
  79. </td>
  80. </tr>
  81. <tr valign="top">
  82. <th align="left"><?php echo $form['address2']->renderLabel() ?></th>
  83. <td>
  84. <?php echo $form['address2'] ?>
  85. <?php echo $form['address2']->renderError() ?>
  86. </td>
  87. </tr>
  88. <tr valign="top">
  89. <th align="left"><?php echo $form['zip']->renderLabel() ?> / <?php echo $form['city']->renderLabel() ?></th>
  90. <td>
  91. <?php echo $form['zip'] ?>
  92. <?php echo $form['city'] ?>
  93. <?php echo $form['zip']->renderError() ?>
  94. <?php echo $form['city']->renderError() ?>
  95. </td>
  96. </tr>
  97. <tr valign="top">
  98. <th align="left"><?php echo $form['website']->renderLabel() ?></th>
  99. <td>
  100. <?php echo $form['website'] ?>
  101. <?php echo $form['website']->renderError() ?>
  102. </td>
  103. </tr>
  104. <tr valign="top">
  105. <td colspan="2">
  106. <?php echo $form['update_gmap'] ?>
  107. <?php echo $form['update_gmap']->renderLabel() ?>
  108. <br />ou <a href="<?php echo url_for(('@katao_profile_gmap')) ?>">modifier ma position manuellement sur la carte</a>
  109. <?php echo $form['update_gmap']->renderError() ?>
  110. </td>
  111. </tr>
  112. <tr valign="top">
  113. <td colspan="2" align="left"><br /><u>Informations complémentaires</u></td>
  114. </tr>
  115. <tr valign="top">
  116. <th align="left"><?php echo $form['siret_number']->renderLabel() ?></th>
  117. <td>
  118. <?php echo $form['siret_number'] ?>
  119. <?php echo $form['siret_number']->renderError() ?>
  120. </td>
  121. </tr>
  122. <tr valign="top">
  123. <th align="left"><?php echo $form['order_min_amount']->renderLabel() ?></th>
  124. <td>
  125. <?php echo $form['order_min_amount'] ?>
  126. <?php echo $form['order_min_amount']->renderError() ?>
  127. </td>
  128. </tr>
  129. <tr valign="top">
  130. <td colspan="2" align="left"><br /><u>Présentation</u></td>
  131. </tr>
  132. <tr valign="top">
  133. <td colspan="2">
  134. <?php echo $form['presentation'] ?>
  135. <?php echo $form['presentation']->renderError() ?>
  136. </td>
  137. </tr>
  138. <tr valign="top">
  139. <td colspan="2" align="left"><br /><u>Accès application</u></td>
  140. </tr>
  141. <tr valign="top">
  142. <th align="left"><?php echo $form['user_login']->renderLabel() ?></th>
  143. <td>
  144. <?php echo $form['user_login'] ?>
  145. <?php echo $form['user_login']->renderError() ?>
  146. </td>
  147. </tr>
  148. <tr valign="top">
  149. <th align="left"><?php echo $form['user_password']->renderLabel() ?></th>
  150. <td>
  151. <?php echo $form['user_password'] ?>
  152. <?php echo $form['user_password']->renderError() ?>
  153. </td>
  154. </tr>
  155. <tr valign="top">
  156. <th align="left"><?php echo $form['user_password_confirmation']->renderLabel() ?></th>
  157. <td>
  158. <?php echo $form['user_password_confirmation'] ?>
  159. <?php echo $form['user_password_confirmation']->renderError() ?>
  160. </td>
  161. </tr>
  162. </tbody>
  163. </table>
  164. </form>
  165. <?php if (0 < count($history_order)): ?>
  166. <br />
  167. <div class="heading01"><h1>Historique de mes commandes</h1></div>
  168. <table class="profile-list">
  169. <tr>
  170. <th nowrap="nowrap" width="1%">Date</th>
  171. <th nowrap="nowrap" width="1%">N°</th>
  172. <th nowrap="nowrap" width="1%">Montant</th>
  173. <th>Période</th>
  174. <th>Noeud</th>
  175. </tr>
  176. <?php foreach ($history_order as $id => $order): ?>
  177. <tr valign="top">
  178. <td nowrap="nowrap" width="1%"><?php echo CatalyzDate::formatShort($order['date']) ?></td>
  179. <td nowrap="nowrap" width="1%"><?php echo link_to($order['number'], '@katao_supplier_order?id=' . $id, array('title' => 'Télécharger la commande en PDF')) ?></td>
  180. <td nowrap="nowrap" width="1%"><?php echo Utils::formatCurrencyEuro($order['amount_euro']) ?> dont <?php echo Utils::formatCurrencySol($order['amount_sol']) ?></td>
  181. <td><?php echo $order['period'] ?></td>
  182. <td><?php echo $order['node'] ?></td>
  183. </tr>
  184. <?php endforeach ?>
  185. </table>
  186. <?php endif ?>
  187. </div>
  188. <?php
  189. $content = ob_get_contents();
  190. ob_end_clean();
  191. // $layout = LayoutManager::instance()->getCatalyzTemplate($ContentTreeNode->getCurrentLayoutNameForAction());
  192. $properties['layout_family'] = 'katao';
  193. $properties['layout_name'] = 'layoutv2';
  194. $properties['content'] = $content;
  195. include_component($properties['layout_family'], $properties['layout_name'], $properties);
  196. ?>