2019-11-26 15:52:52 +00:00
|
|
|
<div class="attributes default <%= attribute_submission_field.disabled ? 'disabled' : ''%>">
|
|
|
|
<%
|
2023-01-11 09:44:40 +00:00
|
|
|
@af_counter = attribute_submission_field_counter
|
2019-11-26 15:52:52 +00:00
|
|
|
%>
|
|
|
|
<div class="attributes-header clearfix">
|
2023-04-12 03:33:32 +00:00
|
|
|
<%= hidden_field "#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}]", "sort_number", :value=> @af_counter, :class=>"sort_number" %>
|
2019-11-26 15:52:52 +00:00
|
|
|
<div class="toggle-control" style="float: right;">
|
2023-04-12 03:33:32 +00:00
|
|
|
<div class="togglebox <%= attribute_submission_field.disabled ? 'disabled disable' : ''%>">
|
|
|
|
<%= hidden_field "#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}]", "disabled", :value=>attribute_submission_field.disabled, :class=>"toggle-check", :data=>{:deploy=> "right"} %>
|
2019-11-26 15:52:52 +00:00
|
|
|
<label><b></b></label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<a class="btn btn-mini pull-right btn-danger delete" href="#"><i class="icon-trash"></i> <%= t(:delete_)%></a>
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= hidden_field "#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}]","_destroy",:value=>false,:class=>"attribute_field_destroy"%>
|
2019-11-26 15:52:52 +00:00
|
|
|
<a class="btn btn-mini pull-right btn-inverse reply hide" href="#"><i class="icons-reply"></i> Reset</a>
|
|
|
|
<h4>Field <span><%= @af_counter + 1 %></span></h4>
|
|
|
|
</div>
|
|
|
|
<div class="attributes-body">
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label muted" for="key_<%= @af_counter %>"><%= t(:key) %></label>
|
|
|
|
<div class="controls">
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= text_field "#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}]","key",:value=>attribute_submission_field.key, :data=>{:type=>"key"} %>
|
2019-11-26 15:52:52 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_submission_field.title_translations,:class_ext=>"pull-left",:label_ext=>t(:name),:field_name=>"#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][title_translations]"}%>
|
2019-11-26 15:52:52 +00:00
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label muted" for=""><%= t('seminar.to_require') %></label>
|
|
|
|
<div class="controls">
|
|
|
|
<label class="radio inline">
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= radio_button("#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}]", "to_require", "true",:checked => (attribute_submission_field.to_require == true ? true : false), :data=>{:type=>"search_true"}) %><%= t(:yes_)%>
|
2019-11-26 15:52:52 +00:00
|
|
|
</label>
|
|
|
|
<label class="radio inline">
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= radio_button("#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}]", "to_require", "false",:checked => (attribute_submission_field.to_require == false ? true : false), :data=>{:type=>"search_false"}) %><%= t(:no_)%>
|
2019-11-26 15:52:52 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label muted" for=""><%= t(:type)%></label>
|
|
|
|
<div class="controls">
|
2023-01-11 09:44:40 +00:00
|
|
|
<select class="dataType" data-type="select" name=<%= "#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][markup]"%>>
|
2021-04-24 10:41:50 +00:00
|
|
|
<%$seminar_list[:markups].each do |key,val|%>
|
|
|
|
<% next if val["display_only"] && val["display_only"] != "seminar_submission_field" %>
|
2019-11-26 15:52:52 +00:00
|
|
|
<% if key != 'address' %>
|
|
|
|
<option value="<%= key %>" <%= attribute_submission_field.markup == key ? 'selected="selected"' : '' %> ref="<%=val["panel"]%>"><%=t("lists.markups."+key)%></option >
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="field-type fade"></div>
|
|
|
|
|
2021-04-24 10:41:50 +00:00
|
|
|
<%= content_tag :div,:class=>"field-type default fade in #{show_seminar_type_panel(attribute_submission_field,"typeA")}" do%>
|
2019-11-26 15:52:52 +00:00
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label muted"><%= t(:enabled_for)%></label>
|
|
|
|
<div class="controls">
|
|
|
|
<label class="checkbox inline">
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= check_box_tag("#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeA][cross_lang]","true",attribute_submission_field["typeA"]["cross_lang"],:data=>{:type=>"cross_lang"}) %>
|
2019-11-26 15:52:52 +00:00
|
|
|
<%= t(:cross_lang) %>
|
|
|
|
</label>
|
|
|
|
<label class="checkbox inline">
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= check_box_tag("#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeA][add_more]","true",attribute_submission_field["typeA"]["add_more"],:data=>{:type=>"add_more"}) %>
|
2019-11-26 15:52:52 +00:00
|
|
|
<%= t(:add_more)%>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_submission_field["typeA"]["placeholder"],:field_name=>"#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeA][placeholder]"}%>
|
2021-04-24 10:41:50 +00:00
|
|
|
<% end if show_seminar_type_panel(attribute_submission_field,"typeA") != 'typeA hide' %>
|
2019-11-26 15:52:52 +00:00
|
|
|
|
2021-04-24 10:41:50 +00:00
|
|
|
<%= content_tag :div,:class=>"field-type default fade in #{show_seminar_type_panel(attribute_submission_field,"typeB")}" do %>
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:label_ext=>t(:initial),:values=>attribute_submission_field["typeB"]["initial"],:field_name=>"#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeB][initial]"}%>
|
2019-11-26 15:52:52 +00:00
|
|
|
|
|
|
|
<% if attribute_submission_field.self_defined_markup_options?%>
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= render :partial=>"shared/attribute_field/list_block",:locals=>{:values=>attribute_submission_field["option_list"],:field_name=> "#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][attribute][seminar][statuses]"} %>
|
2019-11-26 15:52:52 +00:00
|
|
|
<%else #normal list%>
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= render :partial=>"shared/attribute_field/list_block",:locals=>{:values=>attribute_submission_field["option_list"],:field_name=> "#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeB][option_list]"} %>
|
2019-11-26 15:52:52 +00:00
|
|
|
<% end #of self_defined_markup_options?%>
|
|
|
|
|
2021-04-24 10:41:50 +00:00
|
|
|
<% end if show_seminar_type_panel(attribute_submission_field,"typeB") != 'typeB hide' %>
|
2019-11-26 15:52:52 +00:00
|
|
|
|
2021-04-24 10:41:50 +00:00
|
|
|
<%= content_tag :div,:class=>"field-type default fade in #{show_seminar_type_panel(attribute_submission_field,"typeC")}" do %>
|
2019-11-26 15:52:52 +00:00
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label"><%= t("date.format")%></label>
|
|
|
|
<div class="controls">
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= select "#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeC]","format",Admin::AttributeValuesViewHelper::OPT,:class=>"dataType",:selected=>attribute_submission_field["typeC"]["format"] %>
|
2019-11-26 15:52:52 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label"><%= t("date.range")%></label>
|
|
|
|
<div class="controls">
|
|
|
|
<label class="radio inline">
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= radio_button("#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeC]", "is_range", "false",:checked => (!attribute_submission_field.date_is_range? ? true : false)) %><%= t(:yes_)%>
|
2019-11-26 15:52:52 +00:00
|
|
|
</label>
|
|
|
|
<label class="radio inline">
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= radio_button("#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeC]", "is_range", "true",:checked => (attribute_submission_field.date_is_range? ? true : false)) %><%= t(:no_)%>
|
2019-11-26 15:52:52 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label"><%= t("date.calendar")%></label>
|
|
|
|
<div class="controls">
|
|
|
|
<label class="radio inline">
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= radio_button("#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeC]", "calendar", "west_calendar",:checked =>(attribute_submission_field["typeC"]["calendar"]== "west_calendar" ? true : false)) %><%= t("date.west_calendar")%>
|
2019-11-26 15:52:52 +00:00
|
|
|
</label>
|
|
|
|
<label class="radio inline">
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= radio_button("#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeC]", "calendar", "tw_calendar",:checked =>(attribute_submission_field["typeC"]["calendar"]== "tw_calendar" ? true : false)) %><%= t("date.tw_calendar")%>
|
2019-11-26 15:52:52 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-04-24 10:41:50 +00:00
|
|
|
<% end if show_seminar_type_panel(attribute_submission_field,"typeC") != 'typeC hide' %>
|
2019-11-26 15:52:52 +00:00
|
|
|
|
2021-04-24 10:41:50 +00:00
|
|
|
<%= content_tag :div,:class=>"field-type default fade in #{show_seminar_type_panel(attribute_submission_field,"typeD")}" do%>
|
2019-11-26 15:52:52 +00:00
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label"><%= t(:enabled_for)%></label>
|
|
|
|
<div class="controls">
|
|
|
|
<label class="checkbox inline">
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= check_box_tag("#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeD][cross_lang]","true",attribute_submission_field["typeD"]["cross_lang"]) %>
|
2019-11-26 15:52:52 +00:00
|
|
|
<%= t(:cross_lang)%>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:field_name=>"#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeD][placeholder]",:values=>attribute_submission_field["typeD"]["placeholder"]} %>
|
2021-04-24 10:41:50 +00:00
|
|
|
<% end if show_seminar_type_panel(attribute_submission_field,"typeD") != 'typeD hide' %>
|
2019-11-26 15:52:52 +00:00
|
|
|
|
2021-04-24 10:41:50 +00:00
|
|
|
<%= content_tag :div,:class=>"field-type default fade in #{show_seminar_type_panel(attribute_submission_field,"typeE")}" do%>
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= render :partial=>"shared/attribute_field/list_block",:locals=>{:field_name=>"#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}][typeE][option_list]",:values=>attribute_submission_field["typeE"]["option_list"]}%>
|
2021-04-24 10:41:50 +00:00
|
|
|
<% end if show_seminar_type_panel(attribute_submission_field,"typeE") != 'typeE hide' %>
|
|
|
|
<%= content_tag :div,:class=>"field-type default fade in #{show_seminar_type_panel(attribute_submission_field,"typeF")}" do%>
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label muted" for=""><%= t(:options)%></label>
|
|
|
|
<div class="controls add-input">
|
|
|
|
<% if @attribute.enable_summary_choice %>
|
|
|
|
<% @attribute.summary_chioices.each do |v| %>
|
|
|
|
<div><%=v%></div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end if show_seminar_type_panel(attribute_submission_field,"typeF") != 'typeF hide' %>
|
2023-01-11 09:44:40 +00:00
|
|
|
<%= hidden_field "#{@field_name}[seminar_submission_fields_attributes][#{@af_counter}]","id",:value=>attribute_submission_field.id%>
|
2019-11-26 15:52:52 +00:00
|
|
|
|
|
|
|
</div>
|