-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve budget investment form #2280
Conversation
config/locales/es/budgets.yml
Outdated
@@ -58,6 +58,7 @@ es: | |||
map_location: "Ubicación en el mapa" | |||
map_location_instructions: "Navega por el mapa hasta la ubicación y coloca el marcador." | |||
map_remove_marker: "Eliminar el marcador" | |||
location: "Información adicional de la localización" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe to be consistent with other spanish texts around locations the word localización should be changed for ubicación as that's what the map uses 3 times on title/subtitle/checkbox
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If external_url
won't be used anymore from the form, maybe its a good idea to also remove it from the permitted params at https://github.com/consul/consul/blob/master/app/controllers/budgets/investments_controller.rb#L106
Also... 🤔 its true we can't destroy the column from the database as many forks have values for it ... but maybe adding a rake that "concats" existing values at the end of the "description" attribute with some html tags... could allow us to remove it in two releases in the future?
@@ -311,7 +311,6 @@ def investments_order | |||
select 'Health: More hospitals', from: 'budget_investment_heading_id' | |||
fill_in 'budget_investment_title', with: 'Build a skyscraper' | |||
fill_in 'budget_investment_description', with: 'I want to live in a high tower over the clouds' | |||
fill_in 'budget_investment_external_url', with: 'http:https://http:https://skyscraperpage.com/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see 3 more budget_investment_external_url
occurences in the codebase 🤔 in two more tests:
https://github.com/consul/consul/blob/master/spec/features/management/budget_investments_spec.rb#L35
https://github.com/consul/consul/blob/master/spec/features/emails_spec.rb#L372
That management one... maybe there is a form for investments at management section ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in management panel also there is a new budget investment form with this field
Maybe To completly deprecate the usage of the attribute |
272892d
to
ad3850b
Compare
@@ -51,12 +51,6 @@ | |||
</div> | |||
<% end %> | |||
|
|||
<% if investment.external_url.present? %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But... we want existing budgets with external_url's but no documents to still show those values right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we want to disallow this input field, but maintain the existing links 😌
ad3850b
to
7a30c38
Compare
7a30c38
to
cd53884
Compare
…form Budgets new form
The input was removed via consuldemocracy#2280 but due to conflict resolution, it was accidentally re-introduced. This commit removes it altogether as well as its associated I18n keys
Where
What
external_link
input in budget investment form. The database column will remain for previous budgets where the attribute was used, as it could be useful at some point, or just to keep all the original data as it was introduced.location
input label.Screenshots
Test
As usual.