Methods to grab the requested currency symbol. #37

This commit is contained in:
James Cole
2014-12-24 05:58:26 +01:00
parent 80f5e61b6b
commit c2dd61e96b
3 changed files with 43 additions and 9 deletions

View File

@@ -123,7 +123,7 @@ class Form
$html .= \Form::input('text', $name, $value, $options);
break;
case 'amount':
$html .= '<div class="input-group"><div class="input-group-addon">&euro;</div>';
$html .= '<div class="input-group"><div class="input-group-addon">'.getCurrencySymbol().'</div>';
$html .= \Form::input('number', $name, $value, $options);
$html .= '</div>';
break;

View File

@@ -100,15 +100,15 @@
<!-- budget-info-X holds the input and the euro-sign: -->
<span id="budget-info-{{$budget->id}}">
@if($budget->currentRep->amount > $budget->spent)
<span class="text-success">&euro;</span> <input type="number" min="0" max="{{$budgetMaximum}}" data-id="{{$budget->id}}" step="1" value="{{$budget->currentRep->amount}}" style="width:90px;color:#3c763d;" />
<span class="text-success">{{getCurrencySymbol()}}</span> <input type="number" min="0" max="{{$budgetMaximum}}" data-id="{{$budget->id}}" step="1" value="{{$budget->currentRep->amount}}" style="width:90px;color:#3c763d;" />
@else
<span class="text-danger">&euro;</span> <input type="number" min="0" max="{{$budgetMaximum}}" data-id="{{$budget->id}}" step="1" value="{{$budget->currentRep->amount}}" style="width:90px;color:#a94442;" />
<span class="text-danger">{{getCurrencySymbol()}}</span> <input type="number" min="0" max="{{$budgetMaximum}}" data-id="{{$budget->id}}" step="1" value="{{$budget->currentRep->amount}}" style="width:90px;color:#a94442;" />
@endif
</span>
@else
<span id="budget-description-{{$budget->id}}"><em>No budget</em></span>
<span id="budget-info-{{$budget->id}}">
<span class="text-success" style="display:none;">&euro;</span> <input data-id="{{$budget->id}}" type="number" min="0" max="{{$budgetMaximum}}" step="1" value="0" style="width:50px;color:#3c763d;display:none;" />
<span class="text-success" style="display:none;">{{getCurrencySymbol()}}</span> <input data-id="{{$budget->id}}" type="number" min="0" max="{{$budgetMaximum}}" step="1" value="0" style="width:50px;color:#3c763d;display:none;" />
</span>
@endif
</span>