Skip to content
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

enable reselection of resource after removal #3216

Merged
merged 3 commits into from
Jul 19, 2016

Conversation

NicholasKirchner
Copy link
Contributor

I had a problem with the resource picker not allowing selection of a new resource after removing an already existing resource.

@@ -13,7 +13,9 @@
<%= f.hidden_field field %>

<div>
<%= action_icon :add, insert_link, t('.name'), id: "current_resource_link_#{field}" unless resource %>
<div id="no_resource_selected_<%= field %>", style="<%= 'display: none' if resource %>">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will prefer the use of content_tag view helper, it's easier to read :

<%= content_tag(:div, id: "no_resource_selected_#{field}", style: "display: none;" if resource) do %>
  <%= action_icon :add, insert_link, t('.name'), id: "current_resource_link_#{field}" %>
<% end %>

@bricesanchez
Copy link
Member

Thanks for your contribution, could you make this changes after @parndt review?

@parndt
Copy link
Member

parndt commented Jul 13, 2016

Can you show us a before/after screenshot of what this is expected to change please?

@bricesanchez bricesanchez removed this from the 3.0.4 milestone Jul 15, 2016
@NicholasKirchner
Copy link
Contributor Author

The current flow is that we start from the following:
start_from_resource_present

From here, we click the remove button on the right side. Without this change, there's nothing there:
without_pr_no_add_button

With this change, the add button re-appears:
with_pr_get_add_button

@parndt parndt merged commit acb4088 into refinery:master Jul 19, 2016
@parndt
Copy link
Member

parndt commented Jul 19, 2016

Perfect, I can confirm the solution, thanks!

@NicholasKirchner NicholasKirchner deleted the bugfix/resource-exchange branch July 19, 2016 03:06
bricesanchez pushed a commit that referenced this pull request Jul 19, 2016
* enable reselection of resource after removal

* use content_tag
@bricesanchez bricesanchez added this to the 3.0.5 milestone Nov 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants