Skip to content

Commit

Permalink
ClientPopUpForm: Did styling and Fixed alignment of add-new-contact a…
Browse files Browse the repository at this point in the history
…nd remove-this-contact buttons
  • Loading branch information
tabish-saleem-nxb committed Nov 2, 2018
1 parent fab9a47 commit 21f7800
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
12 changes: 11 additions & 1 deletion app/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2364,7 +2364,17 @@ h6 {
height: 20px;
min-width: 136px;
margin-bottom: 20px;
padding: 2px 10px; }
padding: 3px 10px;
color: #fff;}
.top-align{
padding-top: 5px !important;}
.right-align{
float: right;}
.add-new-contact-btn{
background-color: #09b8e2 !important;
color: #fff !important;
border-color: #09b8e2 !important;
float: right;}
.editClient .btn.moreBtn:hover {
background-color: #09b8e2;
color: #fff;
Expand Down
4 changes: 2 additions & 2 deletions app/views/clients/_client_contact_fields.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%= f.input :home_phone, label: t('views.common.phone'), wrapper_html: { class: 'input-field col s6 m4' }, as: :string %>
<%= f.input :mobile_number, label: t('views.common.mobile'), wrapper_html: { class: 'input-field col s6 m4' } %>
<div class="input-field col s6 m4">
<%= link_to_remove_association t('views.clients.remove_this_contact'), f, class: 'btn moreBtn remove truncate' %>
<%= link_to_remove_association t('views.clients.remove_this_contact'), f, class: 'btn moreBtn remove truncate red right-align' %>
</div>
</div>
</div>
</div>
16 changes: 8 additions & 8 deletions app/views/clients/_client_form_popup.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@
<%= label_tag :calculated_credit, t('views.clients.available_credit'), class: 'active' %>
<% end %>
</div>

<div class="col s12">
<%= link_to_add_association t('views.clients.add_new_contact'), f, :client_contacts,
partial: 'client_contact_fields',
class: 'btn moreBtn add',
data: { association_insertion_node: '#client-contact-container',
association_insertion_method: :append } %>
</div>
</div>

<div class="row">
Expand All @@ -64,6 +56,14 @@
<%= render 'client_contact_fields', f: client_contact %>
<% end %>
</div>

<div class="col s12 top-align">
<%= link_to_add_association t('views.clients.add_new_contact'), f, :client_contacts,
partial: 'client_contact_fields',
class: 'btn moreBtn add add-new-contact-btn',
data: { association_insertion_node: '#client-contact-container',
association_insertion_method: :append } %>
</div>
</div>
<div class="row">
<h5 class="text-blue title-heading"><%= t('views.clients.make_available_to') %></h5>
Expand Down

0 comments on commit 21f7800

Please sign in to comment.