2015-02-14 14:25:29 +01:00
@ extends ( 'layouts.default' )
@ section ( 'content' )
2015-02-22 09:46:21 +01:00
{ !! Breadcrumbs :: renderIfExists ( Route :: getCurrentRoute () -> getName (), $account ) !! }
2015-02-14 14:25:29 +01:00
{ !! Form :: model ( $account , [ 'class' => 'form-horizontal' , 'id' => 'update' , 'url' => route ( 'accounts.update' , $account -> id )]) !! }
2015-03-31 20:39:28 +02:00
< input type = " hidden " name = " id " value = " { { $account -> id } } " />
2015-02-14 14:25:29 +01:00
< 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 " >
{ !! ExpandedForm :: text ( 'name' ) !! }
</ div >
</ div >
2015-04-26 07:42:55 +02:00
2015-02-14 14:25:29 +01:00
</ div >
< div class = " col-lg-6 col-md-6 col-sm-12 " >
< div class = " panel panel-default " >
< div class = " panel-heading " >
< i class = " fa fa-smile-o " ></ i > Optional fields
</ div >
< div class = " panel-body " >
@ if ( $account -> accounttype -> type == 'Default account' || $account -> accounttype -> type == 'Asset account' )
{ !! ExpandedForm :: balance ( 'openingBalance' , null , [ 'currency' => $openingBalance ? $openingBalance -> transactionCurrency : null ]) !! }
{ !! ExpandedForm :: date ( 'openingBalanceDate' ) !! }
{ !! ExpandedForm :: select ( 'accountRole' , Config :: get ( 'firefly.accountRoles' )) !! }
2015-04-01 19:42:14 +02:00
{ !! ExpandedForm :: balance ( 'virtualBalance' , null ) !! }
2015-02-14 14:25:29 +01:00
{ !! Form :: hidden ( 'id' , $account -> id ) !! }
@ endif
{ !! ExpandedForm :: checkbox ( 'active' , '1' ) !! }
</ div >
</ div >
2015-04-03 21:25:04 +02:00
<!-- panel for credit card options -->
@ if ( Session :: get ( 'preFilled' )[ 'accountRole' ] == 'ccAsset' )
< div class = " panel panel-default " >
< div class = " panel-heading " >
< i class = " fa fa-credit-card " ></ i > Credit card options
</ div >
< div class = " panel-body " >
2015-04-03 22:54:21 +02:00
{ !! ExpandedForm :: select ( 'ccType' , Config :: get ( 'firefly.ccTypes' )) !! }
{ !! ExpandedForm :: date ( 'ccMonthlyPaymentDate' , null ,[ 'helpText' => 'Select any year and any month, it will be ignored anway. Only the day of the month is relevant.' ]) !! }
2015-04-03 21:25:04 +02:00
</ div >
</ div >
@ endif
2015-02-14 14:25:29 +01:00
<!-- panel for options -->
< div class = " panel panel-default " >
< div class = " panel-heading " >
< i class = " fa fa-bolt " ></ i > Options
</ div >
< div class = " panel-body " >
{ !! ExpandedForm :: optionsList ( 'update' , 'account' ) !! }
</ div >
</ div >
2015-04-26 07:42:55 +02:00
</ div >
</ div >
< div class = " row " >
< div class = " col-lg-12 col-md-12 col-sm-12 col-xs-12 " >
< p >
< button type = " submit " class = " btn btn-lg btn-success " >
Update account
</ button >
</ p >
2015-02-14 14:25:29 +01:00
</ div >
</ div >
{ !! Form :: close () !! }
@ stop