From f16b2257c61323812c650b286032e8bae85e7d6e Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 22 Apr 2018 08:08:09 +0200 Subject: [PATCH] Custom input for amount. --- public/css/firefly.css | 25 +++ resources/views/transactions/split/edit.twig | 152 ++++++++++--------- 2 files changed, 102 insertions(+), 75 deletions(-) diff --git a/public/css/firefly.css b/public/css/firefly.css index 4a9b209600..25487e0ffe 100644 --- a/public/css/firefly.css +++ b/public/css/firefly.css @@ -18,6 +18,31 @@ * along with Firefly III. If not, see . */ +.split_amount_input { + width: 40%; + border-radius: 0; + height: 36px; + padding: 6px 12px; + background-color: #fff; + background-image: none; + border: 1px solid #ccd0d2; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + -webkit-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; + -webkit-transition: border-color .15s ease-in-out, -webkit-box-shadow .15s ease-in-out; + transition: border-color .15s ease-in-out, -webkit-box-shadow .15s ease-in-out; + transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; + transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out, -webkit-box-shadow .15s ease-in-out; + +} + +.split_amount_input:focus { + border-color: #98cbe8; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(152, 203, 232, .6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(152, 203, 232, .6); +} + #daterange { cursor: pointer; } diff --git a/resources/views/transactions/split/edit.twig b/resources/views/transactions/split/edit.twig index 1cb3cbc0cb..dc5dbb9e60 100644 --- a/resources/views/transactions/split/edit.twig +++ b/resources/views/transactions/split/edit.twig @@ -184,7 +184,7 @@
-
 
+ {# HEADER #}
{{ trans('list.split_number') }}
{{ trans('list.description') }}
{# withdrawal and deposit have a destination. #} @@ -195,28 +195,25 @@ {% if preFilled.what == 'deposit' %}
{{ trans('list.source') }}
{% endif %} -
{{ trans('list.amount') }}
-
-   -
+
{{ trans('list.amount') }}
{# only withdrawal has budget #} {% if preFilled.what == 'withdrawal' %} -
{{ trans('list.budget') }}
+
{{ trans('list.budget') }}
{% endif %}
{{ trans('list.category') }}
+ {# ROWS #} + + {% for index, transaction in preFilled.transactions %}
{# button #}
- + #{{ loop.index }}
- {# index #} -
#{{ loop.index }}
- {# description #}
+ value="{% if transaction.destination_type != 'Cash account' %}{{ transaction.destination_name }}{% endif %}" + class="form-control"/>
{% endif %} @@ -241,81 +239,85 @@ {% endif %} {# amount#} +
+ {{ transaction.currency_symbol }}  + {% if transaction.foreign_amount != null %} + {{ transaction.foreign_currency_symbol }}  + + {% endif %} + +
+ {# + {% if transaction.foreign_amount != null %} +
+ {% else %} +
+ {% endif %} + + {% if transaction.foreign_amount != null %} -
- {% else %} -
- {% endif %} +
-
{{ transaction.currency_symbol }}
- {{ transaction.foreign_currency_symbol }}
+
- -
- - {# foreign amount #} - {% if transaction.foreign_amount != null %} -
-
-
{{ transaction.foreign_currency_symbol }}
- -
- - -
- {% endif %} - - {# budget #} - {% if preFilled.what == 'withdrawal' %} -
- -
- {% endif %} - - {# category #} -
- + +
+ {% endif %} + #} + {# budget #} + {% if preFilled.what == 'withdrawal' %} +
+
- {% endfor %} + {% endif %} + + {# category #} +
+
-

-
- {{ 'add_another_split'|_ }} -

-
-
-
-
-
-
- {# panel for options #} -
-
-

{{ 'options'|_ }}

-
-
- {{ ExpandedForm.optionsList('update','split-transaction') }} -
- + {% endfor %} +
+

+
+ {{ 'add_another_split'|_ }} +

+
+
+
+
+
+
+ {# panel for options #} +
+
+

{{ 'options'|_ }}

+
+
+ {{ ExpandedForm.optionsList('update','split-transaction') }} +
+
+
{% endblock %}