Merge pull request #7600 from firefly-iii/upgrade-html

Upgrade html
This commit is contained in:
James Cole 2023-06-04 15:16:47 +02:00 committed by GitHub
commit 74a2935fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
54 changed files with 1045 additions and 1346 deletions

View File

@ -163,9 +163,8 @@ SEND_ERROR_MESSAGE=true
# These messages contain (sensitive) transaction information:
SEND_REPORT_JOURNALS=true
# Set this value to true if you want to set the location
# of certain things, like transactions. Since this involves an external service, it's optional
# and disabled by default.
# Set this value to true if you want to set the location of certain things, like transactions.
# Since this involves an external service, it's optional and disabled by default.
ENABLE_EXTERNAL_MAP=false
# Set this value to true if you want Firefly III to download currency exchange rates

View File

@ -176,7 +176,7 @@ class ExpandedForm
$options = $this->expandOptionArray($name, $label, $options);
$classes = $this->getHolderClasses($name);
$value = $this->fillFieldValue($name, $value);
$options['step'] = '1';
$options['step'] = $options['step'] ?? '1';
try {
$html = view('form.integer', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
@ -242,65 +242,6 @@ class ExpandedForm
return $selectList;
}
/**
* @param string $name
* @param mixed $value
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function nonSelectableAmount(string $name, $value = null, array $options = null): string
{
$label = $this->label($name, $options);
$options = $this->expandOptionArray($name, $label, $options);
$classes = $this->getHolderClasses($name);
$value = $this->fillFieldValue($name, $value);
$options['step'] = 'any';
$selectedCurrency = $options['currency'] ?? Amt::getDefaultCurrency();
unset($options['currency'], $options['placeholder']);
// make sure value is formatted nicely:
if (null !== $value && '' !== $value) {
// $value = round((float)$value, $selectedCurrency->decimal_places);
}
try {
$html = view('form.non-selectable-amount', compact('selectedCurrency', 'classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
Log::debug(sprintf('Could not render nonSelectableAmount(): %s', $e->getMessage()));
$html = 'Could not render nonSelectableAmount.';
throw new FireflyException($html, 0, $e);
}
return $html;
}
/**
* @param string $name
* @param mixed $value
* @param array|null $options
*
* @return string
* @throws FireflyException
*/
public function number(string $name, $value = null, array $options = null): string
{
$label = $this->label($name, $options);
$options = $this->expandOptionArray($name, $label, $options);
$classes = $this->getHolderClasses($name);
$value = $this->fillFieldValue($name, $value);
$options['step'] = 'any';
unset($options['placeholder']);
try {
$html = view('form.number', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
Log::debug(sprintf('Could not render number(): %s', $e->getMessage()));
$html = 'Could not render number.';
throw new FireflyException($html, 0, $e);
}
return $html;
}
/**
* @param null $value

View File

@ -93,7 +93,6 @@
"laravel/sanctum": "^3.2",
"laravel/slack-notification-channel": "^2.4",
"laravel/ui": "^4.2",
"laravelcollective/html": "6.*",
"league/commonmark": "2.*",
"league/csv": "^9.7",
"league/fractal": "0.*",
@ -103,6 +102,7 @@
"psr/log": "<4",
"ramsey/uuid": "^4.7",
"rcrowe/twigbridge": "^0.14",
"spatie/laravel-html": "^3.2",
"spatie/laravel-ignition": "^2",
"spatie/period": "^2.4",
"symfony/http-client": "^6.2",

217
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "cc2447110d1ddec300550e2e41634217",
"content-hash": "4f792c06cb58d42c0cb6a8d027aefbf7",
"packages": [
{
"name": "bacon/bacon-qr-code",
@ -472,16 +472,16 @@
},
{
"name": "doctrine/dbal",
"version": "3.6.2",
"version": "3.6.3",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
"reference": "b4bd1cfbd2b916951696d82e57d054394d84864c"
"reference": "9a747d29e7e6b39509b8f1847e37a23a0163ea6a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/b4bd1cfbd2b916951696d82e57d054394d84864c",
"reference": "b4bd1cfbd2b916951696d82e57d054394d84864c",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/9a747d29e7e6b39509b8f1847e37a23a0163ea6a",
"reference": "9a747d29e7e6b39509b8f1847e37a23a0163ea6a",
"shasum": ""
},
"require": {
@ -494,12 +494,12 @@
"psr/log": "^1|^2|^3"
},
"require-dev": {
"doctrine/coding-standard": "11.1.0",
"doctrine/coding-standard": "12.0.0",
"fig/log-test": "^1",
"jetbrains/phpstorm-stubs": "2022.3",
"phpstan/phpstan": "1.10.9",
"phpstan/phpstan": "1.10.14",
"phpstan/phpstan-strict-rules": "^1.5",
"phpunit/phpunit": "9.6.6",
"phpunit/phpunit": "9.6.7",
"psalm/plugin-phpunit": "0.18.4",
"squizlabs/php_codesniffer": "3.7.2",
"symfony/cache": "^5.4|^6.0",
@ -564,7 +564,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
"source": "https://github.com/doctrine/dbal/tree/3.6.2"
"source": "https://github.com/doctrine/dbal/tree/3.6.3"
},
"funding": [
{
@ -580,29 +580,33 @@
"type": "tidelift"
}
],
"time": "2023-04-14T07:25:38+00:00"
"time": "2023-06-01T05:46:46+00:00"
},
{
"name": "doctrine/deprecations",
"version": "v1.1.0",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/deprecations.git",
"reference": "8cffffb2218e01f3b370bf763e00e81697725259"
"reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/8cffffb2218e01f3b370bf763e00e81697725259",
"reference": "8cffffb2218e01f3b370bf763e00e81697725259",
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
"reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
"shasum": ""
},
"require": {
"php": "^7.1|^8.0"
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9",
"phpunit/phpunit": "^7.5|^8.5|^9.5",
"psr/log": "^1|^2|^3"
"phpstan/phpstan": "1.4.10 || 1.10.15",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"psalm/plugin-phpunit": "0.18.4",
"psr/log": "^1 || ^2 || ^3",
"vimeo/psalm": "4.30.0 || 5.12.0"
},
"suggest": {
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
@ -621,9 +625,9 @@
"homepage": "https://www.doctrine-project.org/",
"support": {
"issues": "https://github.com/doctrine/deprecations/issues",
"source": "https://github.com/doctrine/deprecations/tree/v1.1.0"
"source": "https://github.com/doctrine/deprecations/tree/v1.1.1"
},
"time": "2023-05-29T18:55:17+00:00"
"time": "2023-06-03T09:27:29+00:00"
},
{
"name": "doctrine/event-manager",
@ -1937,16 +1941,16 @@
},
{
"name": "laravel/framework",
"version": "v10.13.0",
"version": "v10.13.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "7322723585103082758d74917db62980684845cb"
"reference": "c1569099594168870cb4bdabfbaa35e5d172310b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/7322723585103082758d74917db62980684845cb",
"reference": "7322723585103082758d74917db62980684845cb",
"url": "https://api.github.com/repos/laravel/framework/zipball/c1569099594168870cb4bdabfbaa35e5d172310b",
"reference": "c1569099594168870cb4bdabfbaa35e5d172310b",
"shasum": ""
},
"require": {
@ -2133,7 +2137,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2023-05-30T14:46:25+00:00"
"time": "2023-06-02T13:13:10+00:00"
},
{
"name": "laravel/passport",
@ -2462,79 +2466,6 @@
},
"time": "2023-05-09T19:47:28+00:00"
},
{
"name": "laravelcollective/html",
"version": "v6.4.1",
"source": {
"type": "git",
"url": "https://github.com/LaravelCollective/html.git",
"reference": "64ddfdcaeeb8d332bd98bef442bef81e39c3910b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/LaravelCollective/html/zipball/64ddfdcaeeb8d332bd98bef442bef81e39c3910b",
"reference": "64ddfdcaeeb8d332bd98bef442bef81e39c3910b",
"shasum": ""
},
"require": {
"illuminate/http": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/routing": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/session": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/view": "^6.0|^7.0|^8.0|^9.0|^10.0",
"php": ">=7.2.5"
},
"require-dev": {
"illuminate/database": "^6.0|^7.0|^8.0|^9.0|^10.0",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~8.5|^9.5.10"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.x-dev"
},
"laravel": {
"providers": [
"Collective\\Html\\HtmlServiceProvider"
],
"aliases": {
"Form": "Collective\\Html\\FormFacade",
"Html": "Collective\\Html\\HtmlFacade"
}
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Collective\\Html\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Adam Engebretson",
"email": "adam@laravelcollective.com"
},
{
"name": "Taylor Otwell",
"email": "taylorotwell@gmail.com"
}
],
"description": "HTML and Form Builders for the Laravel Framework",
"homepage": "https://laravelcollective.com",
"support": {
"issues": "https://github.com/LaravelCollective/html/issues",
"source": "https://github.com/LaravelCollective/html"
},
"abandoned": "spatie/laravel-html",
"time": "2023-04-25T02:46:11+00:00"
},
{
"name": "lcobucci/clock",
"version": "3.1.0",
@ -5720,6 +5651,84 @@
],
"time": "2023-05-25T10:19:32+00:00"
},
{
"name": "spatie/laravel-html",
"version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-html.git",
"reference": "bf7bdb55cc5ce15c4ec8134aa1df709c0397c397"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-html/zipball/bf7bdb55cc5ce15c4ec8134aa1df709c0397c397",
"reference": "bf7bdb55cc5ce15c4ec8134aa1df709c0397c397",
"shasum": ""
},
"require": {
"illuminate/http": "^9.0|^8.0|^10.0",
"illuminate/support": "^9.0|^8.0|^10.0",
"php": "^8.0"
},
"require-dev": {
"mockery/mockery": "^1.3",
"orchestra/testbench": "^7.0|^6.23|^8.0",
"pestphp/pest": "^1.22"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\Html\\HtmlServiceProvider"
],
"aliases": {
"Html": "Spatie\\Html\\Facades\\Html"
}
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Spatie\\Html\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Sebastian De Deyne",
"email": "sebastian@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
},
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "A fluent html builder",
"homepage": "https://github.com/spatie/laravel-html",
"keywords": [
"html",
"spatie"
],
"support": {
"source": "https://github.com/spatie/laravel-html/tree/3.2.1"
},
"funding": [
{
"url": "https://spatie.be/open-source/support-us",
"type": "custom"
}
],
"time": "2023-01-24T23:47:16+00:00"
},
{
"name": "spatie/laravel-ignition",
"version": "2.1.3",
@ -10440,16 +10449,16 @@
},
{
"name": "phpunit/phpunit",
"version": "10.1.3",
"version": "10.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "2379ebafc1737e71cdc84f402acb6b7f04198b9d"
"reference": "3aad97fde1f3e490e2b316ba56bc4680310e3c3f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2379ebafc1737e71cdc84f402acb6b7f04198b9d",
"reference": "2379ebafc1737e71cdc84f402acb6b7f04198b9d",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3aad97fde1f3e490e2b316ba56bc4680310e3c3f",
"reference": "3aad97fde1f3e490e2b316ba56bc4680310e3c3f",
"shasum": ""
},
"require": {
@ -10489,7 +10498,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "10.1-dev"
"dev-main": "10.2-dev"
}
},
"autoload": {
@ -10521,7 +10530,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.3"
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.0"
},
"funding": [
{
@ -10537,7 +10546,7 @@
"type": "tidelift"
}
],
"time": "2023-05-11T05:16:22+00:00"
"time": "2023-06-02T05:42:13+00:00"
},
{
"name": "sebastian/cli-parser",

View File

@ -140,8 +140,7 @@ return [
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
'Html' => Spatie\Html\Facades\Html::class,
'Preferences' => Preferences::class,
'FireflyConfig' => FireflyConfig::class,
'Navigation' => Navigation::class,

View File

@ -118,7 +118,6 @@ return [
// tokens and keys
'fixer_api_key' => env('FIXER_API_KEY', ''),
'mapbox_api_key' => env('MAPBOX_API_KEY', ''),
'ipinfo_token' => env('IPINFO_TOKEN', ''),
'static_cron_token' => envNonEmpty('STATIC_CRON_TOKEN'),

View File

@ -171,7 +171,7 @@ return [
'Steam',
'Config',
'Request',
'Form' => ['is_safe' => ['input', 'select', 'checkbox', 'model', 'open', 'radio', 'textarea', 'file']],
'Html',
'ExpandedForm' => [
'is_safe' => [
'date',

View File

@ -67,30 +67,6 @@ $(function () {
);
}
if (doPlaceMarker === true) {
/*
Create new map:
*/
// make map:
var mymap = L.map('location_map', {
zoomControl: false,
touchZoom: false,
doubleClickZoom: false,
scrollWheelZoom: false,
boxZoom: false,
dragging: false
}).setView([latitude, longitude], zoomLevel);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?access_token={accessToken}', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
maxZoom: 18,
id: 'mapbox/streets-v11',
accessToken: mapboxToken
}).addTo(mymap);
L.marker([latitude, longitude]).addTo(mymap);
}
});
function sortStop(event, ui) {

View File

@ -1,23 +1,22 @@
/*
* create-edit.js
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** global: zoomLevel, latitude, longitude, google, apiKey, doPlaceMarker, Modernizr */
/*
* create-edit.js
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
$(function () {
"use strict";
@ -29,4 +28,4 @@ $(function () {
}
);
}
});
});

View File

@ -18,35 +18,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** global: zoomLevel, latitude, longitude, L, mapboxToken, doPlaceMarker */
/*
Some vars as prep for the map:
*/
$(function () {
"use strict";
if (doPlaceMarker === true) {
/*
Create new map:
*/
// make map:
var mymap = L.map('location_map', {
zoomControl: false,
touchZoom: false,
doubleClickZoom: false,
scrollWheelZoom: false,
boxZoom: false,
dragging: false
}).setView([latitude, longitude], zoomLevel);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?access_token={accessToken}', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
maxZoom: 18,
id: 'mapbox/streets-v11',
accessToken: mapboxToken
}).addTo(mymap);
L.marker([latitude, longitude]).addTo(mymap);
}
});

