Commit Graph

43 Commits

Author SHA1 Message Date
Javi Martín
f1105140ae Remove duplicate <main> tags in management views
There can only be one <main> tag in a document, and we've already got a
<main> tag in the management layout.
2024-03-23 00:33:41 +01:00
Javi Martín
015613a140 Fix HTML injection in search results summary
In commit f374478dd, we enabled the possibility to use HTML in the
search results translations in order to add a <strong> tag to these
results. However, that meant we were also allowing HTML tags inside the
search term itself, and so it was possible to inject HTML on the page.

Stripping the HTML tags solves the issue.

Note the issue wasn't a high severity issue because tags such as
`<script>` weren't allowed since we were using the `sanitize` helper.
2022-04-12 14:23:35 +02:00
Javi Martín
7a1acf5706 Rename proposal-form HTML class to proposal-new
So it's consistent with the proposal-edit class we use in the edit
action.
2021-07-13 15:25:31 +02:00
Javi Martín
14d8bef0d8 Use order links in print proposals management
A `<select>` tag here might make more sense than in other similar places
since there are 5 options to choose among, and using links might take
too much screen space.

However, as mentioned in the previous commits, `<select>` tags which
automatically submit a form have many accessibility and usability
issues.

An alternative would be to create a dropdown menu with a button and a
list of links (similar to what Foundation does). I'm keeping the links
for simplicity and because the interface looks a bit more consistent
with the rest of the sections. Before these changes, we had a heading,
then a `<select>` field to choose the filter, and then a button to print
the page. We never use a similar interface, and some people might think
the "Print" button is related to the same form as the `<select>` field.

Now that we don't use the `order_selector` partial anywhere anymore, we
can remove it.
2021-06-28 00:15:08 +02:00
Javi Martín
663fba53db Group admin search label translations together
Since there are two different labels/placeholders for poll officers and
also two different ones for users, we're only grouping one of each.
2020-12-21 18:25:45 +01:00
Javi Martín
cf510043a4 Search on the same URL by default 2020-12-07 14:28:36 +01:00
Javi Martín
e33794e45e Reuse admin search component in other sections
There are some sections where we are not reusing it:

* The budget investments search is completely different, so this
  component isn't appropriate there
* Booth assignment and officers are slightly different, and I'm not
  entirely sure it's safe to refactor these cases
2020-12-04 19:57:05 +01:00
Javi Martín
27468b0b7b Use relative URLs where possible
In general, we always use relative URLs (using `_path`), but sometimes
we were accidentally using absolute URLs (using `_url`). It's been
reported i might cause some isuses if accepting both HTTP and HTTPS
connections, although we've never seen the case.

In any case, this change makes the code more consistent and makes the
generated HTML cleaner.
2019-10-20 17:26:14 +02:00
Javi Martín
6b1864fbcd Sanitize translations instead of using _html
Using the `_html` suffix in an i18n key is the same as using `html_safe`
on it, which means that translation could potentially be used for XSS
attacks.
2019-10-09 19:46:47 +02:00
Javi Martín
71d9ddd849 Apply rule to end files with a newline character 2019-09-10 20:02:15 +02:00
Javi Martín
911fe4e481 Simplify calls to render partial
We're also adding a bit of consistency, since most of our calls to
partial rendering omit the `partial` and `locals` keys.
2019-09-04 15:00:36 +02:00
Julian Herrero
0e0462368b Use double quotes in app/views/management 2019-03-19 12:16:50 +01:00
decabeza
b43945ad33 Removes custom content on management and devise views 2018-07-30 17:58:13 +02:00
decabeza
2e8fe65b3d Cleans and improves management views layout 2018-07-02 17:41:39 +02:00
decabeza
76b7f66fb3 fixes scss lint warnings 2017-06-16 12:09:01 +02:00
Bertocq
e14a5b2eaf Avoid using Date.today, better to use Date.current that takes timezone into account 2017-06-11 10:41:06 +02:00
decabeza
a9272e6b96 removes unused i18n keys 2017-06-05 16:30:07 +02:00
Alberto Garcia Cabeza
7d4f92f10a unifies styles of page forms 2016-10-31 13:11:23 +01:00
Alberto Garcia Cabeza
5c1e1f96ea deletes unused wrap class 2016-10-25 16:23:45 +02:00
Alberto Garcia Cabeza
5bd7bbee4f Improves styles for management section 2016-06-01 18:07:58 +02:00
Juanjo Bazán
785170213b adds print page to management/spending_proposals
includes search and filtering by geozone
2016-04-06 19:04:03 +02:00
Alberto Garcia Cabeza
cb4ea3f540 Improves styles for investment project share 2016-03-31 10:53:21 +02:00
Alberto Garcia Cabeza
97db98fd3e Removes html role attributes 2016-03-14 19:31:15 +01:00
Alberto Garcia Cabeza
3752f3a53b Adds foundation 6 🎉 2016-02-26 19:33:33 +01:00
Alberto Garcia Cabeza
2e421ff760 Improves styles for print_proposals 2015-10-28 20:06:04 +01:00
rgarcia
8acd119b19 displays only the first 5 proposals to print 2015-10-20 14:45:59 +02:00
Alberto Garcia Cabeza
b0be8a15a8 Improves styles for management on IE 2015-10-19 22:40:21 +02:00
Alberto Garcia Cabeza
8c339b54fc Adds new styles for print buttons 2015-10-19 13:27:34 +02:00
rgarcia
f37c10130e adds missing print buttons 2015-10-19 11:53:26 +02:00
Alberto Garcia Cabeza
ba14126505 Adds styles for management IE 2015-10-14 18:35:48 +02:00
Alberto Garcia Cabeza
68b866171b Adds styles for management pages 2015-10-13 23:49:12 +02:00
rgarcia
dc93ea6dba displays proposal created within management layout 2015-10-13 15:00:23 +02:00
rgarcia
f55c3974aa refactors managed user info into management layout 2015-10-12 14:05:06 +02:00
rgarcia
1193121f0e displays managed user in proposals section 2015-10-11 16:56:43 +02:00
rgarcia
411ec5c9a4 adding translations 2015-10-08 18:23:50 +02:00
rgarcia
5560c84b66 adds spec for manager print proposals 2015-10-08 14:56:27 +02:00
rgarcia
a3503c7eb3 refactors manager proposal votes 2015-10-08 14:40:47 +02:00
rgarcia
18e66160fe adds manager creating proposals spec 2015-10-08 13:56:51 +02:00
rgarcia
015e57ddad adds print of new proposals 2015-10-08 12:43:33 +02:00
rgarcia
0acdf5722b adds creation of proposals by managers 2015-10-08 12:43:33 +02:00
rgarcia
33a3ece1c2 adds search for proposals 2015-10-08 12:43:32 +02:00
rgarcia
4881f5bd1e basic proposal voting my managers 2015-10-08 12:43:32 +02:00
rgarcia
74b92ca317 tmp commit manager vote 2015-10-08 12:43:32 +02:00