summaryrefslogtreecommitdiff
path: root/app/Template/currency/index.php
blob: 7839a14263f3ee4d76a1b8a431ed83e273a355b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<div class="page-header">
    <h2><?= t('Currency rates') ?></h2>
</div>

<?php if (! empty($rates)): ?>

<table class="table-stripped">
    <tr>
        <th class="column-35"><?= t('Currency') ?></th>
        <th><?= t('Rate') ?></th>
    </tr>
    <?php foreach ($rates as $rate): ?>
    <tr>
        <td>
            <strong><?= $this->e($rate['currency']) ?></strong>
        </td>
        <td>
            <?= n($rate['rate']) ?>
        </td>
    </tr>
    <?php endforeach ?>
</table>

<hr/>
<h3><?= t('Change reference currency') ?></h3>
<?php endif ?>
<form method="post" action="<?= $this->u('currency', 'reference') ?>" autocomplete="off">

    <?= $this->formCsrf() ?>

    <?= $this->formLabel(t('Reference currency'), 'application_currency') ?>
    <?= $this->formSelect('application_currency', $currencies, $config_values, $errors) ?><br/>

    <div class="form-actions">
        <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
    </div>
</form>

<hr/>
<h3><?= t('Add a new currency rate') ?></h3>
<form method="post" action="<?= $this->u('currency', 'create') ?>" autocomplete="off">

    <?= $this->formCsrf() ?>

    <?= $this->formLabel(t('Currency'), 'currency') ?>
    <?= $this->formSelect('currency', $currencies, $values, $errors) ?><br/>

    <?= $this->formLabel(t('Rate'), 'rate') ?>
    <?= $this->formText('rate', $values, $errors, array(), 'form-numeric') ?><br/>

    <div class="form-actions">
        <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
    </div>
</form>

<p class="alert alert-info"><?= t('Currency rates are used to calculate project budget.') ?></p>