Merge pull request #2866 from urbanrotnik/ur-sci-5053

Fix protocol import modal [SCI-5053]
This commit is contained in:
Urban Rotnik 2020-09-23 13:19:23 +02:00 committed by GitHub
commit 33d53c958d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,24 +27,25 @@
</a> </a>
</div> </div>
<div class="panel-options pull-right"> <div class="panel-options pull-right">
<% if step.completed? %> <% unless preview %>
<button data-action="uncomplete-step" <% if step.completed? %>
data-link-url="<%= toggle_step_state_step_path(step)%>" <button data-action="uncomplete-step"
class="btn btn-secondary" data-link-url="<%= toggle_step_state_step_path(step)%>"
<%= 'disabled' if !can_complete_or_checkbox_step?(@protocol) || preview %>> class="btn btn-secondary"
<span class="fas fa-times"></span> <%= 'disabled' if !can_complete_or_checkbox_step?(@protocol) || preview %>>
<%= t("protocols.steps.options.uncomplete_title") %> <span class="fas fa-times"></span>
</button> <%= t("protocols.steps.options.uncomplete_title") %>
<% else %> </button>
<button data-action="complete-step" <% else %>
data-link-url="<%= toggle_step_state_step_path(step)%>" <button data-action="complete-step"
class="btn btn-secondary" data-link-url="<%= toggle_step_state_step_path(step)%>"
<%= 'disabled' if !can_complete_or_checkbox_step?(@protocol) || preview %>> class="btn btn-secondary"
<span class="fas fa-check"></span> <%= 'disabled' if !can_complete_or_checkbox_step?(@protocol) || preview %>>
<%= t("protocols.steps.options.complete_title") %> <span class="fas fa-check"></span>
</button> <%= t("protocols.steps.options.complete_title") %>
</button>
<% end %>
<% end %> <% end %>
<% if (can_manage_protocol_in_module?(@protocol) || can_manage_protocol_in_repository?(@protocol)) && !(preview) %> <% if (can_manage_protocol_in_module?(@protocol) || can_manage_protocol_in_repository?(@protocol)) && !(preview) %>
<%= link_to(move_up_step_path(step), <%= link_to(move_up_step_path(step),
class: 'btn btn-light icon-btn', class: 'btn btn-light icon-btn',