%= form_for @tour, url: url, html: { class: "intro-admin__form intro-admin__tour-form #{yield(:tour_form_class)}" } do |f| %>
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
<% if @tour.errors.any? %>
<% @tour.errors.full_messages.each do |message| %>
<%= content_tag :div, message, class: 'item' %>
<% end %>
<% elsif flash.notice %>
<%= content_tag :div, flash.notice, class: 'message' %>
<% end %>
<%= f.label :ident do %>
<%= t('intro.admin.tour.simple_route') %>
<% end %>
<%= text_field_tag 'tour[route][simple]', @tour.simple_route, placeholder: t('intro.admin.placeholders.simple_route'), class: 'js-tour-simple-route-input' %>
<%= check_box_tag 'tour[route][strict]', 1, @tour.strict_route? %>
<%= label_tag 'tour[route][strict]', t('intro.admin.placeholders.strict_route'), title: t('intro.admin.tips.strict_route') %>
<%= f.label :ident, t('intro.admin.tour.ident') %>
<%= f.text_field :ident, placeholder: t('intro.admin.placeholders.tour_ident'), required: true, class: 'js-tour-ident-input' %>
<%= f.label :controller_path, 'Controller' %>
<%= f.text_field :controller_path, placeholder: 'Controller path', class: 'js-tour-controller-input' %>
<%= f.label :action_name, 'Action' %>
<%= f.text_field :action_name, placeholder: 'Action name', class: 'js-tour-action-input' %>
<%= f.label :action_name, t('intro.admin.tour.query_params') %>
<%= text_field_tag 'tour[route][query]', @tour.route[:query], placeholder: t('intro.admin.placeholders.query_params'), class: 'js-tour-query-input' %>
<%= render 'steps' %>
<%= t('intro.admin.others') %>
<% if Intro.config.visible_without_signing_in %>
<%= check_box_tag 'tour[options][not_sign_visible]', 1, @tour.options['not_sign_visible'] %>
<%= label_tag 'tour[options][not_sign_visible]', t('intro.admin.placeholders.not_sign_visible') %>
<% end %>
<%= check_box_tag 'tour[options][overlay_visible]', 1, @tour.options['overlay_visible'] %>
<%= label_tag 'tour[options][overlay_visible]', t('intro.admin.placeholders.overlay_visible') %>
<% btn_visible = @tour.new_record? || @tour.options['btn_visible'] %>
<%= check_box_tag 'tour[options][btn_visible]', 1, btn_visible, class: 'js-intro-btn-visible-input' %>
<%= label_tag 'tour[options][btn_visible]', t('intro.admin.placeholders.btn_visible') %>
'>
<%= render 'local_field',
label: { name: :btn_complete_text, content: t('intro.admin.tour.btn_complete_text') },
input: { name: 'tour[options][btn_complete_text]', object: @tour.options, attr: :btn_complete_text, options: { placeholder: t('intro.admin.placeholders.btn_complete_text') } }
%>
<%= label_tag :btn_complete_link, t('intro.admin.tour.btn_complete_link') %>
<%= text_field_tag 'tour[options][btn_complete_link]', @tour.options['btn_complete_link'], placeholder: t('intro.admin.placeholders.btn_complete_link') %>
<%= f.label :expired_at, t('intro.admin.tour.expired_time') %>
<%= f.text_field :expired_at, type: :date %>
<%= button_tag t('intro.admin.submit'), class: 'intro-admin__button prime', type: :submit %>
<%= button_tag t('intro.admin.test'), class: 'intro-admin__button js-intro-admin__button-test', type: :button %>
<%= yield(:form_actions) %>
<% end %>