123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- <?php
- define('RENDER_MODE', 'catalyz');
- $node = $page->getNode();
- use_helper('Form');
- $properties = array();
- $properties['page'] = $page;
- $properties['node'] = $node;
- $properties['ContentTree'] = $ContentTree;
- ob_start();
- use_helper('I18N');
- $allLanguages = sfConfig::get('app_translations_available_languages');
- $default = sfConfig::get('app_translations_default_language');
- // $existing_languages = $node->getAvailableTranslations();
- $allLanguages = Catalyz::getAllTranslations();
- unset($allLanguages[$default]);
- // $perms = array();
- // $available_languages = array();
- // foreach($allLanguages as $iso => $name) {
- // if (!isset($existing_languages[$iso])) {
- // $available_languages[$iso] = ucfirst($name);
- // }
- // $perms[$iso]['edit'] = true;
- // $perms[$iso]['delete'] = ($iso != $default);
- // }
- // include_partial('catalyz/header');
- ?>
- <div class="content-add01">
- <div class="heading01"><h1>Mon compte</h1></div>
- <?php echo form_tag('@katao_profile_update') ?>
- <table>
- <tfoot>
- <tr>
- <td colspan="2">
- <br /><input type="submit" value="Sauver" /> ou <?php echo link_to('annuler', $sf_request->getReferer()) ?>
- </td>
- </tr>
- </tfoot>
- <tbody>
- <?php echo $form->renderGlobalErrors() ?>
- <tr valign="top">
- <td colspan="2" align="left"><u>Informations personnelles</u></td>
- </tr>
- <?php if ($katao_user->isBothMemberAndSupplier()): ?>
- <?php elseif ($katao_user->isMember()): ?>
- <tr valign="top">
- <th align="left"><?php echo $form['first_name']->renderLabel() ?></th>
- <td>
- <?php echo $form['first_name'] ?>
- <?php echo $form['first_name']->renderError() ?>
- </td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['last_name']->renderLabel() ?></th>
- <td>
- <?php echo $form['last_name'] ?>
- <?php echo $form['last_name']->renderError() ?>
- </td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['user_email']->renderLabel() ?></th>
- <td>
- <?php echo $form['user_email'] ?>
- <?php echo $form['user_email']->renderError() ?>
- </td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['user_phone']->renderLabel() ?></th>
- <td>
- <?php echo $form['user_phone'] ?>
- <?php echo $form['user_phone']->renderError() ?>
- </td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['user_fax']->renderLabel() ?></th>
- <td>
- <?php echo $form['user_fax'] ?>
- <?php echo $form['user_fax']->renderError() ?>
- </td>
- </tr>
- <?php elseif ($katao_user->isSupplier()): ?>
- <tr valign="top">
- <th align="left"><?php echo $form['name']->renderLabel() ?></th>
- <td>
- <?php echo $form['name'] ?>
- <?php echo $form['name']->renderError() ?>
- </td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['email']->renderLabel() ?></th>
- <td>
- <?php echo $form['email'] ?>
- <?php echo $form['email']->renderError() ?>
- </td>
- </tr>
- <?php endif ?>
- <?php if ($katao_user->isMember()): ?>
- <tr valign="top">
- <th align="left"><?php echo $form['is_anonymous']->renderLabel() ?></th>
- <td>
- <?php echo $form['is_anonymous'] ?>
- <?php echo $form['is_anonymous']->renderError() ?>
- </td>
- </tr>
- <?php endif ?>
- <tr valign="top">
- <td colspan="2" align="left"><br /><u>Adresse</u></td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['user_address1']->renderLabel() ?></th>
- <td>
- <?php echo $form['user_address1'] ?>
- <?php echo $form['user_address1']->renderError() ?>
- </td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['user_address2']->renderLabel() ?></th>
- <td>
- <?php echo $form['user_address2'] ?>
- <?php echo $form['user_address2']->renderError() ?>
- </td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['user_zip']->renderLabel() ?></th>
- <td>
- <?php echo $form['user_zip'] ?>
- <?php echo $form['user_zip']->renderError() ?>
- </td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['user_city']->renderLabel() ?></th>
- <td>
- <?php echo $form['user_city'] ?>
- <?php echo $form['user_city']->renderError() ?>
- </td>
- </tr>
- <tr valign="top">
- <td colspan="2" align="left"><br /><u>Accès application</u></td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['user_login']->renderLabel() ?></th>
- <td>
- <?php echo $form['user_login'] ?>
- <?php echo $form['user_login']->renderError() ?>
- </td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['user_password']->renderLabel() ?></th>
- <td>
- <?php echo $form['user_password'] ?>
- <?php echo $form['user_password']->renderError() ?>
- </td>
- </tr>
- <tr valign="top">
- <th align="left"><?php echo $form['user_password_confirmation']->renderLabel() ?></th>
- <td>
- <?php echo $form['user_password_confirmation'] ?>
- <?php echo $form['user_password_confirmation']->renderError() ?>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
- <?php if (0 < count($histories)): ?>
- <br />
- <div class="heading01"><h1>Historique</h1></div>
- <table class="profile-list">
- <tr>
- <th nowrap="nowrap" width="1%">Date</th>
- <th>Nature</th>
- <th nowrap="nowrap" width="1%">Montant</th>
- <th nowrap="nowrap" width="1%">Solde</th>
- </tr>
- <?php foreach ($histories as $history): ?>
- <tr valign="top">
- <td nowrap="nowrap" width="1%"><?php echo CatalyzDate::formatShort($history['date']) ?></td>
- <td><?php echo $history['summary'] ?></td>
- <td nowrap="nowrap" width="1%" style="text-align: right!important"><?php echo Utils::formatCurrencyEuro($history['amount']) ?></td>
- <td nowrap="nowrap" width="1%" style="text-align: right!important"><?php echo Utils::formatCurrencyEuro($history['account']) ?></td>
- </tr>
- <?php endforeach ?>
- </table>
- <?php endif ?>
- </div>
- <?php
- $content = ob_get_contents();
- ob_end_clean();
- // $layout = LayoutManager::instance()->getCatalyzTemplate($ContentTreeNode->getCurrentLayoutNameForAction());
- $properties['layout_family'] = 'katao';
- $properties['layout_name'] = 'layoutv2';
- $properties['content'] = $content;
- include_component($properties['layout_family'], $properties['layout_name'], $properties);
- ?>
|