Orbit/app/views/shared/attribute_field/_address_modal_dialog.html.erb

62 lines
3.7 KiB
Plaintext
Raw Normal View History

2012-11-15 09:23:39 +00:00
<div class="modal hide fade address-edit <%= btn_class %>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" id=<%= html_id%>>
2012-11-12 02:41:41 +00:00
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel"><%= (field_name rescue nil) || t("address_modal.default_title") %></h3>
</div>
<div class="modal-body">
<div class="tabbable">
<ul class="nav nav-tabs">
<% VALID_LOCALES.each do |locale|%>
2012-11-15 09:23:39 +00:00
<% active = (locale == I18n.locale.to_s ? ["active"] : [] ) %>
<%= content_tag :li,:class=>active.push("modal_tab","address_tab").join(' '),:for=>locale do%>
2013-01-08 09:30:36 +00:00
<%= link_to I18nVariable.from_locale(locale),".#{btn_class}.address_modal.#{locale}",:data=>{:toggle=>"tab"}%>
2012-11-12 02:41:41 +00:00
<% end %>
<% end %>
</ul>
<div class="tab-content">
<% VALID_LOCALES.each do |locale|%>
<!-- start of lang tab context -->
2012-11-15 09:23:39 +00:00
<% active = (locale == I18n.locale.to_s ? "active" : "" ) %>
2012-11-12 02:41:41 +00:00
<div class="tab-pane <%= active %> fade in <%= "#{btn_class} address_modal #{locale}" %>" for="<%= locale %>">
<div class="control-group">
<label class="control-label" for="street_address"><%= t("address_modal.street_address") %></label>
<div class="controls">
<%= text_area_tag("#{field_name_basic}[temp][address_ext][#{locale}][street_address]",nil,:rows=>3,:func=>'street_address') %>
2012-11-12 02:41:41 +00:00
</div>
</div>
<div class="control-group">
<label class="control-label" for="city"><%= t("address_modal.city") %></label>
<div class="controls">
<%= text_field_tag("#{field_name_basic}[temp][address_ext][#{locale}][city]",'',:func=>'city') %>
2012-11-12 02:41:41 +00:00
</div>
</div>
<div class="control-group">
<label class="control-label" for="counties"><%= t("address_modal.county") %></label>
<div class="controls">
<%= text_field_tag("#{field_name_basic}[temp][address_ext][#{locale}][county]",'',:func=>'county') %>
2012-11-12 02:41:41 +00:00
</div>
</div>
<div class="control-group">
<label class="control-label" for="zip"><%= t("address_modal.zip") %></label>
<div class="controls">
<%= text_field_tag("#{field_name_basic}[temp][address_ext][#{locale}][zip]",nil,:class=>"input-mini",:func=>'zip') %>
2012-11-12 02:41:41 +00:00
</div>
</div>
<div class="control-group">
<label class="control-label" for="country"><%= t("address_modal.country") %></label>
<div class="controls">
<%= text_field_tag("#{field_name_basic}[temp][address_ext][#{locale}][country]",'',:func=>'country') %>
2012-11-12 02:41:41 +00:00
</div>
</div>
</div>
<!-- end of tab context -->
<% end %>
</div>
</div>
</div>
<div class="modal-footer">
2012-11-27 03:15:15 +00:00
<button class="btn" data-dismiss="modal" aria-hidden="true"><%=t(:close)%></button>
<button href="" class="btn btn-primary bt-save" data-dismiss="modal" aria-hidden="true"><%=t(:save_and_close)%></button>
2012-11-12 02:41:41 +00:00
</div>
</div>