Browse Source

Fix: '', '' -> nil, nil in input generation.

master
Ilya Konanykhin 8 years ago
parent
commit
3fc812bd7a
  1. 12
      app/views/bikes/new.html.haml
  2. 2
      app/views/task_lists/edit.haml
  3. 6
      app/views/time_entries/new.haml

12
app/views/bikes/new.html.haml

@ -6,7 +6,7 @@
.col-xs-12.col-sm-6.col-lg-4
%fieldset
.form-group
= number_field_tag '', '', id: 'shop_id', placeholder: 'Shop ID', min: 0, class: 'form-control'
= number_field_tag nil, nil, id: 'shop_id', placeholder: 'Shop ID', min: 0, class: 'form-control'
.help-block
.form-group
@ -14,11 +14,11 @@
.help-block
.form-group
= text_field_tag '', '', id: 'model', placeholder: 'Model', class: 'form-control'
= text_field_tag nil, nil, id: 'model', placeholder: 'Model', class: 'form-control'
.help-block
.form-group
= text_field_tag '', '', id: 'serial_number', placeholder: 'Serial Number', class: 'form-control'
= text_field_tag nil, nil, id: 'serial_number', placeholder: 'Serial Number', class: 'form-control'
.help-block
.form-group
@ -35,7 +35,7 @@
%label.btn.btn-default
= radio_button_tag 'bike_style', 4
OTHER
= hidden_field_tag '', '', id: 'bike_style_id'
= hidden_field_tag nil, nil, id: 'bike_style_id'
.help-block
.form-group
@ -56,12 +56,12 @@
%label.btn.btn-default
= radio_button_tag 'bike_condition', 5
Excellent
= hidden_field_tag '', '', id: 'bike_condition_id'
= hidden_field_tag nil, nil, id: 'bike_condition_id'
.help-block
.form-group
.input-group
= number_field_tag '', '', id: 'seat_tube_height', placeholder: 'Seat Tube', min: 0, max: 100, class: "form-control"
= number_field_tag nil, nil, id: 'seat_tube_height', placeholder: 'Seat Tube', min: 0, max: 100, class: "form-control"
.input-group-addon cm
.help-block

2
app/views/task_lists/edit.haml

@ -13,7 +13,7 @@
- @task_list.tasks.each do |task|
.checkbox
%label
= check_box_tag '', '', task.done, class: 'task_list_task', type: 'checkbox', "data-id": task.id
= check_box_tag nil, nil, task.done, class: 'task_list_task', type: 'checkbox', "data-id": task.id
= task.task
.form-group

6
app/views/time_entries/new.haml

@ -12,7 +12,7 @@
.form-group.bootstrap-timepicker.form-inline
.form-group
%label.visible-xs Start time
= text_field_tag '', '', id: 'start_time_id', placeholder: 'Start time', class: 'form-control', size: 8
= text_field_tag nil, nil, id: 'start_time_id', placeholder: 'Start time', class: 'form-control', size: 8
.hidden#start_date
.help-block
@ -21,7 +21,7 @@
.form-group
%label.visible-xs End time
= text_field_tag '', '', id: 'end_time_id', placeholder: 'End time', class: 'form-control', size: 8
= text_field_tag nil, nil, id: 'end_time_id', placeholder: 'End time', class: 'form-control', size: 8
.hidden#end_date
.help-block
@ -43,7 +43,7 @@
= select_tag :bike_id, options_for_select(@bikes), class: 'form-control'
.form-group
= text_area_tag '', '', id: 'description_id', placeholder: 'Work description', class: 'form-control', rows: 5
= text_area_tag nil, nil, id: 'description_id', placeholder: 'Work description', class: 'form-control', rows: 5
.control-group
.controls

Loading…
Cancel
Save