Skip to content
Extraits de code Groupes Projets
Valider ffc82508 rédigé par echarp's avatar echarp
Parcourir les fichiers

La gestion des datetime_local redevient simple et logiqu, avant ajout de shims javascript

parent 6003c8dd
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
GIT GIT
remote: git://github.com/gregbell/active_admin.git remote: git://github.com/gregbell/active_admin.git
revision: 168d72e7f5d705cd25373775db2c9efd910b7a95 revision: 9cfc45330e5ad31977b3ac7b2ccc1f8d6146c73f
specs: specs:
activeadmin (1.0.0.pre) activeadmin (1.0.0.pre)
arbre (~> 1.0) arbre (~> 1.0)
...@@ -149,7 +149,7 @@ GEM ...@@ -149,7 +149,7 @@ GEM
inherited_resources (1.4.1) inherited_resources (1.4.1)
has_scope (~> 0.6.0.rc) has_scope (~> 0.6.0.rc)
responders (~> 1.0.0.rc) responders (~> 1.0.0.rc)
jbuilder (2.1.2) jbuilder (2.1.3)
activesupport (>= 3.0.0, < 5) activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2) multi_json (~> 1.2)
jquery-rails (3.1.1) jquery-rails (3.1.1)
...@@ -268,7 +268,7 @@ GEM ...@@ -268,7 +268,7 @@ GEM
thread_safe (0.3.4) thread_safe (0.3.4)
tilt (1.4.1) tilt (1.4.1)
timers (1.1.0) timers (1.1.0)
tinymce-rails (4.1.0) tinymce-rails (4.1.2)
railties (>= 3.1.1) railties (>= 3.1.1)
tinymce-rails-langs (4.20140129) tinymce-rails-langs (4.20140129)
tinymce-rails (~> 4.0) tinymce-rails (~> 4.0)
......
...@@ -39,6 +39,8 @@ class EventsController < ApplicationController ...@@ -39,6 +39,8 @@ class EventsController < ApplicationController
# GET /users/new # GET /users/new
def new def new
@event = Event.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 end
# POST /events # POST /events
......
...@@ -24,14 +24,10 @@ ...@@ -24,14 +24,10 @@
= f.text_field :title, required: true, size: 70 = f.text_field :title, required: true, size: 70
.field .field
= f.label :start_time = f.label :start_time
= f.datetime_local_field :start_time, required: true, size: 14, = f.datetime_local_field :start_time, required: true
value: l(@event.start_time || Time.now + 1.day + 1.hour - Time.now.min.minutes, format: :manual),
placeholder: t('time.formats.manual')
.field .field
= f.label :end_time = f.label :end_time
= f.datetime_local_field :end_time, required: true, size: 14, = f.datetime_local_field :end_time, required: true
value: l(@event.end_time || Time.now + 1.day + 2.hour - Time.now.min.minutes, format: :manual),
placeholder: t('time.formats.manual')
.field .field
.helper .helper
:markdown :markdown
......
...@@ -91,7 +91,6 @@ fr: ...@@ -91,7 +91,6 @@ fr:
formats: formats:
at: "%A %d %B %Y à %Hh%M" at: "%A %d %B %Y à %Hh%M"
hours: "%Hh%M" hours: "%Hh%M"
manual: "%d/%m/%Y %H:%M"
# Traductions des écrans # Traductions des écrans
layouts: layouts:
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter