116 lines
4.2 KiB
Plaintext
116 lines
4.2 KiB
Plaintext
<%= form_for @act_signup, url: admin_active_path(@act), html: {class: "form-horizontal main-forms"} do |f| %>
|
|
<fieldset>
|
|
|
|
<% content_for :page_specific_css do %>
|
|
<%= stylesheet_link_tag "lib/main-forms" %>
|
|
<%= stylesheet_link_tag "lib/fileupload" %>
|
|
<%= stylesheet_link_tag "lib/main-list" %>
|
|
<% end %>
|
|
<% content_for :page_specific_javascript do %>
|
|
<%= javascript_include_tag "lib/bootstrap-fileupload" %>
|
|
<%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
|
|
<%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
|
|
<%= javascript_include_tag "lib/file-type" %>
|
|
<%= javascript_include_tag "lib/module-area" %>
|
|
<% end %>
|
|
|
|
<!-- Input Area -->
|
|
<div class="input-area">
|
|
|
|
<!-- Module Tabs -->
|
|
<div class="nav-name"><strong><%= t(:module) %></strong></div>
|
|
<ul class="nav nav-pills module-nav">
|
|
<li class="active"><a href="#basic" data-toggle="tab"><%= t(:basic) %></a></li>
|
|
</ul>
|
|
|
|
<!-- Module -->
|
|
<div class="tab-content module-area">
|
|
|
|
<!-- Basic Module -->
|
|
<div class="tab-pane fade in active" id="basic">
|
|
123
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Language Tabs -->
|
|
<div class="nav-name"><strong><%= t(:language) %></strong></div>
|
|
<ul class="nav nav-pills language-nav">
|
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
|
<li class="<%= 'active' if i == 0 %>">
|
|
<a data-toggle="tab" href=".<%= locale %>"><%= t(locale) %></a>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
|
|
<!-- Language -->
|
|
<div class="tab-content language-area">
|
|
ccc
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Form Actions -->
|
|
<div class="form-actions">
|
|
<%= get_referer_url[:action] rescue "" %>
|
|
<%= f.submit t('submit'), class: 'btn btn-primary' %>
|
|
<input type="hidden" name="referer_url" value="<%= get_referer_url %>">
|
|
<%= link_to t('cancel'), admin_actives_path, :class=>"btn" %>
|
|
</div>
|
|
|
|
<% content_for :page_specific_javascript do %>
|
|
<script>
|
|
$(function() {
|
|
$("#main-wrap").after("");
|
|
|
|
$(document).on('click', '#add_link', function(){
|
|
var new_id = $(this).prev().attr('value');
|
|
var old_id = new RegExp("new_act_links", "g");
|
|
var on = $('.language-nav li.active').index();
|
|
var le = $(this).parent('.add-btn').prev('.add-target').children('.start-line').length;
|
|
$(this).prev().attr('value', parseInt(new_id) + 1);
|
|
$(this).parent().siblings('.add-target').append(("<%= escape_javascript(add_attribute 'form_link', f, :act_links) %>").replace(old_id, new_id));
|
|
$(this).parent('.add-btn').prev('.add-target').children('.start-line').eq(le).children('.tab-content').children('.tab-pane').eq(on).addClass('in active').siblings().removeClass('in active');
|
|
formTip();
|
|
});
|
|
$(document).on('click', '#add_file', function(){
|
|
var new_id = $(this).prev().attr('value');
|
|
var old_id = new RegExp("new_act_files", "g");
|
|
var on = $('.language-nav li.active').index();
|
|
var le = $(this).parent('.add-btn').prev('.add-target').children('.start-line').length;
|
|
$(this).prev().attr('value', parseInt(new_id) + 1);
|
|
$(this).parent().siblings('.add-target').append(("<%= escape_javascript(add_attribute 'form_file', f, :act_files) %>").replace(old_id, new_id));
|
|
$(this).parent('.add-btn').prev('.add-target').children('.start-line').eq(le).children('.input-append').find('.tab-content').each(function() {
|
|
$(this).children('.tab-pane').eq(on).addClass('in active').siblings().removeClass('in active');
|
|
});
|
|
formTip();
|
|
});
|
|
$(document).on('click', '.delete_link', function(){
|
|
$(this).parents('.input-prepend').remove();
|
|
});
|
|
$(document).on('click', '.delete_file', function(){
|
|
$(this).parents('.input-prepend').remove();
|
|
});
|
|
$(document).on('click', '.remove_existing_record', function(){
|
|
if(confirm("<%= I18n.t(:sure?)%>")){
|
|
$(this).children('.should_destroy').attr('value', 1);
|
|
$(this).parents('.start-line').hide();
|
|
}
|
|
});
|
|
|
|
$('#remind-check').prop('checked') ? '':$('.content-box').addClass('hide')
|
|
$('#remind-check').on('change', function() {
|
|
$(this).prop('checked') ? $('.content-box').removeClass('hide'):$('.content-box').addClass('hide')
|
|
})
|
|
|
|
});
|
|
</script>
|
|
<% end %>
|
|
|
|
|
|
|
|
</fieldset>
|
|
<% end %> |