mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Reimplemented forms, added an overdue fix.
This commit is contained in:
22
resources/views/form/amount.blade.php
Normal file
22
resources/views/form/amount.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="{{{$classes}}}">
|
||||
<label for="{{{$options['id']}}}" class="col-sm-4 control-label">{{{$label}}}</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle amountCurrencyDropdown" data-toggle="dropdown" aria-expanded="false">
|
||||
<span id="amountCurrentSymbol">{{$defaultCurrency->symbol}}</span> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
@foreach($currencies as $currency)
|
||||
<li><a href="#" class="currencySelect" data-id="{{{$currency->id}}}" data-field="amount" data-currency="{{{$currency->code}}}" data-symbol="{{{$currency->symbol}}}">{{{$currency->name}}}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
{{Form::input('number', $name, $value, $options)}}
|
||||
|
||||
|
||||
</div>
|
||||
@include('form.feedback')
|
||||
</div>
|
||||
{{Form::input('hidden','amount_currency_id',$defaultCurrency->id)}}
|
||||
</div>
|
22
resources/views/form/balance.blade.php
Normal file
22
resources/views/form/balance.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="{{{$classes}}}">
|
||||
<label for="{{{$options['id']}}}" class="col-sm-4 control-label">{{{$label}}}</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle balanceCurrencyDropdown" data-toggle="dropdown" aria-expanded="false">
|
||||
<span id="balanceCurrentSymbol">{{$defaultCurrency->symbol}}</span> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
@foreach($currencies as $currency)
|
||||
<li><a href="#" class="currencySelect" data-id="{{{$currency->id}}}" data-field="balance" data-currency="{{{$currency->code}}}" data-symbol="{{{$currency->symbol}}}">{{{$currency->name}}}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
{!! Form::input('number', $name, $value, $options) !!}
|
||||
|
||||
</div>
|
||||
@include('form.feedback')
|
||||
</div>
|
||||
|
||||
{!! Form::input('hidden','balance_currency_id',$defaultCurrency->id) !!}
|
||||
</div>
|
11
resources/views/form/checkbox.blade.php
Normal file
11
resources/views/form/checkbox.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="{{{$classes}}}">
|
||||
<label for="{{{$options['id']}}}" class="col-sm-4 control-label">{{{$label}}}</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{!! Form::checkbox($name, $value, $options['checked'], $options) !!}
|
||||
</label>
|
||||
</div>
|
||||
@include('form.feedback')
|
||||
</div>
|
||||
</div>
|
7
resources/views/form/date.blade.php
Normal file
7
resources/views/form/date.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="{{{$classes}}}">
|
||||
<label for="{{{$options['id']}}}" class="col-sm-4 control-label">{{{$label}}}</label>
|
||||
<div class="col-sm-8">
|
||||
{!! Form::input('date', $name, $value, $options) !!}
|
||||
@include('form.feedback')
|
||||
</div>
|
||||
</div>
|
12
resources/views/form/feedback.blade.php
Normal file
12
resources/views/form/feedback.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
@if($errors->has($name))
|
||||
<span class="glyphicon glyphicon-remove form-control-feedback"></span>
|
||||
<p class="text-danger">{{{$errors->first($name)}}}</p>
|
||||
@endif
|
||||
@if(Session::has('warnings') && Session::get('warnings')->has($name))
|
||||
<span class="glyphicon glyphicon-warning-sign form-control-feedback"></span>
|
||||
<p class="text-warning">{{{Session::get('warnings')->first($name)}}}</p>
|
||||
@endif
|
||||
@if(Session::has('successes') && Session::get('successes')->has($name))
|
||||
<span class="glyphicon glyphicon-ok form-control-feedback"></span>
|
||||
<p class="text-success">{{{Session::get('successes')->first($name)}}}</p>
|
||||
@endif
|
9
resources/views/form/integer.blade.php
Normal file
9
resources/views/form/integer.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class="{{{$classes}}}">
|
||||
<label for="{{{$options['id']}}}" class="col-sm-4 control-label">{{{$label}}}</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
{!! Form::input('number', $name, $value, $options) !!}
|
||||
@include('form.feedback')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
69
resources/views/form/options.blade.php
Normal file
69
resources/views/form/options.blade.php
Normal file
@@ -0,0 +1,69 @@
|
||||
@if($type == 'create')
|
||||
<div class="form-group">
|
||||
<label for="{{{$name}}}_store" class="col-sm-4 control-label">Store</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio">
|
||||
<label>
|
||||
{!! Form::radio('post_submit_action', 'store', $previousValue == 'store', ['id' => $name . '_store']) !!}
|
||||
Store {{{$name}}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if($type == 'update')
|
||||
<div class="form-group">
|
||||
<label for="{{{$name}}}_update" class="col-sm-4 control-label">Update</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio">
|
||||
<label>
|
||||
{!! Form::radio('post_submit_action', 'update', $previousValue == 'update' || $previousValue == 'store', ['id' => $name . '_update']) !!}
|
||||
Update {{{$name}}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{{$name}}}_validate_only" class="col-sm-4 control-label">Validate only</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio">
|
||||
<label>
|
||||
{!! Form::radio('post_submit_action', 'validate_only', $previousValue == 'validate_only', ['id' => $name . '_validate_only']) !!}
|
||||
Only validate, do not save
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($type == 'create')
|
||||
<div class="form-group">
|
||||
<label for="{{{$name}}}_return_to_form" class="col-sm-4 control-label">
|
||||
Return here
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio">
|
||||
<label>
|
||||
{!! Form::radio('post_submit_action', 'create_another', $previousValue == 'create_another', ['id' => $name . '_create_another']) !!}
|
||||
After storing, return here to create another one.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($type == 'update')
|
||||
<div class="form-group">
|
||||
<label for="{{{$name}}}_return_to_edit" class="col-sm-4 control-label">
|
||||
Return here
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio"><label>
|
||||
{!! Form::radio('post_submit_action', 'return_to_edit', $previousValue == 'return_to_edit', ['id' => $name . '_return_to_edit']) !!}
|
||||
After updating, return here.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
8
resources/views/form/select.blade.php
Normal file
8
resources/views/form/select.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="{{{$classes}}}">
|
||||
<label for="{{{$options['id']}}}" class="col-sm-4 control-label">{{{$label}}}</label>
|
||||
<div class="col-sm-8">
|
||||
{!! Form::select($name, $list, $selected , $options ) !!}
|
||||
@include('form.feedback')
|
||||
|
||||
</div>
|
||||
</div>
|
7
resources/views/form/tags.blade.php
Normal file
7
resources/views/form/tags.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="{{{$classes}}}">
|
||||
<label for="{{{$options['id']}}}" class="col-sm-4 control-label">{{{$label}}}</label>
|
||||
<div class="col-sm-8">
|
||||
{!! Form::input('text', $name, $value, $options) !!}
|
||||
@include('form.feedback')
|
||||
</div>
|
||||
</div>
|
7
resources/views/form/text.blade.php
Normal file
7
resources/views/form/text.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="{{{$classes}}}">
|
||||
<label for="{{{$options['id']}}}" class="col-sm-4 control-label">{{{$label}}}</label>
|
||||
<div class="col-sm-8">
|
||||
{!! Form::input('text', $name, $value, $options) !!}
|
||||
@include('form.feedback')
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user