Expand views to allow editing of currency decimals #506

This commit is contained in:
James Cole
2016-12-28 21:48:37 +01:00
parent bdbf434006
commit 9ae74b4278
9 changed files with 64 additions and 45 deletions

View File

@@ -17,6 +17,7 @@
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
{{ ExpandedForm.text('symbol',null,{'maxlength': 8}) }}
{{ ExpandedForm.text('code',null,{'maxlength' : 3}) }}
{{ ExpandedForm.integer('decimal_places',3,{'maxlength' : 2,'min': 0,'max': 12}) }}
</div>
</div>

View File

@@ -18,6 +18,7 @@
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
{{ ExpandedForm.text('symbol',null,{'maxlength' : 8}) }}
{{ ExpandedForm.text('code',null,{'maxlength' : 3}) }}
{{ ExpandedForm.integer('decimal_places',null,{'maxlength' : 2,'min': 0,'max': 12}) }}
</div>
</div>
</div>

View File

@@ -20,7 +20,9 @@
<thead>
<tr>
<th>&nbsp;</th>
<th colspan="2">{{ 'currency'|_ }}</th>
<th>{{ 'currency'|_ }}</th>
<th>{{ 'number_of_decimals'|_ }}</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
@@ -33,6 +35,7 @@
</div>
</td>
<td>{{ currency.name }} ({{ currency.code }}) ({{ currency.symbol|raw }})</td>
<td>{{ currency.decimal_places }}</td>
<td>
{% if currency.id == defaultCurrency.id %}
<span class="label label-success">{{ 'default_currency'|_ }}</span>