Sha256: 366759d7c41f7abe7f825d6f81c118519ecccc0bea412e3cc03aa0cf3aecca49

Contents?: true

Size: 1.67 KB

Versions: 8

Compression:

Stored size: 1.67 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"})

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fat_free_crm-0.13.2 app/views/shared/_address.html.haml
fat_free_crm-0.12.3 app/views/shared/_address.html.haml
fat_free_crm-0.12.2 app/views/shared/_address.html.haml
fat_free_crm-0.13.1 app/views/shared/_address.html.haml
fat_free_crm-0.12.1 app/views/shared/_address.html.haml
fat_free_crm-0.13.0 app/views/shared/_address.html.haml
fat_free_crm-0.12.0 app/views/shared/_address.html.haml
fat_free_crm-0.11.4 app/views/shared/_address.html.haml