View File

@ -9,7 +9,8 @@
var mapboxToken = "{{ config('firefly.mapbox_api_key') }}";
</script>
<form action="{{ route('accounts.store') }}" method="post" id="store" class="form-horizontal" enctype="multipart/form-data">
<form action="{{ route('accounts.store') }}" method="post" id="store" class="form-horizontal"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="objectType" value="{{ objectType }}"/>
<input type="hidden" name="active" value="1"/>
@ -58,7 +59,6 @@
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('include_net_worth', 1) }}
{{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
{{ ExpandedForm.location('location', null, {locations: locations}) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
@ -88,14 +88,15 @@
var iAmOwed = '{{ 'i_am_owed_amount'|_|escape('js') }}';
var iOwe = '{{ 'i_owe_amount'|_|escape('js') }}';
</script>
<script src="v1/lib/leaflet/leaflet.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/accounts/create.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}
{% block styles %}
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link rel="stylesheet" href="v1/lib/leaflet/leaflet.css?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
{% endblock %}

View File

@ -6,7 +6,8 @@
{% block content %}
<form method="POST" action="{{ route('accounts.destroy',account.id) }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">
<form method="POST" action="{{ route('accounts.destroy',account.id) }}" accept-charset="UTF-8"
class="form-horizontal" id="destroy">
<input name="_token" type="hidden" value="{{ csrf_token() }}">
<div class="row">
<div class="col-lg-6 col-lg-offset-3 col-md-12 col-sm-12">
@ -39,7 +40,7 @@
</p>
<p>
{{ Form.select('move_account_before_delete', accountList, null, {class: 'form-control'}) }}
{{ Html.select('move_account_before_delete', accountList, null).class('form-control') }}
</p>
{% else %}
<input type="hidden" name="move_account_before_delete" value="0"/>
@ -47,7 +48,8 @@
</div>
<div class="box-footer">
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}" class="btn pull-right btn-danger"/>
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}"
class="btn pull-right btn-danger"/>
<a href="{{ URL.previous() }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
</div>
</div>

View File

@ -11,107 +11,105 @@
var mapboxToken = "{{ config('firefly.mapbox_api_key') }}";
</script>
{{ Form.model(account, {
'class': 'form-horizontal',
'id': 'update',
'url': route('accounts.update',account.id),
'enctype': 'multipart/form-data'
} ) }}
<input type="hidden" name="id" value="{{ account.id }}"/>
<input type="hidden" name="objectType" value="{{ objectType }}"/>
<form method="post" action="{{ route('accounts.update',account.id) }}" class="form-horizontal"
accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('name') }}
{% if account.accountType.type == 'Default account' or account.accountType.type == 'Asset account' or objectType == 'liabilities' %}
{{ CurrencyForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}
<input type="hidden" name="id" value="{{ account.id }}"/>
<input type="hidden" name="objectType" value="{{ objectType }}"/>
{% endif %}
{% if objectType == 'liabilities' %}
{{ ExpandedForm.select('liability_type_id', liabilityTypes) }}
{{ ExpandedForm.amountNoCurrency('opening_balance', null, {label:'debt_start_amount'|_}) }}
{{ ExpandedForm.select('liability_direction', liabilityDirections) }}
{{ ExpandedForm.date('opening_balance_date', null, {label:'debt_start_date'|_}) }}
{{ ExpandedForm.percentage('interest') }}
{{ ExpandedForm.select('interest_period', interestPeriods) }}
{% endif %}
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('iban') }}
{{ ExpandedForm.text('BIC', null, {maxlength: 11}) }}
{% if preFilled.account_role == 'ccAsset' %}
{{ ExpandedForm.text('account_number', null , {label:trans('form.creditCardNumber')}) }}
{% else %}
{{ ExpandedForm.text('account_number') }}
{% endif %}
{% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %}
{# get opening balance entry for this thing! #}
{{ ExpandedForm.amountNoCurrency('opening_balance',null) }}
{{ ExpandedForm.date('opening_balance_date') }}
{{ ExpandedForm.select('account_role', roles) }}
{{ ExpandedForm.amountNoCurrency('virtual_balance',null) }}
{% endif %}
{{ ExpandedForm.checkbox('include_net_worth', 1) }}
{{ ExpandedForm.textarea('notes',preFilled.notes,{helpText: trans('firefly.field_supports_markdown')}) }}
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('active', 1) }}
{# only correct way to do active checkbox #}
{{ ExpandedForm.location('location', null, {locations: locations}) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
{# panel for credit card options #}
{% if preFilled.account_role == 'ccAsset' %}
<div class="box">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'credit_card_options'|_ }}</h3>
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.select('cc_type',Config.get('firefly.ccTypes')) }}
{{ ExpandedForm.date('cc_monthly_payment_date',null,{'helpText' : trans('firefly.cc_monthly_payment_date_help')}) }}
{{ ExpandedForm.text('name') }}
{% if account.accountType.type == 'Default account' or account.accountType.type == 'Asset account' or objectType == 'liabilities' %}
{{ CurrencyForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}
{% endif %}
{% if objectType == 'liabilities' %}
{{ ExpandedForm.select('liability_type_id', liabilityTypes) }}
{{ ExpandedForm.amountNoCurrency('opening_balance', null, {label:'debt_start_amount'|_}) }}
{{ ExpandedForm.select('liability_direction', liabilityDirections) }}
{{ ExpandedForm.date('opening_balance_date', null, {label:'debt_start_date'|_}) }}
{{ ExpandedForm.percentage('interest') }}
{{ ExpandedForm.select('interest_period', interestPeriods) }}
{% endif %}
</div>
</div>
{% endif %}
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('iban') }}
{{ ExpandedForm.text('BIC', null, {maxlength: 11}) }}
{% if preFilled.account_role == 'ccAsset' %}
{{ ExpandedForm.text('account_number', null , {label:trans('form.creditCardNumber')}) }}
{% else %}
{{ ExpandedForm.text('account_number') }}
{% endif %}
{% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %}
{# get opening balance entry for this thing! #}
{{ ExpandedForm.amountNoCurrency('opening_balance',null) }}
{{ ExpandedForm.date('opening_balance_date') }}
{{ ExpandedForm.select('account_role', roles) }}
{{ ExpandedForm.amountNoCurrency('virtual_balance',null) }}
{% endif %}
{{ ExpandedForm.checkbox('include_net_worth', 1) }}
{{ ExpandedForm.textarea('notes',preFilled.notes,{helpText: trans('firefly.field_supports_markdown')}) }}
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('active', 1) }}
{# only correct way to do active checkbox #}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
{# panel for credit card options #}
{% if preFilled.account_role == 'ccAsset' %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'credit_card_options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.select('cc_type',Config.get('firefly.ccTypes')) }}
{{ ExpandedForm.date('cc_monthly_payment_date',null,{'helpText' : trans('firefly.cc_monthly_payment_date_help')}) }}
</div>
</div>
{% endif %}
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','account') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ ('update_' ~ objectType ~ '_account')|_ }}
</button>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','account') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ ('update_' ~ objectType ~ '_account')|_ }}
</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}
@ -119,14 +117,15 @@
var iAmOwed = '{{ 'i_am_owed_amount'|_|escape('js') }}';
var iOwe = '{{ 'i_owe_amount'|_|escape('js') }}';
</script>
<script src="v1/lib/leaflet/leaflet.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/accounts/edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}
{% block styles %}
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link rel="stylesheet" href="v1/lib/leaflet/leaflet.css?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
{% endblock %}

View File

@ -1,119 +1 @@
{% extends './layout/default' %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, journal) }}
{% endblock %}
{% block content %}
<form method="POST" action="{{ route('accounts.reconcile.update',journal.id) }}" accept-charset="UTF-8" class="form-horizontal" id="update"
enctype="multipart/form-data">
<input name="_token" type="hidden" value="{{ csrf_token() }}">
<input type="hidden" name="id" value="{{ journal.id }}"/>
{% if errors.all|length > 0 %}
<div class="row">
<div class="col-lg-12">
<h3 class="text-danger">{{ 'errors'|_ }}</h3>
<ul>
{% for err in errors.all %}
<li class="text-danger">{{ err }}</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{# ALWAYS AVAILABLE #}
{{ ExpandedForm.staticText('description',journal.description) }}
{# ALWAYS SHOW AMOUNT #}
{{ ExpandedForm.nonSelectableAmount('amount',data.amount, {'currency' : data.currency}) }}
{# ALWAYS SHOW DATE #}
{{ ExpandedForm.staticText('date',journal.date.isoFormat(monthAndDayFormat)) }}
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{# category always #}
{{ ExpandedForm.text('category',data.category) }}
{# tags #}
{{ ExpandedForm.text('tags') }}
</div>
</div>
{# box for attachments #}
{% if optionalFields.attachments %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optional_field_attachments'|_ }}</h3>
</div>
<div class="box-body">
{% if optionalFields.attachments %}
{# attachments #}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
{% endif %}
</div>
</div>
{% endif %}
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','transaction') }}
</div>
<div class="box-footer">
<button type="submit" class="pull-right btn btn-success">{{ ('update_reconciliation')|_ }}</button>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}
<script type="text/javascript" nonce="{{ JS_NONCE }}">
var what = "{{ what }}";
</script>
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/common/autocomplete.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/jscript/accounts?ext=.js&amp;v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/jscript/currencies?ext=.js&amp;v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript">
var journal = {{ journal.toArray()|json_encode|raw }};
var journalData = {{ data|json_encode|raw }};
</script>
<script type="text/javascript" src="v1/js/ff/accounts/edit-reconciliation.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}
{% block styles %}
<link href="v1/css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
{% endblock %}
TODO REMOVE ME

View File

@ -17,10 +17,13 @@
</h3>
<div class="box-tools pull-right">
<div class="btn-group">
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><span class="fa fa-ellipsis-v"></span></button>
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><span
class="fa fa-ellipsis-v"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ route('accounts.edit', account.id) }}"><span class="fa fa-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
<li><a href="{{ route('accounts.delete', account.id) }}"><span class="fa fa-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
<li><a href="{{ route('accounts.edit', account.id) }}"><span
class="fa fa-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
<li><a href="{{ route('accounts.delete', account.id) }}"><span
class="fa fa-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
</ul>
</div>
</div>
@ -104,16 +107,16 @@
<div class="row">
{% if(location) %}
<div class="col-lg-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'location'|_ }}</h3>
</div>
<div class="box-body">
<div id="location_map" style="width:100%;height:300px;"></div>
<div class="col-lg-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'location'|_ }}</h3>
</div>
<div class="box-body">
<div id="location_map" style="width:100%;height:300px;"></div>
</div>
</div>
</div>
</div>
{% endif %}
{% if account.notes.count() == 1 %}
<div class="col-lg-6">
@ -133,7 +136,8 @@
<div class="{% if periods|length > 0 %}col-lg-10 col-md-8 col-sm-12{% else %}col-lg-12 col-md-12 col-sm-12{% endif %}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transactions'|_ }} ({{ formatAmountBySymbol(balance, currency.symbol, currency.decimal_places, true)|raw }})</h3>
<h3 class="box-title">{{ 'transactions'|_ }}
({{ formatAmountBySymbol(balance, currency.symbol, currency.decimal_places, true)|raw }})</h3>
</div>
<div class="box-body">
{% if account.accountType.type == 'Asset account' %}
@ -168,15 +172,11 @@
{% block scripts %}
<script type="text/javascript" nonce="{{ JS_NONCE }}">
var doPlaceMarker = false;
// location stuff
{% if location %}
var latitude = {{ location.latitude|default("52.3167") }};
var longitude = {{ location.longitude|default("5.5500") }};
var zoomLevel = {{ location.zoom_level|default("6") }};
doPlaceMarker = true;
// token for Mapbox:
var mapboxToken = "{{ config('firefly.mapbox_api_key') }}";
var latitude = {{ location.latitude|default("52.3167") }};
var longitude = {{ location.longitude|default("5.5500") }};
var zoomLevel = {{ location.zoom_level|default("6") }};
{% endif %}
var showAll = true;
@ -207,13 +207,16 @@
{% if location %}
<script src="v1/lib/leaflet/leaflet.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endif %}
<script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/chartjs-plugin-annotation.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/chartjs-plugin-annotation.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.defaults.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>
<script src="v1/js/lib/jquery.color-2.1.2.min.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>
<script src="v1/js/lib/jquery.color-2.1.2.min.js?v={{ FF_VERSION }}" type="text/javascript"
nonce="{{ JS_NONCE }}"></script>
<script src="v1/js/ff/accounts/show.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>
{# required for groups.twig #}
<script type="text/javascript" src="v1/js/ff/list/groups.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
@ -221,6 +224,6 @@
{% block styles %}
{% if location %}
<link rel="stylesheet" href="v1/lib/leaflet/leaflet.css?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}">
<link rel="stylesheet" href="v1/lib/leaflet/leaflet.css?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}">
{% endif %}
{% endblock %}

View File

@ -6,7 +6,8 @@
{% block content %}
<form method="POST" action="{{ route('admin.links.destroy',linkType.id) }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">
<form method="POST" action="{{ route('admin.links.destroy',linkType.id) }}" accept-charset="UTF-8"
class="form-horizontal" id="destroy">
<input name="_token" type="hidden" value="{{ csrf_token() }}">
<div class="row">
<div class="col-lg-6 col-lg-offset-3 col-md-12 col-sm-12">
@ -34,7 +35,7 @@
</p>
<p>
{{ Form.select('move_link_type_before_delete', moveTo, null, {class: 'form-control'}) }}
{{ Html.select('move_link_type_before_delete', moveTo).class('form-control') }}
</p>
{% else %}
<input type="hidden" name="move_link_type_before_delete" value="0"/>
@ -42,7 +43,8 @@
</div>
<div class="box-footer">
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}" class="btn pull-right btn-danger"/>
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}"
class="btn pull-right btn-danger"/>
<a href="{{ URL.previous() }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
</div>
</div>

View File

@ -6,44 +6,46 @@
{% block content %}
{{ Form.model(linkType, {'class' : 'form-horizontal','id' : 'update','url' : route('admin.links.update', linkType.id) } ) }}
<input type="hidden" name="id" value="{{ linkType.id }}"/>
<input name="_token" type="hidden" value="{{ csrf_token() }}">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('name', null, {helpText: trans('firefly.link_type_help_name')}) }}
{{ ExpandedForm.text('inward', null, {helpText: trans('firefly.link_type_help_inward')}) }}
{{ ExpandedForm.text('outward', null, {helpText: trans('firefly.link_type_help_outward')}) }}
<form method="post" action="{{ route('admin.links.update', linkType.id) }}" class="form-horizontal"
accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="id" value="{{ linkType.id }}"/>
<input name="_token" type="hidden" value="{{ csrf_token() }}">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('name', null, {helpText: trans('firefly.link_type_help_name')}) }}
{{ ExpandedForm.text('inward', null, {helpText: trans('firefly.link_type_help_inward')}) }}
{{ ExpandedForm.text('outward', null, {helpText: trans('firefly.link_type_help_outward')}) }}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','link_type') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ ('update_link_type')|_ }}
</button>
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','link_type') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ ('update_link_type')|_ }}
</button>
</div>
</div>
</div>
</div>
</div>
</form>

