File tree 5 files changed +12
-28
lines changed
app/views/cms/form_builder
lib/generators/cms/content_block/templates 5 files changed +12
-28
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5
5
6
6
## Remaining Tasks:
7
7
8
- * Make datetime (or replace) work.
8
+ * Move all the manual initializers in dummy into the engine.
9
+ * Write documentation
9
10
10
11
## Steps
11
12
12
- 1 . Replace all existing forms for non-block code
13
- 2 . Replace block code
14
- 3 . Make sure old widgets are deprecated but still work
15
- 4 . Add new widgets for things like section selectors, etc.
16
- 5 . Document new widgets on developer manual.
17
- 6 . Update generators to use new simple form controls.
18
-
19
13
10 . Move all the manual initializers in dummy into the engine.
20
14
10 . Ensure we don't conflict with existing simple_form implementations
21
15
22
- ## Widgets to Replace
23
-
24
- * check_box
25
- * datetime_select
26
-
27
- ## Cleanup
28
16
29
17
## Upgrade/Documentation notes
30
18
33
21
34
22
## Bugs
35
23
36
- * EmailPagePortlet doesn't actually work when you submit the form.
37
24
* Tag list does not automatically suggest tags.
Original file line number Diff line number Diff line change @@ -70,6 +70,14 @@ Feature:
70
70
<%= f.input :content, as: :text_editor %>
71
71
"""
72
72
73
+ # Date times should just be standard Rails widget
74
+ Scenario : Date Time
75
+ When I run `rails g cms:content_block sale runs_til:datetime`
76
+ Then the file "app/views/cms/sales/_form.html.erb" should contain:
77
+ """
78
+ <%= f.input :runs_til %>
79
+ """
80
+
73
81
Scenario : With Belongs To
74
82
When I run `rails g cms:content_block product size:belongs_to`
75
83
Then the file "app/models/product.rb" should contain:
Original file line number Diff line number Diff line change 16
16
"association :#{ attribute . name } , collection: categories_for('#{ class_name . titleize } ')"
17
17
when :date
18
18
"input :#{ attribute . name } , as: :date_picker"
19
- when :datetime
20
- "datetime_select :#{ attribute . name } "
21
19
when :html
22
20
"input :#{ attribute . name } , as: :text_editor"
23
21
else
Original file line number Diff line number Diff line change 556
556
t . string "name"
557
557
t . integer "price"
558
558
t . integer "category_id"
559
+ t . boolean "on_special"
559
560
t . datetime "created_at"
560
561
t . datetime "updated_at"
561
562
t . integer "original_record_id"
572
573
t . string "name"
573
574
t . integer "price"
574
575
t . integer "category_id"
576
+ t . boolean "on_special"
575
577
t . datetime "created_at"
576
578
t . datetime "updated_at"
577
579
t . integer "version"
You can’t perform that action at this time.
0 commit comments