According to the HTML specification:
> The default value is the minimum plus half the difference between the
> minimum and the maximum, unless the maximum is less than the minimum,
> in which case the default value is the minimum.
So for new progress bars, we had a numeric value of `nil` and a range
value of `50`, meaning the input fields weren't in sync.
Manually triggering the event on the progress, while not an ideal
solution (ideally we would be able to define `0` as default), sets the
value of the numeric field.
Show information about longitude and latitude in a budget heading
Show information about custom content in a budget heading
Fix render of map (zoom scrollable and points clickable)
Fix typo in app/models/map_location.rb
If we enabled the locale and then added an option, the "add option" link
added the partial which was generated before enabling the translation,
and so it generated a field where the translation was disabled.
Enabling the translation after inserting each field solves the issue.
Updating it required reorganizing the form so translatable fields are
together.
We also needed to add a `hint` option to the form label and input
methods so the hint wouldn't show up for every language.
Finally, the markdown editor needed to use the same globalize attributes
as inputs, labels and hints, which adds a bit of duplication.
This change forces us to use nested attributes for translations, instead
of using the more convenient `:"title_#{locale}"` methods.
On the other hand, we can use Rails' native `_destroy` attribute to
remove existing translations, so we don't have to use our custom
`delete_translations`, which was a bit buggy since it didn't consider
failed updates.
Proposed action execution is shown with a red dot. Mouse hover event
shows a pop up for the points of the graph. Red dots will contain the
proposed acction executed for the given date.
Added comment regarding tests for dashboard graph. This feature should
be migrated to Ecma6 and had its own tests once Consul reaches
compatibility with Rails 5.1.
Y axis have received the following enhancement:
It won't show labels for each value in order to improve its readability.
Maximum value will be set according to the maximum number of supports
received for the current proposal.
In case no supports are received it will use the number of supports
required for a successful proposal.
Allowing every format is way more than what we initially intended.
I've only added h2 and h3 because h1 is set somewhere else in the page
(like the title), and h4, h5 and h6 are usually not necessary.
In the same fashion Newsletters is managed, with the only difference that
the preview is using the notification partial in the same way the index
of notifications.
Added check in poll card that allows setting the value of
results_enabled flag.
Access to stats/results now is controlled with abilities.
Polls related to proposals will be accessible to the proposal author
like they were administrators.