orbit-basic/app/views/admin/roles/edit_sub_role.html.erb

33 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2013-08-09 07:07:05 +00:00
<%= form_for @sub_attribute,:url => eval("admin_#{@attribute_type}_path(@attribute)") ,:class=> "form-horizontal", :id=>"new_bulletin_category", remote: true do |f| %>
<fieldset>
<legend><%= t(eval(":#{@attribute_type}"))%>:<%= @attribute.title %></legend>
<label class="muted" for="key"><%= t(:key) %></label>
<% if @sub_attribute.new_record? %>
<%= f.text_field :key, :class => "input-large", :placeholder => t(:key) %>
<% else %>
<div><%= @sub_attribute.key%></div>
<% end %>
<% @site_in_use_locales.each_with_index do |locale, i| %>
2013-08-09 07:07:05 +00:00
<label class="muted" for="name-en"><%= t(:item_name) %>(<%= I18nVariable.from_locale(locale) %>)</label>
<input id="name-<%= locale %>" type="text" class="input-large" placeholder="<%= t(:item_name) %>" name="<%="sub_role[title_translations][#{locale}]"%>" value="<%= @sub_attribute.title_translations[locale] rescue nil %>">
2013-08-09 07:07:05 +00:00
<% end %>
2013-01-08 08:58:01 +00:00
2013-08-09 07:07:05 +00:00
<label class="muted" for="name-zh-tw"><%= t(:to_search) %></label>
<label class="radio inline">
<%= f.radio_button :to_search, true %>
Yes
</label>
<label class="radio inline">
<%= f.radio_button :to_search, false %>
No
</label>
<div class="form-actions">
<%= f.hidden_field :id %>
<%= f.submit t('submit'), :class=>'btn btn-primary btn-small' %>
<%= link_to t('cancel'), 'javascript:$.pageslide.close()', :class=>" btn-small" %>
</div>
</fieldset>
<% end %>