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

JM - (SPARCRequest & SPARCDashboard) Step 2 Edit Study RMID Bugs [#150810679] #1123

Merged
merged 3 commits into from Sep 21, 2017

Conversation

jwiel86
Copy link
Contributor

@jwiel86 jwiel86 commented Sep 14, 2017

@@ -46,3 +46,6 @@ textarea

.gray_note
color: gray

.red_exclamation
Copy link
Contributor

Choose a reason for hiding this comment

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

The text-danger class is designed to do this using the SPARC color scheme red

@@ -97,6 +97,8 @@ def new
session[:protocol_type] = params[:protocol_type]
gon.rm_id_api_url = RESEARCH_MASTER_API
gon.rm_id_api_token = RMID_API_TOKEN
@rmid_server_down = @protocol.rmid_server_status
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is repeated multiple times, it might be worth putting inside a helper method in Dashboard::BaseController

.col-lg-3
= form.text_field :research_master_id, class: 'form-control research-master-field', disabled: rmid_server_down
- if rmid_server_down
.glyphicon.glyphicon-exclamation-sign.red_exclamation{ title: t(:protocols)[:summary][:tooltips][:rmid_server_down], data: { toggle: 'tooltip', delay: '{"show":"500"}' } }
Copy link
Contributor

Choose a reason for hiding this comment

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

text-danger could replace red_exclamation here

@@ -18,7 +18,7 @@
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR~
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.~
#flashes_container
- if !content_for?(:error_messages)
- if @rmid_server_down
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a very niche change. The only change is removing the = content_for(:error_messages) inside of the flash. @jwiel86 can you send me a slack message or just reply here why you needed to remove it for this one case?

Copy link
Contributor

Choose a reason for hiding this comment

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

Approving this comment for now. Discussed with @jwiel86 and we decided that it would seem to work removing the if-else altogether, but to be safe for now we should leave it like this and revisit it later.

@jwiel86 jwiel86 force-pushed the jm-rmid-bug branch 3 times, most recently from 551b027 to 3ba1422 Compare September 15, 2017 14:56
@@ -30,10 +30,12 @@
= form.label :research_master_id, class: 'col-lg-2 control-label rm-id' do
= link_to t(:protocols)[:studies][:information][:research_master_id], RESEARCH_MASTER_LINK, target: '_blank'
.col-lg-3
= form.text_field :research_master_id, class: 'form-control research-master-field', readonly: action_name == "edit" && admin
- if action_name == "edit" && admin
= form.text_field :research_master_id, class: 'form-control research-master-field', readonly: action_name == "edit" && admin, disabled: rmid_server_down
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed with @jwiel86 on Slack, there is a bug where if you press "Save" on a new Protocol when there are errors and when the server is down, this field is no longer disabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kyle-glick This bug has now been fixed, see app/views/protocols/create.js.coffee and app/views/dashboard/protocols/create.js.coffee. Thank you for manually testing!

@jwiel86 jwiel86 force-pushed the jm-rmid-bug branch 3 times, most recently from 8aa88c8 to d051b42 Compare September 15, 2017 20:35
@jleonardw9 jleonardw9 merged commit a8d187e into v3.0.0b Sep 21, 2017
@jleonardw9 jleonardw9 deleted the jm-rmid-bug branch September 21, 2017 16:03
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.

None yet

3 participants