Helpers refactoring

This commit is contained in:
Frederic Guillot
2015-05-24 16:02:25 -04:00
parent 65e9e5d1be
commit eeac2329ba
239 changed files with 2441 additions and 2337 deletions

View File

@@ -2,18 +2,18 @@
<h2><?= t('Email notifications') ?></h2>
</div>
<form method="post" action="<?= $this->u('user', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
<form method="post" action="<?= $this->url->href('user', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
<?= $this->formCsrf() ?>
<?= $this->form->csrf() ?>
<?= $this->formCheckbox('notifications_enabled', t('Enable email notifications'), '1', $notifications['notifications_enabled'] == 1) ?><br/>
<?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), '1', $notifications['notifications_enabled'] == 1) ?><br/>
<?php if (! empty($projects)): ?>
<p><?= t('I want to receive notifications only for those projects:') ?><br/><br/></p>
<div class="form-checkbox-group">
<?php foreach ($projects as $project_id => $project_name): ?>
<?= $this->formCheckbox('projects['.$project_id.']', $project_name, '1', isset($notifications['project_'.$project_id])) ?><br/>
<?= $this->form->checkbox('projects['.$project_id.']', $project_name, '1', isset($notifications['project_'.$project_id])) ?><br/>
<?php endforeach ?>
</div>
<?php endif ?>
@@ -21,6 +21,6 @@
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= t('or') ?>
<?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
<?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
</div>
</form>