2017-04-06 17:18:03 +02:00
|
|
|
%input.form-control{ name: "champs['#{champ.id}']",
|
2016-06-22 11:25:41 +02:00
|
|
|
placeholder: champ.libelle,
|
|
|
|
id: "champs_#{champ.id}",
|
2018-01-11 19:04:39 +01:00
|
|
|
value: (champ.value.split(/[ ][0-9]*:[0-9]*/).first if champ.value.present?),
|
2016-06-22 11:25:41 +02:00
|
|
|
type: champ.type_champ,
|
|
|
|
'data-provide' => champ.data_provide,
|
2017-04-06 19:10:25 +02:00
|
|
|
'data-date-format' => champ.data_date_format }
|
2016-06-22 11:25:41 +02:00
|
|
|
|
2017-04-06 19:58:11 +02:00
|
|
|
%select.form-control{ name: "time_hour['#{champ.id}']", style: 'margin-left: 5px;', id: "time_hour_#{champ.id}" }
|
2016-06-22 11:25:41 +02:00
|
|
|
- (0..23).each do |num|
|
|
|
|
- num = "%.2i" %num
|
2017-04-06 19:10:25 +02:00
|
|
|
%option{ value: num, selected: (:selected if champ.same_hour?(num)) }
|
2016-06-22 11:25:41 +02:00
|
|
|
= num
|
|
|
|
h
|
2017-04-06 17:18:03 +02:00
|
|
|
%select.form-control{ name: "time_minute['#{champ.id}']", id: "time_minute_#{champ.id}" }
|
2016-06-22 11:25:41 +02:00
|
|
|
- (0..59).each do |num|
|
|
|
|
- num = "%.2i" %num
|
|
|
|
- if num.to_i%5 == 0
|
2017-04-06 19:10:25 +02:00
|
|
|
%option{ value: num, selected: (:selected if champ.same_minute?(num)) }
|
2016-06-22 11:25:41 +02:00
|
|
|
= num
|
2017-04-04 15:27:04 +02:00
|
|
|
min
|