La gestion des datetime_local redevient simple et logiqu, avant ajout de shims javascript
This commit is contained in:
parent
6003c8dd71
commit
ffc825089b
@ -1,6 +1,6 @@
|
||||
GIT
|
||||
remote: git://github.com/gregbell/active_admin.git
|
||||
revision: 168d72e7f5d705cd25373775db2c9efd910b7a95
|
||||
revision: 9cfc45330e5ad31977b3ac7b2ccc1f8d6146c73f
|
||||
specs:
|
||||
activeadmin (1.0.0.pre)
|
||||
arbre (~> 1.0)
|
||||
@ -149,7 +149,7 @@ GEM
|
||||
inherited_resources (1.4.1)
|
||||
has_scope (~> 0.6.0.rc)
|
||||
responders (~> 1.0.0.rc)
|
||||
jbuilder (2.1.2)
|
||||
jbuilder (2.1.3)
|
||||
activesupport (>= 3.0.0, < 5)
|
||||
multi_json (~> 1.2)
|
||||
jquery-rails (3.1.1)
|
||||
@ -268,7 +268,7 @@ GEM
|
||||
thread_safe (0.3.4)
|
||||
tilt (1.4.1)
|
||||
timers (1.1.0)
|
||||
tinymce-rails (4.1.0)
|
||||
tinymce-rails (4.1.2)
|
||||
railties (>= 3.1.1)
|
||||
tinymce-rails-langs (4.20140129)
|
||||
tinymce-rails (~> 4.0)
|
||||
|
@ -39,6 +39,8 @@ class EventsController < ApplicationController
|
||||
# GET /users/new
|
||||
def new
|
||||
@event = Event.new
|
||||
@event.start_time ||= Time.now.change(min: 0) + 1.day + 1.hour
|
||||
@event.end_time ||= Time.now.change(min: 0) + 1.day + 2.hour
|
||||
end
|
||||
|
||||
# POST /events
|
||||
|
@ -24,14 +24,10 @@
|
||||
= f.text_field :title, required: true, size: 70
|
||||
.field
|
||||
= f.label :start_time
|
||||
= f.datetime_local_field :start_time, required: true, size: 14,
|
||||
value: l(@event.start_time || Time.now + 1.day + 1.hour - Time.now.min.minutes, format: :manual),
|
||||
placeholder: t('time.formats.manual')
|
||||
= f.datetime_local_field :start_time, required: true
|
||||
.field
|
||||
= f.label :end_time
|
||||
= f.datetime_local_field :end_time, required: true, size: 14,
|
||||
value: l(@event.end_time || Time.now + 1.day + 2.hour - Time.now.min.minutes, format: :manual),
|
||||
placeholder: t('time.formats.manual')
|
||||
= f.datetime_local_field :end_time, required: true
|
||||
.field
|
||||
.helper
|
||||
:markdown
|
||||
|
@ -91,7 +91,6 @@ fr:
|
||||
formats:
|
||||
at: "%A %d %B %Y à %Hh%M"
|
||||
hours: "%Hh%M"
|
||||
manual: "%d/%m/%Y %H:%M"
|
||||
|
||||
# Traductions des écrans
|
||||
layouts:
|
||||
|
Loading…
Reference in New Issue
Block a user