View File

@ -5,53 +5,55 @@
{% endblock %}
{% block content %}
<form method="post" action="{{ route('admin.users.update',user.id) }}" class="form-horizontal"
accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
{{ Form.model(user, {'class' : 'form-horizontal','id' : 'update','url' : route('admin.users.update',user.id) } ) }}
<input type="hidden" name="id" value="{{ user.id }}"/>
<input type="hidden" name="id" value="{{ user.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{% if canEditDetails %}
{{ ExpandedForm.text('email',null,{'helpText': trans('firefly.admin_update_email')}) }}
{{ ExpandedForm.password('password') }}
{{ ExpandedForm.password('password_confirmation') }}
{% else %}
<input type="hidden" name="email" value="{{ user.email }}"/>
<input type="hidden" name="password" value=""/>
<input type="hidden" name="password_confirmation" value=""/>
{% endif %}
{{ ExpandedForm.checkbox('blocked') }}
{{ ExpandedForm.select('blocked_code', codes, user.blocked_code) }}
{% if user.id != currentUser.id %}
{{ ExpandedForm.checkbox('is_owner',1,isAdmin) }}
{% endif %}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{% if canEditDetails %}
{{ ExpandedForm.text('email',null,{'helpText': trans('firefly.admin_update_email')}) }}
{{ ExpandedForm.password('password') }}
{{ ExpandedForm.password('password_confirmation') }}
{% else %}
<input type="hidden" name="email" value="{{ user.email }}"/>
<input type="hidden" name="password" value=""/>
<input type="hidden" name="password_confirmation" value=""/>
{% endif %}
{{ ExpandedForm.checkbox('blocked') }}
{{ ExpandedForm.select('blocked_code', codes, user.blocked_code) }}
{% if user.id != currentUser.id %}
{{ ExpandedForm.checkbox('is_owner',1,isAdmin) }}
{% endif %}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','account') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ ('update_user')|_ }}
</button>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','account') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ ('update_user')|_ }}
</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}

View File

