Sha256: 86d4f42066e94f01f8e6393d5f7c23ff56d25840a4f3e0604ebed898ed36ce45

Contents?: true

Size: 1.7 KB

Versions: 19

Compression:

Stored size: 1.7 KB

Contents

- address_type = type.to_s.camelize
- address_attr = "#{type}_address"
- address = get_address(asset, address_attr)

- same_as_billing ||= false

= f.fields_for(address_attr.to_sym) do |a|
  = a.hidden_field :address_type, :value => address_type
  - unless Setting.compound_address
    - if same_as_billing
      %div
        %span(style="float:right")
          = link_to_function(t(:same_as_billing), "crm.copy_address('account_shipping_address', 'account_billing_address')")
        .label #{t title}:
    - else
      .label #{t title}:
    = a.text_area :full_address, :style =>"width:240px", :rows => 4
  - else
    %table.address(cellpadding="0" cellspacing="0")
      %tr
        %td
          - if same_as_billing
            %div
              %span(style="float:right")
                = link_to_function(t(:same_as_billing), "crm.copy_compound_address('account_billing_address', 'account_shipping_address')")
              .label #{t title}:
          - else
            .label #{t title}:
          = address_field(a, address, :street1, "width:240px; margin-top:3px")
          = address_field(a, address, :street2, "width:240px;")
    %table.address(cellpadding="0" cellspacing="0")
      %tr
        %td
          = address_field(a, address, :city, "width:165px;")
        %td= spacer
        %td
          = address_field(a, address, :state, "width:60px;")
    %table.address(cellpadding="0" cellspacing="0")
      %tr
        %td
          = address_field(a, address, :zipcode, "width:80px;")
        %td= spacer
        %td
          = a.country_select(:country, priority_countries, { :include_blank => "" }, {:"data-placeholder" => t(:select_a_country), :style => "width:150px; margin-top:6px", :class => 'select2'})

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 app/views/shared/_address.html.haml
fat_free_crm-0.15.2 app/views/shared/_address.html.haml
fat_free_crm-0.16.4 app/views/shared/_address.html.haml
fat_free_crm-0.14.1 app/views/shared/_address.html.haml
fat_free_crm-0.15.1 app/views/shared/_address.html.haml
fat_free_crm-0.16.3 app/views/shared/_address.html.haml
fat_free_crm-0.16.2 app/views/shared/_address.html.haml
fat_free_crm-0.16.1 app/views/shared/_address.html.haml
fat_free_crm-0.16.0 app/views/shared/_address.html.haml
fat_free_crm-0.15.0 app/views/shared/_address.html.haml
fat_free_crm-0.15.0.beta.2 app/views/shared/_address.html.haml
fat_free_crm-0.15.0.beta app/views/shared/_address.html.haml
fat_free_crm-0.14.0 app/views/shared/_address.html.haml
reduced_fat_crm-0.15.0.beta app/views/shared/_address.html.haml
reduced_fat_crm-0.14.0 app/views/shared/_address.html.haml
fat_free_crm-0.13.6 app/views/shared/_address.html.haml
fat_free_crm-0.13.5 app/views/shared/_address.html.haml
fat_free_crm-0.13.4 app/views/shared/_address.html.haml
fat_free_crm-0.13.3 app/views/shared/_address.html.haml