Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions resources/assets/v1/src/components/transactions/AccountSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,44 @@
- along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<template>
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="form-group" v-bind:class="{ 'has-error': hasError()}" role="group" :aria-labelledby="'label-' + inputName + '-' + index">
<div class="col-sm-12 text-sm">
{{ inputDescription }}
<label :id="'label-' + inputName + '-' + index" :for="'input-' + inputName + '-' + index">
{{ inputDescription }}
</label>
</div>
<div class="col-sm-12">
<div class="input-group">
<input
spellcheck="false"
ref="input"
:id="'input-' + inputName + '-' + index"
:data-index="index"
:disabled="inputDisabled"
:name="inputName"
:placeholder="inputDescription"
:title="inputDescription"
:aria-label="inputDescription"
:aria-describedby="hasError() ? 'error-' + inputName + '-' + index : null"
:aria-invalid="hasError() ? 'true' : 'false'"
autocomplete="off"
class="form-control"
data-role="input"
type="text"
role="combobox"
aria-expanded="false"
aria-autocomplete="list"
v-on:submit.prevent>
<span class="input-group-btn">
<button
class="btn btn-default"
tabIndex="-1"
type="button"
v-on:click="clearSource"><i class="fa fa-trash-o"></i></button>
:aria-label="$t('firefly.clear_account_selection')"
v-on:click="clearSource">
<i class="fa fa-trash-o" aria-hidden="true"></i>
<span class="sr-only">{{ $t('firefly.clear_account_selection') }}</span>
</button>
</span>
</div>
<typeahead
Expand All @@ -53,18 +66,26 @@
:target="target"
item-key="name_with_balance"
v-on:input="selectedItem"
role="listbox"
:aria-label="$t('firefly.account_suggestions')"
>
<template slot="item" slot-scope="props">
<li v-for="(item, index) in props.items" :class="{active:props.activeIndex===index}">
<a role="button" @click="props.select(item)">
<li v-for="(item, index) in props.items"
:class="{active:props.activeIndex===index}"
role="option"
:aria-selected="props.activeIndex===index ? 'true' : 'false'"
:id="'option-' + inputName + '-' + index + '-' + item.id">
<a role="button" @click="props.select(item)" :aria-label="$t('firefly.select_account', {name: item.name_with_balance})">
<span v-html="betterHighlight(item)"></span>
</a>
</li>
</template>
</typeahead>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
<div v-if="hasError()" :id="'error-' + inputName + '-' + index" role="alert" aria-live="polite">
<ul class="list-unstyled">
<li v-for="error in this.error" class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</div>

Expand Down
24 changes: 17 additions & 7 deletions resources/assets/v1/src/components/transactions/Amount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@
-->

<template>
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="form-group" v-bind:class="{ 'has-error': hasError()}" role="group" aria-labelledby="amount-label">
<div class="col-sm-8 col-sm-offset-4 text-sm">
{{ $t('firefly.amount') }}
<label id="amount-label" for="amount-input">{{ $t('firefly.amount') }}</label>
</div>
<label ref="cur" class="col-sm-4 control-label"></label>
<label ref="cur" class="col-sm-4 control-label" id="currency-label" aria-live="polite"></label>
<div class="col-sm-8">
<div class="input-group">
<input ref="amount" spellcheck="false"
id="amount-input"
:title="$t('firefly.amount')"
:value="value"
:aria-label="$t('firefly.amount')"
:aria-describedby="hasError() ? 'amount-error' : 'currency-label'"
:aria-invalid="hasError() ? 'true' : 'false'"
autocomplete="off"
class="form-control"
name="amount[]"
Expand All @@ -42,14 +46,20 @@
class="btn btn-default"
tabIndex="-1"
type="button"
v-on:click="clearAmount"><i class="fa fa-trash-o"></i></button>
:aria-label="$t('firefly.clear_amount')"
v-on:click="clearAmount">
<i class="fa fa-trash-o" aria-hidden="true"></i>
<span class="sr-only">{{ $t('firefly.clear_amount') }}</span>
</button>
</span>
</div>
</div>

<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
<div v-if="hasError()" id="amount-error" role="alert" aria-live="polite">
<ul class="list-unstyled">
<li v-for="error in this.error" class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
-->

<template>
<form accept-charset="UTF-8" class="form-horizontal" enctype="multipart/form-data">
<form accept-charset="UTF-8" class="form-horizontal" enctype="multipart/form-data" role="form" aria-label="{{ $t('firefly.create_transaction_form') }}">
<input name="_token" type="hidden" value="xxx">
<div v-if="error_message !== ''" class="row">
<div v-if="error_message !== ''" class="row" role="alert" aria-live="assertive">
<div class="col-lg-12">
<div class="alert alert-danger alert-dismissible" role="alert">
<button class="close" data-dismiss="alert" type="button"
Expand All @@ -32,7 +32,7 @@
</div>
</div>

