Sha256: cb64fcb7ed5463a75a9d58b7da18066d79021f5126cbce046f66298a49a7d763

Contents?: true

Size: 1.63 KB

Versions: 4

Compression:

Stored size: 1.63 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, :street1, "width:240px; margin-top:3px")
          = address_field(a, :street2, "width:240px;")
    %table.address(cellpadding="0" cellspacing="0")
      %tr
        %td
          = address_field(a, :city, "width:165px;")
        %td= spacer
        %td
          = address_field(a, :state, "width:60px;")
    %table.address(cellpadding="0" cellspacing="0")
      %tr
        %td
          = address_field(a, :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

4 entries across 4 versions & 1 rubygems

Version Path
fat_free_crm-0.20.1 app/views/shared/_address.html.haml
fat_free_crm-0.20.0 app/views/shared/_address.html.haml
fat_free_crm-0.19.2 app/views/shared/_address.html.haml
fat_free_crm-0.19.0 app/views/shared/_address.html.haml