Commit Graph

6 Commits

Author SHA1 Message Date
Javi Martín
629df5ab9b Simplify getting imageable/documentable in forms
The imageable/documentable object is always the object the form builder
is based on; since we're already passing the form builder, we don't have
to pass the object as well.

The only exception are the poll answers. In this case, we're passing a
new answer as the object. That's OK; the same hack that we're using to
send the data to the answer URL without displaying existing attachments
causes the form to keep working the same way.
2021-07-13 16:58:13 +02:00
decabeza
578f3437da Update styles and layout for new proposals form 2021-07-13 15:27:20 +02:00
Javi Martín
211bcb8a65 Move new proposal view to a component 2021-07-13 15:27:14 +02:00
Javi Martín
b162ad512a Remove row and column divs in debate/proposal form
We don't need any row classes anymore because the <body> already has a
maximum width. As for columns, we only have one column in this form, so
we don't need them either. Besides, the form's parent element already
has a padding.
2021-07-13 15:27:13 +02:00
Javi Martín
ab0fd86922 Show globalize locales after the errors
Just like it's done in the investment form.
2021-07-13 15:25:31 +02:00
Javi Martín
4150d7f1be Move proposals form partial to a component
Since now categories are loaded in both the investment form component
and proposal form component, and their controllers are the only
"commentable" controllers using the `@categories` instance variable, we
can remove the `load_categories` call in `CommentableActions` affecting
the create and update actions.
2021-07-13 15:25:29 +02:00