fix(conditional): change number input to text input, to display original text not empty in the error message
This commit is contained in:
parent
f53e8608ae
commit
eb71207457
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
@import "colors";
|
||||
@import "constants";
|
||||
|
||||
.conditionnel {
|
||||
form.form > .conditionnel {
|
||||
|
||||
.condition-error {
|
||||
background: $background-red;
|
||||
|
@ -64,7 +64,7 @@
|
|||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
input[type=number] {
|
||||
input[type=text] {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
|
|||
class: { alert: right_invalid }
|
||||
)
|
||||
when :number
|
||||
number_field_tag(
|
||||
text_field_tag(
|
||||
input_name_for('value'),
|
||||
right.value,
|
||||
required: true,
|
||||
|
@ -177,7 +177,7 @@ class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
|
|||
class: { alert: right_invalid }
|
||||
)
|
||||
else
|
||||
number_field_tag(input_name_for('value'), '', id: input_id_for('value', row_index))
|
||||
text_field_tag(input_name_for('value'), '', id: input_id_for('value', row_index))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue