venue_management/app/views/admin/venue_management_items/index.html.erb

81 lines
2.1 KiB
Plaintext
Raw Normal View History

2020-05-07 15:26:34 +00:00
<div id="venue_management_items_index">
<%= render 'index' %>
</div>
<!-- pageslide -->
<div id="pageslide">
<div class="page-title clearfix">
<a class="pull-right" href="javascript:$.pageslide.close()">
<i class="icons-arrow-left-2"></i>
</a>
<span></span>
</div>
<div class="view-page">
<div class="nano">
<div class="content">
<div id="add-tags">
<div class="tab-content">
<div class="set_new tab-pane fade active in">
<%= form_for :venue_management_item, url: nil, remote: true do |f| %>
<fieldset>
<%= render :partial => "form", :locals => { :f => f } %>
<div class="form-actions">
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
<%= f.submit t(:submit), class: 'btn btn-primary btn-small', id: "tag_submit" %>
</div>
</fieldset>
<% end %>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "venue_management_sets" %>
<% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "check_venue_management_set_items.js" %>
<%= javascript_include_tag "venue_management_sets.js" %>
<% end %>
<script type="text/javascript">
var validate = function(dom){
var valid = true;
if($(dom).val()==""){
valid=false;
$(dom).parent().parent().addClass('error');
$(dom).next().removeClass('hide');
}else{
$(dom).parent().parent().removeClass('error');
$(dom).next().addClass('hide');
}
return valid;
}
$(function(){
$.each($('.set_new form input:text'),function(){
$(this).blur(function(){
validate($(this));
});
$(this).keyup(function(){
validate($(this));
});
});
});
$("#tag_submit").click(function(){
var valid = true;
$.each($(".set_new form input:text"),function(){
if(!validate($(this))) valid=false;
});
if(!valid) return false;
});
</script>
<!-- pageslide:end -->