{% extends 'themes/default/config/layout.html' %}
{% block body %}


<div class="row">
	
	
	
		<div class="col s12 m12">
            <div class="row">
            <div class="col s9"><h4 class="light">{{module_params.route.label|trans}} Settings</h4></div>
            <div class="col s3 right-align">
            <a onclick="removeModuleConfig()" class="btn red btn-small"  style="margin-top: 20px"><i class="material-icons left">remove_circle</i> Remove Module Config</a>
            </div>
            </div>
            <div class="card orange">
             <div class="card-content white-text">
                <p>Here you can set the configuration parameters specific to the <b>{{module_params.route.label|trans}}</b> module.</p>
              </div>
              <div class="card-tabs">
                <ul class="tabs tabs-fixed-width tabs-transparent">
                  <li class="tab"><a href="#general-tab" class="active">General</a></li>
                  <li class="tab"><a href="#views-tab" >Views</a></li>
                  <li class="tab"><a href="#details-tab">Details View</a></li>
                  <li class="tab"><a href="#actionbuttons-tab">Action Buttons</a></li>
                  {% if has_inventory_block==false %}
                  <li class="tab"><a href="#create-edit-tab">Create / Edit</a></li>
                  {% endif %}
                  <li class="tab"><a href="#related-tab">Related Modules</a></li>
                  <li class="tab"><a href="#inventory-tab">Inventory Block</a></li>
                  <li class="tab"><a href="#payment-tab">Payment</a></li>
                <div class="indicator" style="right: 173.594px; left: 173.406px;"></div></ul>
                
              </div>
              
              
	              
              <div class="card-content white general-settings-tab">
                
                <div id="general-tab" class="active">
	                
	                {% include 'themes/default/config/module/module.general.html' %}
							
                </div>
                
                
                <div id="views-tab" style="display: none;">         
	                
	                {% include 'themes/default/config/module/module.views.html' %}             
	                
                </div>
                

                <div id="details-tab" style="display: none;">      
	                {% include 'themes/default/config/module/module.details.html' %}  
                </div>
                
                <div id="actionbuttons-tab" style="display: none;">      
	                {% include 'themes/default/config/module/module.actionbuttons.html' %}  
                </div>
                
                {% if has_inventory_block==false %}
                <div id="create-edit-tab" style="display: none;">      
	                {% include 'themes/default/config/module/module.create_edit.html' %}  
	                
                </div>
                {% endif %}
                
                <div id="related-tab" style="display: none;">
	                {% include 'themes/default/config/module/module.related.html' %}
					
                </div>                
                
                
                <div id="inventory-tab" style="display: none;">         
	                
	              {% include 'themes/default/config/module/module.inventory.html' %}
	                
	                                
                </div>
                
                
                
                
                
                <div id="payment-tab" style="display: none;">
	                
	              {% include 'themes/default/config/module/module.payment.html' %}
	  
	                
                </div>
                
                
                
						
						
                <div class="clearfix"></div>
                
              </div>
            </div>
          </div>
          
	
</div>	




{% endblock %}

{% block footerscripts %}
{% include 'themes/default/config/resources/myc_field_engine.js.html' %}

<link rel="stylesheet" href="https://cdn.jsdelivr.net/sweetalert2/6.4.2/sweetalert2.min.css">
<script type="text/javascript" src="https://cdn.jsdelivr.net/sweetalert2/6.4.2/sweetalert2.min.js"></script>

<script>
		                
		                
$(function(){
			                
			                
	$("#visibility_condition_picklist").change(function(){
		if($(this).val()=="ALL" || $(this).val()=="NONE") $("#visibility_condition_rules").hide();									
		else $("#visibility_condition_rules").show();
	});
								
								
	if($("#visibility_condition_picklist").val()=="ALL" || $("#visibility_condition_picklist").val()=="NONE")
		$("#visibility_condition_rules").hide();			
	else $("#visibility_condition_rules").show();
							

			                
})
		                

	
	function removeModuleConfig(){
		swal({
		  title: 'Are you sure?',
		  text: "You won't be able to revert this!",
		  type: 'warning',
		  showCancelButton: true,
		  confirmButtonColor: '#3085d6',
		  cancelButtonColor: '#d33',
		  confirmButtonText: 'Yes, delete it!'
		}).then(function () {
		  swal(
		    'Deleted!',
		    'Your file has been deleted.',
		    'success'
		  );
		  gotoPage(window.location+'remove-config')
		})
	}

	$(function(){
	
	var prevColor = "";
							    	$(".basic_color").click(function(){
								    	
								    	$(this).parent().parent().parent().find("input").val($(this).attr("color-name"));
								    	
								    	$(".color-selected").remove();
								    	$(this).prepend("<i class='material-icons tiny color-selected'>done</i>");
								    	$(".color-variations .color-picker").removeClass(prevColor).addClass($(this).attr("color-name"));
								    	prevColor = $(this).attr("color-name");
								    	
								    	
								    	if(prevColor == "brown" || prevColor == "grey" || prevColor == "blue-grey")
								    		$(".variation_accent").hide();
								    	else if(prevColor == "black" || prevColor == "white")
								    		$(".color-variations").hide();							    	
								    	else $(".color-variations, .variation_accent").show();	
								    	
							    	});
							    	
							    	$(".color-variations .color-picker").click(function(){
								    	
							    	});
							    	
							    	
	})
</script>	      

{% endblock %}