Skip to content

Commit

Permalink
fixed error on edit page fixes #3060 (#3067)
Browse files Browse the repository at this point in the history
* fixed error on edit page

* some fixes

* added if statement
  • Loading branch information
dewanhimanshu authored and jywarren committed Jul 15, 2018
1 parent 3c79545 commit 40a207b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
12 changes: 12 additions & 0 deletions app/views/users/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@
<% end %>

<div class="form-group">
<% if Rails.env == "production" %>
<% if params[:controller] == "users" && params[:action] == "edit" %>
<div class='col-lg-8 col-md-10 col-sm-10' style="display:flex; justify-content: flex-start; padding: 0;">
<label> Link your Public Lab account to providers </label>
</div>
<div class='col-lg-8 col-md-10 col-sm-10' style="display:flex; justify-content: flex-start; padding: 0; margin-bottom: 10px;">
<%= render :partial => "layouts/social_icons" %>
</div>
<% end %>
<% end %>
<br style="clear:both;"/>


<label for="email"><%= t('users._form.email') %></label>
<%= f.text_field :email, { tabindex: 3, placeholder: "you@email.com", class: 'form-control', id: 'email' } %>
Expand Down
13 changes: 2 additions & 11 deletions app/views/users/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,5 @@
<h2><%= t('users.edit.edit_profile') %></h2>

<hr />
<% if Rails.env == "production"%>
<div class='col-lg-8 col-md-10 col-sm-10' style="display:flex; justify-content: flex-start; padding: 0;">
<label> Link your Public Lab account to providers</label>
</div>
<div class='col-lg-8 col-md-10 col-sm-10' style="display:flex; justify-content: flex-start; padding: 0; margin-bottom: 10px;">
<%= render :partial => "layouts/social_icons" %>
</div>
<% end %>


<%= render 'form' %>

<%= render 'form' %>

0 comments on commit 40a207b

Please sign in to comment.