mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Use comma as a default fraction separator
This commit is contained in:
parent
ebc2a6af72
commit
e375fcfabc
3 changed files with 11 additions and 2 deletions
|
@ -7,7 +7,7 @@ module FormHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def money_field(object_name, method, options = {})
|
def money_field(object_name, method, options = {})
|
||||||
options[:pattern] = '^[0-9.]+$' unless options[:pattern]
|
options[:pattern] = '^[0-9.,]+$' unless options[:pattern]
|
||||||
options[:maxlength] = 255 unless options[:maxlength]
|
options[:maxlength] = 255 unless options[:maxlength]
|
||||||
|
|
||||||
text_field(object_name, method, options)
|
text_field(object_name, method, options)
|
||||||
|
|
|
@ -934,3 +934,12 @@ en:
|
||||||
cant_match_version: 'Impossible match version with request'
|
cant_match_version: 'Impossible match version with request'
|
||||||
user_not_authenticated: "user not authenticated"
|
user_not_authenticated: "user not authenticated"
|
||||||
actions: Actions
|
actions: Actions
|
||||||
|
|
||||||
|
number:
|
||||||
|
currency:
|
||||||
|
format:
|
||||||
|
format: "%n %u"
|
||||||
|
separator: ","
|
||||||
|
delimiter: " "
|
||||||
|
precision: 2
|
||||||
|
unit: €
|
||||||
|
|
|
@ -6,6 +6,6 @@ RSpec.shared_examples 'money form field' do
|
||||||
|
|
||||||
it 'has money pattern' do
|
it 'has money pattern' do
|
||||||
render
|
render
|
||||||
expect(field[:pattern]).to eq('^[0-9.]+$')
|
expect(field[:pattern]).to eq('^[0-9.,]+$')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue