mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 23:41:10 +00:00
Update, edit and delete currencies.
This commit is contained in:
40
app/views/currency/create.blade.php
Normal file
40
app/views/currency/create.blade.php
Normal file
@@ -0,0 +1,40 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) }}
|
||||
{{Form::open(['class' => 'form-horizontal','id' => 'store','route' => 'currency.store'])}}
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<i class="fa {{{$subTitleIcon}}}"></i> Mandatory fields
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{Form::ffText('name',null,['maxlength' => 48])}}
|
||||
{{Form::ffText('symbol',null,['maxlength' => 8])}}
|
||||
{{Form::ffText('code',null,['maxlength' => 3])}}
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<button type="submit" class="btn btn-lg btn-success">
|
||||
<i class="fa fa-plus-circle"></i> Store new currency
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
|
||||
<!-- panel for options -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-bolt"></i> Options
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{Form::ffOptionsList('create','currency')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{Form::close()}}
|
||||
@stop
|
||||
25
app/views/currency/delete.blade.php
Normal file
25
app/views/currency/delete.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $currency) }}
|
||||
{{Form::open(['class' => 'form-horizontal','id' => 'destroy','url' => route('currency.destroy',$currency->id)])}}
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-12 col-sm-12">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
Delete currency "{{{$currency->name}}}"
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
Are you sure?
|
||||
</p>
|
||||
<p>
|
||||
<button type="submit" class="btn btn-default btn-danger">Delete permanently</button>
|
||||
<a href="{{URL::previous()}}" class="btn-default btn">Cancel</a >
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{Form::close()}}
|
||||
@stop
|
||||
40
app/views/currency/edit.blade.php
Normal file
40
app/views/currency/edit.blade.php
Normal file
@@ -0,0 +1,40 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) }}
|
||||
{{Form::model($currency, ['class' => 'form-horizontal','id' => 'store','url' => route('currency.update',$currency->id)])}}
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<i class="fa {{{$subTitleIcon}}}"></i> Mandatory fields
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{Form::ffText('name',null,['maxlength' => 48])}}
|
||||
{{Form::ffText('symbol',null,['maxlength' => 8])}}
|
||||
{{Form::ffText('code',null,['maxlength' => 3])}}
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<button type="submit" class="btn btn-lg btn-success">
|
||||
<i class="fa fa-plus-circle"></i> Update currency
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
|
||||
<!-- panel for options -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-bolt"></i> Options
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{Form::ffOptionsList('update','currency')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{Form::close()}}
|
||||
@stop
|
||||
@@ -16,12 +16,19 @@
|
||||
@if(count($currencies) > 0)
|
||||
@foreach($currencies as $currency)
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-fw fa-pencil"></i></a>
|
||||
<a href="#"><i class="fa fa-fw fa-trash"></i></a>
|
||||
{{{$currency->name}}} ({{{$currency->code}}}) ({{{$currency->symbol}}})</li>
|
||||
<a href="{{route('currency.edit',$currency->id)}}"><i class="fa fa-fw fa-pencil"></i></a>
|
||||
<a href="{{route('currency.delete',$currency->id)}}"><i class="fa fa-fw fa-trash"></i></a>
|
||||
{{{$currency->name}}} ({{{$currency->code}}}) ({{{$currency->symbol}}})
|
||||
@if($currency->id == $defaultCurrency->id)
|
||||
<span class="label label-success">default</span>
|
||||
@else
|
||||
<span class="label label-default"><a style="color:#fff" href="{{route('currency.default',$currency->id)}}">make default</a></span>
|
||||
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
@endif
|
||||
<li><a href="#"><i class="fa fa-fw fa-plus-circle"></i> Add another currency</a></li>
|
||||
<li><a href="{{route('currency.create')}}"><i class="fa fa-fw fa-plus-circle"></i> Add another currency</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user