@ -6,85 +6,93 @@
{% block content %}
{{ Form.model(bill, {'class' : 'form-horizontal','enctype': 'multipart/form-data','id' : 'update','url' : route('bills.update', bill.id)}) }}
<form method="post" action="{{ route('bills.update', bill.id) }}" class="form-horizontal" accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="id" value="{{ bill.id }}"/>
<input type="hidden" name="id" value="{{ bill.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{% if rules.count() > 0 %}
{{ ExpandedForm.text('name',null, {helpText: trans_choice('firefly.bill_edit_rules', rules.count())}) }}
{% else %}
{{ ExpandedForm.text('name') }}
{% endif %}
{{ CurrencyForm.currencyList('transaction_currency_id') }}
{{ ExpandedForm.amountNoCurrency('amount_min') }}
{{ ExpandedForm.amountNoCurrency('amount_max') }}
{{ ExpandedForm.date('date',bill.date.format('Y-m-d')) }}
{{ ExpandedForm.select('repeat_freq',periods) }}
{{ ExpandedForm.integer('skip') }}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
</div>
<div class="box-body">
{% if rules.count() > 0 %}
{{ ExpandedForm.text('name',null, {helpText: trans_choice('firefly.bill_edit_rules', rules.count())}) }}
{% else %}
{{ ExpandedForm.text('name') }}
{% endif %}
{{ CurrencyForm.currencyList('transaction_currency_id') }}
{{ ExpandedForm.amountNoCurrency('amount_min') }}
{{ ExpandedForm.amountNoCurrency('amount_max') }}
{{ ExpandedForm.date('date',bill.date.format('Y-m-d')) }}
{{ ExpandedForm.select('repeat_freq',periods) }}
{{ ExpandedForm.integer('skip') }}
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.date('bill_end_date',null, {'helpText': trans('firefly.bill_end_date_help')}) }}
{{ ExpandedForm.date('extension_date',null,{'helpText': trans('firefly.bill_extension_date_help')} ) }}
{{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
{{ ExpandedForm.objectGroup() }}
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('active', 1) }}
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.date('bill_end_date',null, {'helpText': trans('firefly.bill_end_date_help')}) }}
{{ ExpandedForm.date('extension_date',null,{'helpText': trans('firefly.bill_extension_date_help')} ) }}
{{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
{{ ExpandedForm.objectGroup() }}
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('active', 1) }}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','bill') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ 'update_bill'|_ }}
</button>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','bill') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ 'update_bill'|_ }}
</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block styles %}
<link href="v1/css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all"
nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/accounts/edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{# auto complete for object groups #}
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/object-groups/create-edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/object-groups/create-edit.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
{% endblock %}

View File

@ -5,54 +5,56 @@
{% endblock %}
{% block content %}
{{ Form.model(budget, {'class' : 'form-horizontal','enctype': 'multipart/form-data','id' : 'update','url' : route('budgets.update',budget.id) } ) }}
<input type="hidden" name="id" value="{{ budget.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
<form method="post" action="{{ route('budgets.update',budget.id) }}" class="form-horizontal" accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="id" value="{{ budget.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('active', 1) }}
{{ ExpandedForm.text('name') }}
</div>
</div>
<div class="box-body">
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('active', 1) }}
{{ ExpandedForm.text('name') }}
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for auto-budget #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.select('auto_budget_type', autoBudgetTypes, autoBudget.auto_budget_type) }}
{{ CurrencyForm.currencyList('auto_budget_currency_id', autoBudget.transaction_currency_id) }}
{{ ExpandedForm.amountNoCurrency('auto_budget_amount', preFilled.auto_budget_amount) }}
{{ ExpandedForm.select('auto_budget_period', autoBudgetPeriods, autoBudget.period) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for auto-budget #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.select('auto_budget_type', autoBudgetTypes, autoBudget.auto_budget_type) }}
{{ CurrencyForm.currencyList('auto_budget_currency_id', autoBudget.transaction_currency_id) }}
{{ ExpandedForm.amountNoCurrency('auto_budget_amount', preFilled.auto_budget_amount) }}
{{ ExpandedForm.select('auto_budget_period', autoBudgetPeriods, autoBudget.period) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','budget') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">{{ 'update_budget'|_ }}</button>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','budget') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">{{ 'update_budget'|_ }}</button>
</div>
</div>
</div>
</div>
</div>
</form>

View File

@ -5,52 +5,57 @@
{% endblock %}
{% block content %}
{{ Form.model(category, {'class' : 'form-horizontal','enctype': 'multipart/form-data','id' : 'update','url' : route('categories.update',category.id)}) }}
<input type="hidden" name="id" value="{{ category.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
<form method="post" action="{{ route('categories.update',category.id) }}" class="form-horizontal"
accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="id" value="{{ category.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('name') }}
</div>
</div>
<div class="box-body">
{{ ExpandedForm.text('name') }}
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for optional fields #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.textarea('notes', preFilled.notes, {helpText: trans('firefly.field_supports_markdown')} ) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for optional fields#}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.textarea('notes', preFilled.notes, {helpText: trans('firefly.field_supports_markdown')} ) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','category') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ 'update_category'|_ }}
</button>
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','category') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ 'update_category'|_ }}
</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}

View File

@ -5,44 +5,47 @@
{% endblock %}
{% block content %}
{{ Form.model(currency, {'class' : 'form-horizontal','id' : 'update','url' : route('currencies.update',currency.id)}) }}
<form method="post" action="{{ route('currencies.update',currency.id) }}" class="form-horizontal"
accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="id" value="{{ currency.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
{{ ExpandedForm.text('symbol',null,{'maxlength' : 51}) }}
{{ ExpandedForm.text('code',null,{'maxlength' : 51}) }}
{{ ExpandedForm.integer('decimal_places',null,{'maxlength' : 2,'min': 0,'max': 12}) }}
{{ ExpandedForm.checkbox('enabled',null) }}
<input type="hidden" name="id" value="{{ currency.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
{{ ExpandedForm.text('symbol',null,{'maxlength' : 51}) }}
{{ ExpandedForm.text('code',null,{'maxlength' : 51}) }}
{{ ExpandedForm.integer('decimal_places',null,{'maxlength' : 2,'min': 0,'max': 12}) }}
{{ ExpandedForm.checkbox('enabled',null) }}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','currency') }}
</div>
<div class="box-footer">
<button type="submit" class="btn btn-success pull-right">
{{ 'update_currency'|_ }}
</button>
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','currency') }}
</div>
<div class="box-footer">
<button type="submit" class="btn btn-success pull-right">
{{ 'update_currency'|_ }}
</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}

View File

@ -1,7 +1,7 @@
<div class="{{ classes }}" id="{{ name }}_holder">
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
<div class="col-sm-8">
{{ Form.input('number', name, value, options) }}
{{ Html.input('number', name, value).class('form-control').attribute('step','any').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder',options.placeholder) }}
{% include 'form.help' %}
{% include 'form.feedback' %}
</div>

View File

@ -1,24 +1 @@
<div class="input-group">
<div class="input-group-btn">
<button type="button"
class="btn btn-default dropdown-toggle currency-dropdown" id="currency_dropdown_{{ name }}" data-toggle="dropdown"
aria-expanded="false">
<span id="currency_select_symbol_{{ name }}">{{ defaultCurrency.symbol|raw }}</span> <span class="caret"></span>
</button>
<ul class="dropdown-menu currency-dropdown-menu" role="menu">
{% for currency in currencies %}
<li>
<a href="#"
class="currency-option"
data-id="{{ currency.id }}"
data-name="{{ name }}"
data-currency="{{ currency.code }}"
data-symbol="{{ currency.symbol|raw }}">{{ currency.name }}</a></li>
{% endfor %}
</ul>
</div>
{{ Form.input('number', name, value, options) }}
</div>
<input type="hidden" name="amount_currency_id_{{ name }}" value="{{ defaultCurrency.id }}"/>
TODO REPLACE ME

View File

@ -1,33 +1 @@
<div class="{{ classes }}" id="{{ name }}_holder">
<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 currency-dropdown" id="currency_dropdown_{{ name }}" data-toggle="dropdown"
aria-expanded="false">
<span id="currency_select_symbol_{{ name }}">{{ defaultCurrency.symbol|raw }}</span> <span class="caret"></span>
</button>
<ul class="dropdown-menu currency-dropdown-menu" role="menu">
{% for currency in currencies %}
<li>
<a href="#"
class="currency-option"
data-id="{{ currency.id }}"
data-name="{{ name }}"
data-currency="{{ currency.code }}"
data-symbol="{{ currency.symbol|raw }}">{{ currency.name }}</a></li>
{% endfor %}
</ul>
</div>
{{ Form.input('number', name, value, options) }}
</div>
{% include 'form.feedback' %}
</div>
<!-- Going to put in this value: {{ defaultCurrency.id }} -->
<input type="hidden" name="amount_currency_id_{{ name }}" value="{{ defaultCurrency.id }}" data-backup="{{ defaultCurrency.id }}"/>
</div>
TODO REPLACE ME

View File

@ -3,14 +3,14 @@
<div class="col-sm-8">
{% for groupName, accounts in grouped %}
<strong>{{ groupName }}</strong><br />
<strong>{{ groupName }}</strong><br/>
{% for id, account in accounts %}
<div class="checkbox" style="margin-left:2em;">
<label>
{% if account in selected or (selected|length == 0 and options.select_all == true) %}
{{ Form.checkbox(name~'[]', id, true, options) }}
{{ Html.checkbox(name~'[]',true).id(id) }}
{% else %}
{{ Form.checkbox(name~'[]', id, false, options) }}
{{ Html.checkbox(name~'[]',false).id(id) }}
{% endif %}
{{ account|escape }}
</label>

View File

@ -5,9 +5,11 @@
<div class="input-group">
<div class="input-group-btn">
<button type="button"
class="btn btn-default dropdown-toggle currency-dropdown" id="currency_dropdown_{{ name }}" data-toggle="dropdown"
class="btn btn-default dropdown-toggle currency-dropdown" id="currency_dropdown_{{ name }}"
data-toggle="dropdown"
aria-expanded="false">
<span id="currency_select_symbol_{{ name }}">{{ defaultCurrency.symbol|raw }}</span> <span class="caret"></span>
<span id="currency_select_symbol_{{ name }}">{{ defaultCurrency.symbol|raw }}</span> <span
class="caret"></span>
</button>
<ul class="dropdown-menu currency-dropdown-menu" role="menu">
{% for currency in currencies %}
@ -21,8 +23,7 @@
{% endfor %}
</ul>
</div>
{{ Form.input('number', name, value, options) }}
{{ Html.input('number', name, value).class('form-control').attribute('step','any') }}
</div>

View File

@ -10,7 +10,7 @@
<div class="{% if options.small %}col-sm-4{% else %}col-sm-8{% endif %}">
<div class="checkbox">
<label>
{{ Form.checkbox(name, value, options.checked, options) }}
{{ Html.checkbox(name, options.checked, value) }}
</label>
</div>
{% include 'form.help' %}

View File

@ -6,7 +6,7 @@
<div class="input-group-addon">
<span class="fa fa-calendar"></span>
</div>
{{ Form.input('date', name, value, options) }}
{{ Html.input('date', name, value).class('form-control').attribute('autocomplete','off').attribute('spellcheck','false') }}
</div>
{% include 'form.help' %}
{% include 'form.feedback' %}

View File

@ -2,7 +2,7 @@
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
<div class="col-sm-8">
{{ Form.file(name, options) }}
{{ Html.input('file',name).attribute('multiple','multiple').class('form-control') }}
{% include 'form.help' %}
{% include 'form.feedback' %}
</div>

View File

@ -2,7 +2,7 @@
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
<div class="col-sm-8">
{{ Form.input('number', name, value, options) }}
{{ Html.input('number', name, value).attribute('step',options.step).attribute('autocomplete','off').attribute('spellcheck', 'false').class('form-control').attribute('placeholder',options.placeholder) }}
{% include 'form.help' %}
{% include 'form.feedback' %}
</div>

View File

@ -1,114 +1 @@
<div class="{{ classes }}" id="{{ name }}_holder">
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
<div class="col-sm-8">
{% if config('firefly.mapbox_api_key') == '' %}
<p class="text-danger">
{{ trans('firefly.mapbox_api_key')|raw }}
</p>
{% else %}
<div id="{{ name }}_map" style="width:100%;height:300px;"></div>
<div id="{{ name }}_map_canvas"></div>
<p class="help-block">
{{ 'press_object_location'|_ }}
<button class="btn btn-default btn-xs" type="button" id="{{ name }}_clear_location">{{ 'clear_location'|_ }}</button>
</p>
{# latitude #}
<input type="hidden" name="{{ name }}_latitude" value="{{ options.locations[name].latitude|default('52.3167') }}"/>
{# longitude #}
<input type="hidden" name="{{ name }}_longitude" value="{{ options.locations[name].longitude|default('5.5500') }}"/>
{# zoomlevel #}
<input type="hidden" name="{{ name }}_zoom_level" value="{{ options.locations[name].zoom_level|default('6') }}"/>
{# has location set? #}
<input type="hidden" name="{{ name }}_has_location" value="{{ options.locations[name].has_location|default('false') }}"/>
{% include 'form.feedback' %}
{% endif %}
</div>
</div>
{% if config('firefly.mapbox_api_key') != '' %}
{% set latitudevar = name~'_latitude' %}
{% set longitudevar = name~'_longitude' %}
{% set zoomlevelvar = name~'_zoom_level' %}
{% set haslocationvar = name~'_has_location' %}
{% set clearvar = name~'_clear_location' %}
<script type="text/javascript" nonce="{{ JS_NONCE }}">
var mymap;
var marker;
if (typeof locations.{{ name }}.latitude === 'undefined') {
locations.{{ name }}.latitude = '52.3167';
}
if (typeof locations.{{ name }}.longitude === 'undefined') {
locations.{{ name }}.longitude = '5.5500';
}
if (typeof locations.{{ name }}.zoom_level === 'undefined') {
locations.{{ name }}.zoom_level = '6';
}
if (typeof mapboxToken === 'undefined') {
var mapboxToken = 'invalid';
}
window.onload = function () {
document.getElementById('{{ clearvar }}').addEventListener('click', function () {
if (typeof marker !== 'undefined') {
marker.remove();
$('input[name="{{ haslocationvar }}"]').val('false');
$('input[name="{{ latitudevar }}"]').val('');
$('input[name="{{ longitudevar }}"]').val('');
$('input[name="{{ zoomlevelvar }}"]').val('');
}
});
};
// set location thing:
function setObjectLocation(e) {
if (typeof e.latlng !== 'undefined') {
console.log('Set object location: lat(' + e.latlng.lat + '), long(' + e.latlng.lng + '), zoom (' + mymap.getZoom() + ')');
$('input[name="{{ latitudevar }}"]').val(e.latlng.lat);
$('input[name="{{ longitudevar }}"]').val(e.latlng.lng);
$('input[name="{{ haslocationvar }}"]').val('true');
}
if (typeof e.latlng === 'undefined') {
console.log('Set object zoom level to ' + mymap.getZoom());
}
$('input[name="{{ zoomlevelvar }}"]').val(mymap.getZoom());
// remove existing marker:
if (typeof marker !== 'undefined' && typeof e.latlng !== 'undefined') {
marker.remove();
}
if (typeof e.latlng !== 'undefined') {
// new marker
marker = L.marker({lat: e.latlng.lat, lng: e.latlng.lng}).addTo(mymap);
}
}
document.addEventListener("DOMContentLoaded", function () {
"use strict";
// make map:
mymap = L.map('{{ name }}_map').setView({lat: locations.{{ name }}.latitude, lng: locations.{{ name }}.longitude}, locations.{{ name }}.zoom_level);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?access_token={accessToken}', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
maxZoom: 18,
id: 'mapbox.streets',
accessToken: mapboxToken
}).addTo(mymap);
mymap.on('contextmenu', setObjectLocation);
mymap.on('zoomend', setObjectLocation);
// add marker
if (typeof locations.{{ name }}.has_location !== 'undefined' && locations.{{ name }}.has_location === true) {
marker = L.marker({lat: locations.{{ name }}.latitude, lng: locations.{{ name }}.longitude}).addTo(mymap);
}
});
</script>
{% endif %}
TODO REMOVE ME 3

View File

@ -1,11 +1 @@
<div class="{{ classes }}" id="{{ name }}_holder">
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon non-selectable-currency-symbol">{{ selectedCurrency.symbol }}</span>
{{ Form.input('number', name, value, options) }}
</div>
{% include 'form.feedback' %}
</div>
</div>
TODO REMOVE ME 1

View File

@ -1,9 +1 @@
<div class="{{ classes }}" id="{{ name }}_holder">
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
<div class="col-sm-8">
{{ Form.input('number', name, value, options) }}
{% include 'form.help' %}
{% include 'form.feedback' %}
</div>
</div>
TODO REMOVE ME

View File

@ -2,7 +2,7 @@
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
<div class="col-sm-8">
{{ Form.input('text', name, value, options) }}
{{ Html.input('text', name, value).class('form-control').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder',options.placeholder) }}
{% include 'form.help' %}
{% include 'form.feedback' %}
</div>

View File

@ -7,7 +7,7 @@
<div class="col-sm-8">
<div class="checkbox">
<label>
{{ Form.checkbox('create_another', '1', false, {'id': name ~ '_return_to_form'}) }}
{{ Html.checkbox('create_another', false).id(name ~ '_return_to_form') }}
{{ trans('form.returnHereExplanation') }}
</label>
@ -24,7 +24,7 @@
<div class="col-sm-8">
<div class="checkbox"><label>
{{ Form.checkbox('return_to_edit', '1', null, {'id': name ~ '_return_to_edit'}) }}
{{ Html.checkbox('return_to_edit', null).id(name ~ '_return_to_edit') }}
{{ trans('form.returnHereUpdateExplanation') }}
</label>
</div>

View File

@ -2,7 +2,7 @@
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
<div class="col-sm-8">
{{ Form.input('password', name, value, options) }}
{{ Html.input('password', name, value).class('form-control').attribute('placeholder',options.placeholder).attribute('autocomplete','off').attribute('spellcheck','false') }}
{% include 'form.help' %}
{% include 'form.feedback' %}
</div>

View File

@ -3,7 +3,7 @@
<div class="col-sm-8">
<div class="input-group">
{{ Form.input('number', name, value, options) }}
{{ Html.input('number', name, value).attribute('step',options.step).attribute('autocomplete','off').attribute('spellcheck', 'false').class('form-control').attribute('placeholder',options.placeholder) }}
<div class="input-group-addon">%</div>
</div>
{% include 'form.help' %}

View File

@ -2,7 +2,7 @@
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
<div class="col-sm-8">
{{ Form.select(name, list, selected , options ) }}
{{ Html.select(name, list, selected).class('form-control').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder',options.placeholder) }}
{% include 'form.help' %}
{% include 'form.feedback' %}

View File

@ -1,8 +1 @@
<div class="{{ classes }}" id="{{ name }}_holder">
<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>
TODO REMOVE ME

View File

@ -2,7 +2,7 @@
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
<div class="col-sm-8">
{{ Form.input('text', name, value, options) }}
{{ Html.input('text', name, value).class('form-control').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder',options.placeholder) }}
{% include 'form.help' %}
{% include 'form.feedback' %}
</div>

View File

@ -2,7 +2,7 @@
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
<div class="col-sm-8">
{{ Form.textarea(name, value, options) }}
{{ Html.textarea(name, value).attribute('rows', options.rows).class('form-control').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder',options.placeholder) }}
{% include 'form.help' %}
{% include 'form.feedback' %}
</div>

View File

@ -34,19 +34,21 @@
{{ 'savings_balance_text'|_ }}
</p>
{{ ExpandedForm.number('savings_balance',0) }}
{{ ExpandedForm.integer('savings_balance',0, {"step": "any"}) }}
<p>
{{ 'set_preferred_language'|_ }}
</p>
<div id="language_holder" class="form-group">
<label for="language_holder_select" class="col-sm-4 control-label">{{ 'language'|_ }}</label>
<label for="language_holder_select"
class="col-sm-4 control-label">{{ 'language'|_ }}</label>
<div class="col-sm-8">
<select class="form-control" id="lang_holder" name="language">
{% for key, lang in Config.get('firefly.languages') %}
<option {% if language == key %}
selected
{% endif %} value="{{ key }}">{{ lang.name_locale }} ({{ lang.name_english }})</option>
{% endif %} value="{{ key }}">{{ lang.name_locale }} ({{ lang.name_english }})
</option>
{% endfor %}
</select>

View File

@ -5,54 +5,63 @@
{% endblock %}
{% block content %}
{{ Form.model(objectGroup, {'class' : 'form-horizontal','enctype': 'multipart/form-data','id' : 'update','url' : route('object-groups.update',objectGroup.id)}) }}
<form method="post" action="{{ route('object-groups.update',objectGroup.id) }}" class="form-horizontal"
accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="id" value="{{ objectGroup.id }}"/>
<input type="hidden" name="id" value="{{ objectGroup.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('title') }}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('title') }}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','object group') }}
</div>
<div class="box-footer">
<button type="submit" class="btn btn-success pull-right">
{{ 'update_object_group'|_ }}
</button>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','object group') }}
</div>
<div class="box-footer">
<button type="submit" class="btn btn-success pull-right">
{{ 'update_object_group'|_ }}
</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/piggy-banks/create.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/piggy-banks/create.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
{# auto complete for object groups #}
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/object-groups/create-edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/object-groups/create-edit.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
{% endblock %}
{% block styles %}
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
{% endblock %}

View File

@ -5,73 +5,82 @@
{% endblock %}
{% block content %}
{{ Form.model(piggyBank, {'class' : 'form-horizontal','enctype': 'multipart/form-data','id' : 'update','url' : route('piggy-banks.update',piggyBank.id)}) }}
<form method="post" action="{{ route('piggy-banks.update',piggyBank.id) }}" class="form-horizontal"
accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="repeats" value="0"/>
<input type="hidden" name="id" value="{{ piggyBank.id }}"/>
<input type="hidden" name="repeats" value="0"/>
<input type="hidden" name="id" value="{{ piggyBank.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('name') }}
{{ AccountForm.assetAccountList('account_id', null, {label: 'saveOnAccount'|_ }) }}
{{ ExpandedForm.amountNoCurrency('targetamount') }}
</div>
</div>
<div class="box-body">
{{ ExpandedForm.text('name') }}
{{ AccountForm.assetAccountList('account_id', null, {label: 'saveOnAccount'|_ }) }}
{{ ExpandedForm.amountNoCurrency('targetamount') }}
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.date('startdate') }}
{{ ExpandedForm.date('targetdate') }}
{{ ExpandedForm.textarea('notes', null, {helpText: trans('firefly.field_supports_markdown')}) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
{{ ExpandedForm.objectGroup() }}
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.date('startdate') }}
{{ ExpandedForm.date('targetdate') }}
{{ ExpandedForm.textarea('notes', null, {helpText: trans('firefly.field_supports_markdown')}) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
{{ ExpandedForm.objectGroup() }}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','piggy bank') }}
</div>
<div class="box-footer">
<button type="submit" class="btn btn-success pull-right">
{{ 'update_piggy_button'|_ }}
</button>
</div>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','piggy bank') }}
</div>
<div class="box-footer">
<button type="submit" class="btn btn-success pull-right">
{{ 'update_piggy_button'|_ }}
</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/piggy-banks/create.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/piggy-banks/create.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
{# auto complete for object groups #}
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/object-groups/create-edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/object-groups/create-edit.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
{% endblock %}
{% block styles %}
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
{% endblock %}

View File

@ -4,7 +4,8 @@
{% endblock %}
{% block content %}
<form action="{{ route('recurring.store') }}" method="post" id="store" class="form-horizontal" enctype="multipart/form-data">
<form action="{{ route('recurring.store') }}" method="post" id="store" class="form-horizontal"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
{# row with recurrence information #}
<div class="row">
@ -20,15 +21,16 @@
{{ preFilled.first_date.format('Y-m-d') }}
{{ ExpandedForm.date('first_date',null, {helpText: trans('firefly.help_first_date'), min: preFilled.first_date}) }}
{{ ExpandedForm.select('repetition_type', [], null, {helpText: trans('firefly.change_date_other_options')}) }}
{{ ExpandedForm.number('skip', 0) }}
{{ ExpandedForm.integer('skip',0) }}
{{ ExpandedForm.select('weekend', weekendResponses, null, {helpText: trans('firefly.help_weekend')}) }}
{{ ExpandedForm.select('repetition_end', repetitionEnds) }}
{{ ExpandedForm.date('repeat_until',null) }}
{{ ExpandedForm.number('repetitions',null) }}
{{ ExpandedForm.integer('repetitions',null) }}
{# calendar in popup #}
<div class="form-group" id="calendar_holder">
<label for="ffInput_calendar" class="col-sm-4 control-label">{{ trans('form.calendar') }}</label>
<label for="ffInput_calendar"
class="col-sm-4 control-label">{{ trans('form.calendar') }}</label>
<div class="col-sm-8">
<p class="form-control-static" id="ffInput_calendar">
@ -67,7 +69,7 @@
</div>
<div class="box-body">
<p><em>{{ 'mandatory_fields_for_tranaction'|_ }}</em></p>
{# three buttons to distinguish type of transaction#}
{# three buttons to distinguish type of transaction #}
<div class="form-group" id="name_holder">
<label for="ffInput_type" class="col-sm-4 control-label">
{{ trans('form.transaction_type') }}
@ -75,14 +77,17 @@
<div class="col-sm-8">
<div class="btn-group btn-group-sm">
<a href="#" class="btn btn-default switch-button" data-value="withdrawal">{{ 'withdrawal'|_ }}</a>
<a href="#" class="btn btn-default switch-button" data-value="deposit">{{ 'deposit'|_ }}</a>
<a href="#" class="btn btn-default switch-button" data-value="transfer">{{ 'transfer'|_ }}</a>
<a href="#" class="btn btn-default switch-button"
data-value="withdrawal">{{ 'withdrawal'|_ }}</a>
<a href="#" class="btn btn-default switch-button"
data-value="deposit">{{ 'deposit'|_ }}</a>
<a href="#" class="btn btn-default switch-button"
data-value="transfer">{{ 'transfer'|_ }}</a>
</div>
</div>
</div>
<input type="hidden" name="transaction_type" value="">
{# end of three buttons#}
{# end of three buttons #}
{{ ExpandedForm.text('transaction_description') }}
{# transaction information (mandatory) #}
@ -99,7 +104,7 @@
{{ AccountForm.longAccountList('destination_id', null, {label: trans('form.asset_destination_account')} ) }}
{# destination account name for withdrawals #}
{#{{ ExpandedForm.text('destination_name', null, {label: trans('form.expense_account')}) }} #}
{# {{ ExpandedForm.text('destination_name', null, {label: trans('form.expense_account')}) }} #}
{# NEW for withdrawals, also a drop down with expense accounts, loans, debts, mortgages or (cash). #}
{{ AccountForm.activeWithdrawalDestinations('withdrawal_destination_id', null, {label: trans('form.withdrawal_destination_id')}) }}
@ -164,60 +169,70 @@
</div>
</div>
{#
<div class="row">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'expected_repetitions'|_ }}</h3>
</div>
<div class="box-body">
Here.
</div>
<div class="row">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'expected_repetitions'|_ }}</h3>
</div>
<div class="box-body">
Here.
</div>
</div>
</div>
</div>
</div>
</div>
#}
</form>
{# calendar modal #}
<div class="modal fade" id="calendarModal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ 'recurring_calendar_view'|_ }}</h4>
</div>
<div class="modal-body">
<div id="recurring_calendar" style="max-width: 400px;margin: 0 auto;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ 'recurring_calendar_view'|_ }}</h4>
</div>
<div class="modal-body">
<div id="recurring_calendar" style="max-width: 400px;margin: 0 auto;">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/common/autocomplete.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/common/autocomplete.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/lib/fc/fullcalendar.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/lib/fc/fullcalendar.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" nonce="{{ JS_NONCE }}">
var transactionType = "{{ preFilled.transaction_type }}";
var suggestUrl = "{{ route('recurring.suggest') }}";
var eventsUrl = "{{ route('recurring.events') }}";
var oldRepetitionType= "{{ oldRepetitionType }}";
var oldRepetitionType = "{{ oldRepetitionType }}";
</script>
<script type="text/javascript" src="v1/js/ff/recurring/create.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/recurring/create.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
{% endblock %}
{% block styles %}
<link href="v1/css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/lib/fc/fullcalendar.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all"
nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/lib/fc/fullcalendar.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all"
nonce="{{ JS_NONCE }}">
{% endblock %}

View File

@ -4,8 +4,11 @@
{% endblock %}
{% block content %}
{{ Form.model(recurrence, {'class' : 'form-horizontal','enctype': 'multipart/form-data','id' : 'update','url' : route('recurring.update', recurrence.id)}) }}
<form method="post" action="{{ route('recurring.update', recurrence.id) }}" class="form-horizontal"
accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
{# row with recurrence information #}
<div class="row">
@ -16,19 +19,20 @@
<h3 class="box-title">{{ 'mandatory_for_recurring'|_ }}</h3>
</div>
<div class="box-body">
<input type="hidden" name="id" value="{{ array.id }}" />
<input type="hidden" name="id" value="{{ array.id }}"/>
{{ ExpandedForm.text('title') }}
{{ ExpandedForm.date('first_date',array.first_date, {helpText: trans('firefly.help_first_date_no_past')}) }}
{{ ExpandedForm.select('repetition_type', [], null, {helpText: trans('firefly.change_date_other_options')}) }}
{{ ExpandedForm.number('skip', array.repetitions[0].skip) }}
{{ ExpandedForm.integer('skip', array.repetitions[0].skip) }}
{{ ExpandedForm.select('weekend', weekendResponses, array.repetitions[0].weekend, {helpText: trans('firefly.help_weekend')}) }}
{{ ExpandedForm.select('repetition_end', repetitionEnds, repetitionEnd) }}
{{ ExpandedForm.date('repeat_until',array.repeat_until) }}
{{ ExpandedForm.number('repetitions', array.nr_of_repetitions) }}
{{ ExpandedForm.integer('repetitions', array.nr_of_repetitions) }}
{# calendar in popup #}
<div class="form-group" id="calendar_holder">
<label for="ffInput_calendar" class="col-sm-4 control-label">{{ trans('form.calendar') }}</label>
<label for="ffInput_calendar"
class="col-sm-4 control-label">{{ trans('form.calendar') }}</label>
<div class="col-sm-8">
<p class="form-control-static" id="ffInput_calendar">
@ -67,7 +71,7 @@
</div>
<div class="box-body">
<p><em>{{ 'mandatory_fields_for_tranaction'|_ }}</em></p>
{# three buttons to distinguish type of transaction#}
{# three buttons to distinguish type of transaction #}
<div class="form-group" id="name_holder">
<label for="ffInput_type" class="col-sm-4 control-label">
{{ trans('form.transaction_type') }}
@ -75,14 +79,17 @@
<div class="col-sm-8">
<div class="btn-group btn-group-sm">
<a href="#" class="btn btn-default switch-button" data-value="withdrawal">{{ 'withdrawal'|_ }}</a>
<a href="#" class="btn btn-default switch-button" data-value="deposit">{{ 'deposit'|_ }}</a>
<a href="#" class="btn btn-default switch-button" data-value="transfer">{{ 'transfer'|_ }}</a>
<a href="#" class="btn btn-default switch-button"
data-value="withdrawal">{{ 'withdrawal'|_ }}</a>
<a href="#" class="btn btn-default switch-button"
data-value="deposit">{{ 'deposit'|_ }}</a>
<a href="#" class="btn btn-default switch-button"
data-value="transfer">{{ 'transfer'|_ }}</a>
</div>
</div>
</div>
<input type="hidden" name="transaction_type" value="">
{# end of three buttons#}
{# end of three buttons #}
{{ ExpandedForm.text('transaction_description', array.transactions[0].description) }}
{# transaction information (mandatory) #}
{{ CurrencyForm.currencyList('transaction_currency_id', array.transactions[0].currency_id) }}
@ -119,7 +126,7 @@
{{ ExpandedForm.select('budget_id', budgets, array.transactions[0].budget_id) }}
{% else %}
{{ ExpandedForm.select('budget_id', budgets, array.transactions[0].budget_id, {helpText: trans('firefly.no_budget_pointer', {link: route('budgets.index')})}) }}
{#budgets#}
{# budgets #}
{% endif %}
{# CATEGORY ALWAYS #}
@ -143,8 +150,8 @@
</div>
{# row with submit stuff. #}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
@ -161,48 +168,53 @@
</div>
</div>
{#
<div class="row">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'expected_repetitions'|_ }}</h3>
</div>
<div class="box-body">
Here.
</div>
<div class="row">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'expected_repetitions'|_ }}</h3>
</div>
<div class="box-body">
Here.
</div>
</div>
</div>
</div>
</div>
</div>
#}
</form>
{# calendar modal #}
<div class="modal fade" id="calendarModal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ 'recurring_calendar_view'|_ }}</h4>
</div>
<div class="modal-body">
<div id="recurring_calendar" style="max-width: 400px;margin: 0 auto;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ 'recurring_calendar_view'|_ }}</h4>
</div>
<div class="modal-body">
<div id="recurring_calendar" style="max-width: 400px;margin: 0 auto;">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/common/autocomplete.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/common/autocomplete.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/lib/fc/fullcalendar.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/lib/fc/fullcalendar.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" nonce="{{ JS_NONCE }}">
var transactionType = "{{ preFilled.transaction_type }}";
var suggestUrl = "{{ route('recurring.suggest') }}";
@ -213,8 +225,12 @@
{% endblock %}
{% block styles %}
<link href="v1/css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/lib/fc/fullcalendar.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all"
nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/lib/fc/fullcalendar.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all"
nonce="{{ JS_NONCE }}">
{% endblock %}

View File

@ -5,56 +5,61 @@
{% endblock %}
{% block content %}
{{ Form.model(ruleGroup, {'class' : 'form-horizontal','id' : 'update','url' : route('rule-groups.update',ruleGroup.id) } ) }}
<input type="hidden" name="id" value="{{ ruleGroup.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-6">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('active', 1) }}
<form method="post" action="{{ route('rule-groups.update',ruleGroup.id) }}" class="form-horizontal"
accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
{{ ExpandedForm.text('title') }}
<input type="hidden" name="id" value="{{ ruleGroup.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-6">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('active', 1) }}
{{ ExpandedForm.text('title') }}
</div>
</div>
</div>
<div class="col-lg-6 col-md-12 col-sm-6">
</div>
<div class="col-lg-6 col-md-12 col-sm-6">
{# optional fields #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.textarea('description', ruleGroup.description) }}
{# optional fields #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.textarea('description', ruleGroup.description) }}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','rule-group') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">{{ 'update_rule_group'|_ }}</button>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','rule-group') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">{{ 'update_rule_group'|_ }}</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/ff/rule-groups/edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/rule-groups/edit.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
{% endblock %}

View File

@ -6,7 +6,8 @@
{% block content %}
<form method="POST" action="{{ route('rule-groups.execute', ruleGroup.id) }}" accept-charset="UTF-8" class="form-horizontal" id="execute-rule-group">
<form method="POST" action="{{ route('rule-groups.execute', ruleGroup.id) }}" accept-charset="UTF-8"
class="form-horizontal" id="execute-rule-group">
<input name="_token" type="hidden" value="{{ csrf_token() }}">
<div class="row">
@ -31,7 +32,8 @@
</div>
</div>
<div class="box-footer">
<input type="submit" name="submit" value="{{ 'execute'|_ }}" id="do-execute-button" class="btn btn-success pull-right"/>
<input type="submit" name="submit" value="{{ 'execute'|_ }}" id="do-execute-button"
class="btn btn-success pull-right"/>
</div>
</div>
</div>
@ -39,12 +41,16 @@
</form>
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/rules/select-transactions.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/rules/select-transactions.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
{% endblock %}
{% block styles %}
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
{% endblock %}

View File

@ -5,136 +5,142 @@
{% endblock %}
{% block content %}
{{ Form.model(rule, {'class' : 'form-horizontal','id' : 'store','url' : route('rules.update', rule.id)}) }}
<input type="hidden" name="id" value="{{ rule.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
<form method="post" action="{{ route('rules.update', rule.id) }}" class="form-horizontal" accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="id" value="{{ rule.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('title') }}
{{ RuleForm.ruleGroupList('rule_group_id', ruleGroup.id) }}
{{ ExpandedForm.select('trigger',allJournalTriggers(), primaryTrigger) }}
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('active', 1, null, {helpText: trans('firefly.rule_help_active')}) }}
{{ ExpandedForm.checkbox('stop_processing',1,rule.stop_processing, {helpText: trans('firefly.rule_help_stop_processing')}) }}
{{ ExpandedForm.checkbox('strict',1,rule.strict, {helpText: trans('firefly.rule_help_strict')}) }}
</div>
</div>
<div class="box-body">
{{ ExpandedForm.text('title') }}
{{ RuleForm.ruleGroupList('rule_group_id', ruleGroup.id) }}
{{ ExpandedForm.select('trigger',allJournalTriggers(), primaryTrigger) }}
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('active', 1, null, {helpText: trans('firefly.rule_help_active')}) }}
{{ ExpandedForm.checkbox('stop_processing',1,rule.stop_processing, {helpText: trans('firefly.rule_help_stop_processing')}) }}
{{ ExpandedForm.checkbox('strict',1,rule.strict, {helpText: trans('firefly.rule_help_strict')}) }}
{# optional fields #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.textarea('description', rule.description, {helpText: trans('firefly.field_supports_markdown')}) }}
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
{# optional fields #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.textarea('description', rule.description, {helpText: trans('firefly.field_supports_markdown')}) }}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'rule_triggers'|_ }}</h3>
</div>
<div class="box-body rule-trigger-box">
<table class="table table-condensed table-bordered table-striped">
<thead>
<tr>
<th colspan="2">{{ 'trigger'|_ }}</th>
<th>{{ 'is_not_rule_trigger'|_ }}</th>
<th>{{ 'trigger_value'|_ }}</th>
<th>{{ 'stop_processing_other_triggers'|_ }}</th>
</tr>
</thead>
<tbody class="rule-trigger-tbody">
{% for trigger in oldTriggers %}
{{ trigger|raw }}
{% endfor %}
</tbody>
</table>
<p>
<br/>
<a href="#" class="btn btn-default add_rule_trigger">{{ 'add_rule_trigger'|_ }}</a>
<a href="#" class="btn btn-default test_rule_triggers"><span
class="fa fa-flask"></span> {{ 'test_rule_triggers'|_ }}</a>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'rule_triggers'|_ }}</h3>
</div>
<div class="box-body rule-trigger-box">
<table class="table table-condensed table-bordered table-striped">
<thead>
<tr>
<th colspan="2">{{ 'trigger'|_ }}</th>
<th>{{ 'is_not_rule_trigger'|_ }}</th>
<th>{{ 'trigger_value'|_ }}</th>
<th>{{ 'stop_processing_other_triggers'|_ }}</th>
</tr>
</thead>
<tbody class="rule-trigger-tbody">
{% for trigger in oldTriggers %}
{{ trigger|raw }}
{% endfor %}
</tbody>
{% include 'rules.partials.test-trigger-modal' %}
</table>
<p>
<br/>
<a href="#" class="btn btn-default add_rule_trigger">{{ 'add_rule_trigger'|_ }}</a>
<a href="#" class="btn btn-default test_rule_triggers"><span class="fa fa-flask"></span> {{ 'test_rule_triggers'|_ }}</a>
</p>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'rule_actions'|_ }}</h3>
</div>
<div class="box-body">
<table class="table table-condensed table-bordered table-striped">
<thead>
<tr>
<th colspan="2">{{ 'action'|_ }}</th>
<th>{{ 'action_value'|_ }}</th>
<th>{{ 'stop_executing_other_actions'|_ }}</th>
</tr>
</thead>
<tbody class="rule-action-tbody">
{% for action in oldActions %}
{{ action|raw }}
{% endfor %}
</tbody>
</table>
<p>
<br/>
<a href="#" class="btn btn-default add_rule_action">{{ 'add_rule_action'|_ }}</a>
</p>
</div>
</div>
</div>
</div>
</div>
{% include 'rules.partials.test-trigger-modal' %}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','rule') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">{{ 'update_rule'|_ }}</button>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'rule_actions'|_ }}</h3>
</div>
<div class="box-body">
<table class="table table-condensed table-bordered table-striped">
<thead>
<tr>
<th colspan="2">{{ 'action'|_ }}</th>
<th>{{ 'action_value'|_ }}</th>
<th>{{ 'stop_executing_other_actions'|_ }}</th>
</tr>
</thead>
<tbody class="rule-action-tbody">
{% for action in oldActions %}
{{ action|raw }}
{% endfor %}
</tbody>
</table>
<p>
<br/>
<a href="#" class="btn btn-default add_rule_action">{{ 'add_rule_action'|_ }}</a>
</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','rule') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">{{ 'update_rule'|_ }}</button>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" nonce="{{ JS_NONCE }}">
var triggerCount = {{ triggerCount }};
var actionCount = {{ actionCount }};
var testRuleTriggersText = '{{ 'test_rule_triggers'|_|escape('js') }}';
</script>
<script type="text/javascript" src="v1/js/ff/rules/create-edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/rules/create-edit.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
{% endblock %}

View File

@ -10,7 +10,8 @@
var locations = {{ locations|json_encode|raw }};
var mapboxToken = "{{ config('firefly.mapbox_api_key') }}";
</script>
<form method="POST" action="{{ route('tags.store') }}" accept-charset="UTF-8" class="form-horizontal" id="store" enctype="multipart/form-data">
<form method="POST" action="{{ route('tags.store') }}" accept-charset="UTF-8" class="form-horizontal" id="store"
enctype="multipart/form-data">
<input name="_token" type="hidden" value="{{ csrf_token() }}">
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-12">
@ -33,7 +34,6 @@
<div class="box-body">
{{ ExpandedForm.date('date') }}
{{ ExpandedForm.textarea('description') }}
{{ ExpandedForm.location('location', null, {locations: locations}) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
@ -61,13 +61,14 @@
</form>
{% endblock %}
{% block scripts %}
<script src="v1/lib/leaflet/leaflet.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script src="v1/js/ff/tags/create-edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="v1/lib/leaflet/leaflet.css?v={{ FF_VERSION }}"/>
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
{% endblock %}

View File

@ -11,68 +11,70 @@
var mapboxToken = "{{ config('firefly.mapbox_api_key') }}";
</script>
{{ Form.model(tag, {'class' : 'form-horizontal','enctype': 'multipart/form-data','id' : 'update','url' : route('tags.update',tag.id)}) }}
<input type="hidden" name="id" value="{{ tag.id }}"/>
<form method="post" action="{{ route('tags.update',tag.id) }}" class="form-horizontal" accept-charset="UTF-8"
enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="id" value="{{ tag.id }}"/>
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('tag') }}
</div>
</div>
</div>
<div class="col-lg-7 col-md-7 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.date('date', tag.date.format('Y-m-d')) }}
{{ ExpandedForm.textarea('description', tag.description) }}
{{ ExpandedForm.location('location', null, {locations: locations}) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','tag') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ 'update_tag'|_ }}
</button>
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('tag') }}
</div>
</div>
</div>
<div class="col-lg-7 col-md-7 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.date('date', tag.date.format('Y-m-d')) }}
{{ ExpandedForm.textarea('description', tag.description) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for options #}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','tag') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ 'update_tag'|_ }}
</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}
<script src="v1/lib/leaflet/leaflet.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script src="v1/js/ff/tags/create-edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="v1/lib/leaflet/leaflet.css?v={{ FF_VERSION }}"/>
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet"
media="all" nonce="{{ JS_NONCE }}">
{% endblock %}

View File

@ -297,9 +297,6 @@
var latitude = {{ location.latitude|default("52.3167") }};
var longitude = {{ location.longitude|default("5.5500") }};
var zoomLevel = {{ location.zoom_level|default("6") }};
var doPlaceMarker = true;
// token for Mapbox:
var mapboxToken = "{{ config('firefly.mapbox_api_key') }}";
{% endif %}
</script>
<script src="v1/lib/leaflet/leaflet.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

View File

@ -5,7 +5,8 @@
{% endblock %}
{% block content %}
<form method="POST" action="{{ route('transactions.convert.index.post', [destinationType.type|lower, group.id]) }}" accept-charset="UTF-8"
<form method="POST" action="{{ route('transactions.convert.index.post', [destinationType.type|lower, group.id]) }}"
accept-charset="UTF-8"
class="form-horizontal"
enctype="multipart/form-data">
<input name="_token" type="hidden" value="{{ csrf_token() }}">
@ -35,7 +36,7 @@
{{ trans_choice('firefly.convert_select_destinations', groupArray.transactions|length) }}
{% endif %}
{# FOUR: DEPOSIT TO TRANSFER#}
{# FOUR: DEPOSIT TO TRANSFER #}
{% if sourceType.type == 'Deposit' and destinationType.type == 'Transfer' %}
{{ trans_choice('firefly.convert_expl_d_t', groupArray.transactions|length) }}
{{ trans_choice('firefly.convert_select_sources', groupArray.transactions|length) }}
@ -71,7 +72,7 @@
{% if sourceType.type == 'Withdrawal' and destinationType.type == 'Deposit' %}
{# NEW DESTINATION = Asset, SOURCE MUST BE [Revenue, Cash, Loan, Debt, Mortgage] #}
{% if transaction.source_type == 'Asset account' %}
{{ Form.select('source_id['~transaction.transaction_journal_id~']', validDepositSources, null, {class: 'form-control'}) }}
{{ Html.select('source_id['~transaction.transaction_journal_id~']', validDepositSources).class('form-control') }}
{% endif %}
{# NEW DESTINATION = [Loan, Debt, Mortgage], SOURCE MUST BE [Revenue] #}
@ -96,7 +97,9 @@
<a href="{{ route('accounts.show', [transaction.source_id]) }}"
title="{{ transaction.source_iban|default(transaction.source_name) }}">{{ transaction.source_name }}</a>
{# hide source in hidden input #}
<input type="hidden" name="source_id[{{ transaction.transaction_journal_id }}]" value="{{ transaction.source_id }}">
<input type="hidden"
name="source_id[{{ transaction.transaction_journal_id }}]"
value="{{ transaction.source_id }}">
{% endif %}
{# THREE: DEPOSIT TO WITHDRAWAL #}
@ -105,22 +108,24 @@
title="{{ transaction.destination_iban|default(transaction.destination_name) }}">{{ transaction.destination_name }}</a>
{# hide new source in hidden input #}
<input type="hidden" name="source_id[{{ transaction.transaction_journal_id }}]" value="{{ transaction.destination_id }}">
<input type="hidden"
name="source_id[{{ transaction.transaction_journal_id }}]"
value="{{ transaction.destination_id }}">
{% endif %}
{# FOUR: DEPOSIT TO TRANSFER#}
{# FOUR: DEPOSIT TO TRANSFER #}
{% if sourceType.type == 'Deposit' and destinationType.type == 'Transfer' %}
{# if new destination is asset, then asset#}
{# if new destination is asset, then asset #}
{% if transaction.destination_type == 'Asset account' %}
{{ Form.select('source_id['~transaction.transaction_journal_id~']', assets,null, {class: 'form-control'}) }}
{{ Html.select('source_id['~transaction.transaction_journal_id~']', assets).class('form-control') }}
{% endif %}
{% if transaction.destination_type == 'Loan' or
transaction.destination_type == 'Debt' or
transaction.destination_type == 'Mortgage' %}
{{ Form.select('source_id['~transaction.transaction_journal_id~']', liabilities,null, {class: 'form-control'}) }}
{{ Html.select('source_id['~transaction.transaction_journal_id~']', liabilities).class('form-control') }}
{% endif %}
{# if new destination liability, then liability.#}
{# if new destination liability, then liability. #}
{% endif %}
@ -130,7 +135,9 @@
title="{{ transaction.source_iban|default(transaction.source_name) }}">{{ transaction.source_name }}</a>
{# hide source in hidden input #}
<input type="hidden" name="source_id[{{ transaction.transaction_journal_id }}]" value="{{ transaction.source_id }}">
<input type="hidden"
name="source_id[{{ transaction.transaction_journal_id }}]"
value="{{ transaction.source_id }}">
{% endif %}
{# SIX: TRANSFER TO DEPOSIT #}
@ -138,7 +145,7 @@
{# NEW DESTINATION = Asset, SOURCE MUST BE [Revenue, Cash, Loan, Debt, Mortgage] #}
{% if
transaction.source_type == 'Asset account' %}
{{ Form.select('source_id['~transaction.transaction_journal_id~']', validDepositSources, null, {class: 'form-control'}) }}
{{ Html.select('source_id['~transaction.transaction_journal_id~']', validDepositSources).class('form-control') }}
{% endif %}
{# NEW DESTINATION = [Debt, Mortgage, Load], SOURCE MUST BE [Revenue] #}
{% if
@ -165,22 +172,24 @@
title="{{ transaction.source_iban|default(transaction.source_name) }}">{{ transaction.source_name }}</a>
{# hide destination in hidden input #}
<input type="hidden" name="destination_id[{{ transaction.transaction_journal_id }}]" value="{{ transaction.source_id }}">
<input type="hidden"
name="destination_id[{{ transaction.transaction_journal_id }}]"
value="{{ transaction.source_id }}">
{% endif %}
{# TWO: WITHDRAWAL TO TRANSFER #}
{% if sourceType.type == 'Withdrawal' and destinationType.type == 'Transfer' %}
{#if the source is a liability, destination must also be a liability.#}
{# if the source is a liability, destination must also be a liability. #}
{% if
transaction.source_type == 'Loan' or
transaction.source_type == 'Debt' or
transaction.source_type == 'Mortgage' %}
{{ Form.select('destination_id['~transaction.transaction_journal_id~']', liabilities, null, {class: 'form-control'}) }}
{{ Html.select('destination_id['~transaction.transaction_journal_id~']', liabilities).class('form-control') }}
{% endif %}
{# if the source is an asset, destination can only be an asset. #}
{% if transaction.source_type == 'Asset account' %}
{{ Form.select('destination_id['~transaction.transaction_journal_id~']', assets, null, {class: 'form-control'}) }}
{{ Html.select('destination_id['~transaction.transaction_journal_id~']', assets).class('form-control') }}
{% endif %}
{% endif %}
@ -189,7 +198,7 @@
{# if new source is Asset, destination must be [Expense, Loan, Debt or Mortgage] #}
{% if transaction.destination_type == 'Asset account' %}
{{ Form.select('destination_id['~transaction.transaction_journal_id~']', validWithdrawalDests, null, {class: 'form-control'}) }}
{{ Html.select('destination_id['~transaction.transaction_journal_id~']', validWithdrawalDests).class('form-control') }}
{% endif %}
{% if transaction.destination_type == 'Loan' or
transaction.destination_type == 'Debt' or
@ -207,20 +216,22 @@
{% endif %}
{% endif %}
{# FOUR: DEPOSIT TO TRANSFER#}
{# FOUR: DEPOSIT TO TRANSFER #}
{% if sourceType.type == 'Deposit' and destinationType.type == 'Transfer' %}
<a href="{{ route('accounts.show', [transaction.destination_id]) }}"
title="{{ transaction.destination_iban|default(transaction.destination_name) }}">{{ transaction.destination_name }}</a>
{# hide destination in hidden input #}
<input type="hidden" name="destination_id[{{ transaction.transaction_journal_id }}]" value="{{ transaction.destination_id }}">
<input type="hidden"
name="destination_id[{{ transaction.transaction_journal_id }}]"
value="{{ transaction.destination_id }}">
{% endif %}
{# FIVE: TRANSFER TO WITHDRAWAL #}
{% if sourceType.type == 'Transfer' and destinationType.type == 'Withdrawal' %}
{% if transaction.source_type == 'Asset account' %}
{{ Form.select('destination_id['~transaction.transaction_journal_id~']', validWithdrawalDests, null, {class: 'form-control'}) }}
{{ Html.select('destination_id['~transaction.transaction_journal_id~']', validWithdrawalDests).class('form-control') }}
{% endif %}
{% if transaction.source_type == 'Loan' or
transaction.source_type == 'Debt' or
@ -242,7 +253,9 @@
title="{{ transaction.destination_iban|default(transaction.destination_name) }}">{{ transaction.destination_name }}</a>
{# hide destination in hidden input #}
<input type="hidden" name="destination_id[{{ transaction.transaction_journal_id }}]" value="{{ transaction.destination_id }}">
<input type="hidden"
name="destination_id[{{ transaction.transaction_journal_id }}]"
value="{{ transaction.destination_id }}">
{% endif %}
</td>
<td>
@ -280,6 +293,8 @@
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/transactions/convert.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/transactions/convert.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
{% endblock %}