<div v-if="success_message !== ''" class="row">
<div v-if="success_message !== ''" class="row" role="status" aria-live="polite">
<div class="col-lg-12">
<div class="alert alert-success alert-dismissible" role="alert">
<button class="close" data-dismiss="alert" type="button"
Expand All @@ -45,20 +45,23 @@
<div>
<div v-for="(transaction, index) in transactions" class="row">
<div class="col-lg-12">
<div class="box">
<div class="box" role="region" :aria-labelledby="'transaction-heading-' + index">
<div class="box-header with-border">
<h3 class="box-title splitTitle">
<h2 class="box-title splitTitle" :id="'transaction-heading-' + index">
<span v-if="transactions.length > 1">{{ $t('firefly.single_split') }} {{ index + 1 }} / {{
transactions.length
}}</span>
<span v-if="transactions.length === 1">{{
$t('firefly.transaction_journal_information')
}}</span>
</h3>
</h2>
<div v-if="transactions.length > 1" class="box-tools pull-right">
<button class="btn btn-xs btn-danger" type="button"
v-on:click="deleteTransaction(index, $event)"><i
class="fa fa-trash"></i></button>
v-on:click="deleteTransaction(index, $event)"
:aria-label="$t('firefly.delete_transaction_split', {index: index + 1})">
<i class="fa fa-trash" aria-hidden="true"></i>
<span class="sr-only">{{ $t('firefly.delete_transaction_split', {index: index + 1}) }}</span>
</button>
</div>
</div>
<div class="box-body">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,30 @@
-->

<template>
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="form-group" v-bind:class="{ 'has-error': hasError()}" role="group" :aria-labelledby="'description-label-' + index">
<div class="col-sm-12 text-sm">
{{ $t('firefly.description') }}
<label :id="'description-label-' + index" :for="'description-input-' + index">
{{ $t('firefly.description') }}
</label>
</div>
<div class="col-sm-12">
<div class="input-group">
<input
spellcheck="false"
ref="descr"
:id="'description-input-' + index"
:title="$t('firefly.description')"
:value="value"
:aria-label="$t('firefly.description')"
:aria-describedby="hasError() ? 'description-error-' + index : null"
:aria-invalid="hasError() ? 'true' : 'false'"
autocomplete="off"
class="form-control"
name="description[]"
type="text"
role="combobox"
aria-expanded="false"
aria-autocomplete="list"
v-bind:placeholder="$t('firefly.description')"
@input="handleInput"
v-on:keypress="handleEnter" v-on:submit.prevent
Expand All @@ -43,7 +52,11 @@
class="btn btn-default"
tabIndex="-1"
type="button"
v-on:click="clearDescription"><i class="fa fa-trash-o"></i></button>
:aria-label="$t('firefly.clear_description')"
v-on:click="clearDescription">
<i class="fa fa-trash-o" aria-hidden="true"></i>
<span class="sr-only">{{ $t('firefly.clear_description') }}</span>
</button>
</span>
</div>
<typeahead
Expand All @@ -54,18 +67,26 @@
:target="target"
item-key="description"
v-on:input="selectedItem"
role="listbox"
:aria-label="$t('firefly.description_suggestions')"
>
<template slot="item" slot-scope="props">
<li v-for="(item, index) in props.items" :class="{active:props.activeIndex===index}">
<a role="button" @click="props.select(item)">
<li v-for="(item, index) in props.items"
:class="{active:props.activeIndex===index}"
role="option"
:aria-selected="props.activeIndex===index ? 'true' : 'false'"
:id="'description-option-' + index + '-' + item.id">
<a role="button" @click="props.select(item)" :aria-label="$t('firefly.select_description', {description: item.description})">
<span v-html="betterHighlight(item)"></span>
</a>
</li>
</template>
</typeahead>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
<div v-if="hasError()" :id="'description-error-' + index" role="alert" aria-live="polite">
<ul class="list-unstyled">
<li v-for="error in this.error" class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</div>
</template>
Expand Down
30 changes: 30 additions & 0 deletions resources/lang/en_US/firefly.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,36 @@
'actions' => 'Actions',
'edit' => 'Edit',
'loading' => 'Loading',

'skip_to_main_content' => 'Skip to main content',
'main_content' => 'Main content',
'main_navigation' => 'Main navigation',
'sidebar_navigation' => 'Sidebar navigation',
'breadcrumb_navigation' => 'Breadcrumb navigation',
'site_footer' => 'Site footer',
'firefly_iii_home' => 'Firefly III home page',
'firefly_iii_description' => 'Firefly III personal finance manager',
'help_and_support' => 'Help and support',
'toggle_sidebar' => 'Toggle sidebar',
'toggle_control_sidebar' => 'Toggle control sidebar',
'search_transactions' => 'Search transactions',
'search_button' => 'Search',
'version_info' => 'Version information',
'firefly_iii_github' => 'Firefly III on GitHub',
'license_info' => 'License information',
'alpha_version_warning' => 'Alpha version warning',
'beta_version_warning' => 'Beta version warning',
'demo_site_notice' => 'Demo site notice',
'create_transaction_form' => 'Create transaction form',
'delete_transaction_split' => 'Delete transaction split :index',
'clear_account_selection' => 'Clear account selection',
'account_suggestions' => 'Account suggestions',
'select_account' => 'Select account: :name',
'success_link' => 'Success details',
'clear_amount' => 'Clear amount',
'clear_description' => 'Clear description',
'description_suggestions' => 'Description suggestions',
'select_description' => 'Select description: :description',
'transaction_journal_id' => 'Transaction journal ID',
'delete' => 'Delete',
'split' => 'Split',
Expand Down
Loading