   
	                <div class="col s12 m12"><h5>General Settings</h5></div>
	                <div class="col s12 m6">
							<ul class="collection">
						      
						      
						      <li class="collection-item" field-name="module_label">
						      <a class="secondary-content btn-floating red hide edit-btn"><i class="material-icons">edit</i></a>
						      <a class="secondary-content btn-floating grey hide cancel-edit-btn"><i class="material-icons">close</i></a>
						      
						      <b>Module Label: </b><br>
						      <div class="details_content">
							      <span class=" flow-text">{{ module_settings['route'].label }}</span>
						      </div>
						      <div class="edit_content hide">
								
									    <input type="text" name="settings[module_label]" value="{{ module_settings['route'].label }}">
									    <label>Module Label</label>
		
									  <br>
										  <a class="btn grey cancel-edit-btn">Cancel</a>
										  <a class="btn green save-edit-btn">Save</a>		
							      	  <div class="clearfix"></div>
						      </div>
						      
						      </li>
						      
						      
						      
						      <li class="collection-item" field-name="enabled">
						      <a class="secondary-content btn-floating red hide edit-btn"><i class="material-icons">edit</i></a>
						      <a class="secondary-content btn-floating grey hide cancel-edit-btn"><i class="material-icons">close</i></a>
						      
						      <b>Is Enabled: </b><br>
						      <div class="details_content">
							      <span class=" flow-text">{% if module_settings['enabled'] %}On{% else %}Off{% endif %}</span>
						      </div>
						      <div class="edit_content hide">
								      <div class="switch">
									    <label>Off 
									    <input type="checkbox" name="settings[enabled]" {% if module_settings['enabled'] %}checked="checked" value="1" {% endif %}>
									    <span class="lever"></span> On
									    </label>
									  </div>
									  <br>
										  <a class="btn grey cancel-edit-btn">Cancel</a>
										  <a class="btn green save-edit-btn">Save</a>		
							      	  <div class="clearfix"></div>
						      </div>
						      
						      </li>
						      
						      
						     
						      
						      
						      
						      
						      
						      
						       <li class="collection-item" field-name="icon">
						      <a class="secondary-content btn-floating red hide edit-btn"><i class="material-icons">edit</i></a>
						      <a class="secondary-content btn-floating grey hide cancel-edit-btn"><i class="material-icons">close</i></a>									      
						      <b>Icon: </b><br>
						      <div class="details_content">
						      	<span class="flow-text">{% if module_settings['icon']!="" %}<i class="material-icons medium">{{module_settings['icon']}}</i>{% else %}None Defined{% endif %}</span>
						      </div>
						      <div class="edit_content hide">
							    <input name="settings[icon]" id="module_icon_select" type="hidden" value="">
							    <div class="row">
								    <div class="col s12">
									 <div class="valign-wrapper">
									 <span class="flow-text valign">Currently Selected: &nbsp;&nbsp;</span>
									 <i class="material-icons medium valign" id="current_module_icon">{{module_settings['icon']}}</i>
									 </div>
									 <br>
									 <a class="btn grey cancel-edit-btn">Cancel</a>
								     <a class="btn green save-edit-btn">Save</a>	
									 
									</div>
							    </div>
							    <div class="row" style="max-height: 200px; overflow-x: scroll;">
								    
								    <div class="col s12">
									    <input type="text" placeholder="Search Icon" id="search_icon">
								    </div>
								    
								    {% for iconname,icon in material_icons %}
								    	<div class="col s1 iconselect center-align {% if module_settings['icon']==iconname %}selected{% endif %}" onclick="javascript:setIcon('{{iconname}}')" icon-name="{{iconname}}"><i class="material-icons">{{iconname}}</i>
									    	<div class="clearfix"></div>
								    	</div>
								    {% endfor %}
								    <div class="clearfix"></div>							    
							    </div>
							    <div class="clearfix"></div>
							  </div>
						      
						      
						      </li>
						      
						    </ul>
					</div>
					<div class="col s12 m6">
							<ul class="collection">
							  
							  <li class="collection-item" field-name="pdf_download_enabled">
						      <a class="secondary-content btn-floating red hide edit-btn"><i class="material-icons">edit</i></a>
						      <a class="secondary-content btn-floating grey hide cancel-edit-btn"><i class="material-icons">close</i></a>									   
					      <b>PDF Download Enabled: </b><br>
						      <div class="details_content">
						      <span class=" flow-text">{% if module_settings['pdf_download_enabled'] %}On{% else %}Off{% endif %}</span>
						      </div>
						      
						      <div class="edit_content hide">
								      <div class="switch">
									    <label>Off 
									    <input type="checkbox" name="settings[pdf_download_enabled]" {% if module_settings['pdf_download_enabled'] %}checked="checked" value="1" {% endif %}>
									    <span class="lever"></span> On
									    </label>
									  </div>
									  <br>
										  <a class="btn grey cancel-edit-btn">Cancel</a>
										  <a class="btn green save-edit-btn">Save</a>		
							      	  <div class="clearfix"></div>
						      </div>			      
						      </li>
							  {% if comments_available %}
							  <li class="collection-item" field-name="comments_enabled">
						      <a class="secondary-content btn-floating red hide edit-btn"><i class="material-icons">edit</i></a>
						      <a class="secondary-content btn-floating grey hide cancel-edit-btn"><i class="material-icons">close</i></a>									
						      <b>Comments Enabled: </b><br>
						      <div class="details_content">
						      <span class=" flow-text">{% if module_settings['comments_enabled'] %}On{% else %}Off{% endif %}</span></div>
						        <div class="edit_content hide">
								      <div class="switch">
									    <label>Off 
									    <input type="checkbox" name="settings[comments_enabled]" {% if module_settings['comments_enabled'] %}checked="checked" value="1" {% endif %}>
									    <span class="lever"></span> On
									    </label>
									  </div>
									  <br>
										  <a class="btn grey cancel-edit-btn">Cancel</a>
										  <a class="btn green save-edit-btn">Save</a>		
							      	  <div class="clearfix"></div>
						      </div>
						      </li>
							  
							  {% endif %}
							  
							  
							  {% if upload_available is defined and upload_available %}
							  <li class="collection-item" field-name="upload_document_enabled">
						      <a class="secondary-content btn-floating red hide edit-btn"><i class="material-icons">edit</i></a>
						      <a class="secondary-content btn-floating grey hide cancel-edit-btn"><i class="material-icons">close</i></a>									
						      <b>Upload Attachments Enabled: </b><br>
						      <div class="details_content">
						      <span class=" flow-text">{% if module_settings['upload_document_enabled'] is defined and module_settings['upload_document_enabled'] %}On{% else %}Off{% endif %}</span></div>
						        <div class="edit_content hide">
								      <div class="switch">
									    <label>Off 
									    <input type="checkbox" name="settings[upload_document_enabled]" {% if module_settings['upload_document_enabled'] is defined and module_settings['upload_document_enabled'] %}checked="checked" value="1" {% endif %}>
									    <span class="lever"></span> On
									    </label>
									  </div>
									  <br>
										  <a class="btn grey cancel-edit-btn">Cancel</a>
										  <a class="btn green save-edit-btn">Save</a>		
							      	  <div class="clearfix"></div>
						      </div>
						      </li>
							  
							  {% endif %}
						      
						      						      
						    </ul>
					</div>
					
					
					<div class="col s12 m12"><hr><h5>Allowed Customer Profiles</h5></div>
					
					<div class="col s12 m12">
							<ul class="collection">		      
						      <li class="collection-item" field-name="allowed_roles">
						      <a class="secondary-content btn-floating red hide edit-btn"><i class="material-icons">edit</i></a>
						      <a class="secondary-content btn-floating grey hide cancel-edit-btn"><i class="material-icons">close</i></a>			
						      <b>Allow this configuration to the following Customer Profiles: </b><br>
						      <div class="details_content">
						      	<span class="flow-text">
						      	{% for allowedroleid in module_settings['allowed_roles'] %}					      		
						      		<a class="btn {{themebasiccolor}} btn-small">{% if roles_labels[allowedroleid] is defined %}{{roles_labels[allowedroleid]|trans}}{% else %}ID:{{allowedroleid}}{% endif %}</a>
						      		
						      	{% endfor %} 
						      	</span>
						      </div>
						      <div class="edit_content hide">
							     
							      <select name="settings[allowed_roles]" class="chosen-select" multiple="multiple" >
								      {% for availablerole in available_roles %}
								      		<option value="{{availablerole.id}}" {% if availablerole.id in module_settings['allowed_roles'] %}selected {% endif %}>{{availablerole.name|trans}}</option>
								      {% endfor %}
							      </select>
							      <br><br>
									 <a class="btn grey cancel-edit-btn">Cancel</a>
								     <a class="btn green save-edit-btn">Save</a>	
						      </div>
							  </li>
							  
							  
						    </ul>
					</div>
					
					
					
					
					<div class="col s12 m12"><hr><h5>Visibility Conditions</h5></div>
					<div class="col s12 m12">
							<ul class="collection">
								
								
						      
						      <li class="collection-item" field-name="condition_operator">
						      <a class="secondary-content btn-floating red hide edit-btn"><i class="material-icons">edit</i></a>
						      <a class="secondary-content btn-floating grey hide cancel-edit-btn"><i class="material-icons">close</i></a>								      
						      <b>Condition Operator: </b><br>
						      <div class="details_content">
						      <span class=" flow-text">
						      {% if module_settings['condition_operator']=="OR" %}Match at least one
						      {% elseif module_settings['condition_operator']=="AND" %} Match all
						      {% elseif module_settings['condition_operator']=="ALL" %} Show All Retrievable Records
						      {% elseif module_settings['condition_operator']=="NONE" %} Don't retrieve Records
						      {% endif %}
						      </span>
						      </div>
						      <div class="edit_content hide">
							      <select name="settings[condition_operator]" id="visibility_condition_picklist">
								      <option value="OR" {% if module_settings['condition_operator']=="OR" %}selected{% endif %}>Match at least one condition</option>
								      <option value="AND" {% if module_settings['condition_operator']=="AND" %}selected{% endif %}>Match all conditions</option>
								      <option value="ALL" {% if module_settings['condition_operator']=="ALL" %}selected{% endif %}>Show All Retrievable Records</option>
								      <option value="NONE" {% if module_settings['condition_operator']=="NONE" %}selected{% endif %}>Don't retrieve Records</option>
							      </select>
							      <br>
								  <a class="btn grey cancel-edit-btn">Cancel</a>
								  <a class="btn green save-edit-btn">Save</a>
						      </div>
						      </li>	
								
						      {% include 'themes/default/config/module/condition-field.html' with { is_group: "false", condition_rows:  module_settings["conditions"], f_label: "Conditions", f_name: "conditions", f_id: "visibility_condition_rules"} %} 
							</ul>
					</div>
					
					
					
					
					
					<div class="col s12 m12"><hr><h5>Visibility Inheritance</h5></div>
					
					<div class="col s12 m12">
							<ul class="collection">		      
						      <li class="collection-item" field-name="visibility_inheritance_relations">
						      <a class="secondary-content btn-floating red hide edit-btn"><i class="material-icons">edit</i></a>
						      <a class="secondary-content btn-floating grey hide cancel-edit-btn"><i class="material-icons">close</i></a>			
						      <b>Show record related through the following modules: </b><br>
						      <div class="details_content">
						      	<span class="flow-text">
						      	{% for relationlabel in module_settings['visibility_inheritance_relations'] %}
						      		<a class="btn {{themebasiccolor}} btn-small">{{relationlabel|trans}}</a>
						      	{% endfor %} 
						      	</span>
						      </div>
						      <div class="edit_content hide">
							      {% set relmod_order = [] %}
							      {% for relationlabel,relatedmodule in module_settings['visibility_inheritance_relations'] %}
							      	{% set relmod_order = relmod_order|merge([relationlabel]) %}
							      {% endfor %}
							      <select name="settings[visibility_inheritance_relations]" class="chosen-select" multiple sort-order="{{relmod_order|join(',')}}">
								      {% for relationlabel,relatedmodule in module_params['parent_related_modules'] %}
								      		<option value="{{relationlabel}}" {% if relationlabel in module_settings['visibility_inheritance_relations'] %}selected {% endif %}>{{relationlabel|trans}}</option>
								      {% endfor %}
							      </select>
							      <br><br>
									 <a class="btn grey cancel-edit-btn">Cancel</a>
								     <a class="btn green save-edit-btn">Save</a>	
						      </div>
							  </li>
							  
							  
						    </ul>
					</div>
					
	                
	                
	                <div class="col s12 m12"><hr><h5>Dashboard Settings</h5></div>
	                
	                <div class="col s12 m6">
							<ul class="collection">
								<li class="collection-item" field-name="dashboard_enabled" field-group="dashboard_view">
				
						      <b>Show on Dashboard: </b><br>
						      <div class="details_content">
						      <span class=" flow-text">{% if module_settings.dashboard.enabled is defined and module_settings.dashboard.enabled %}On{% else %}Off{% endif %}</span></div>
						        <div class="edit_content hide">
								      <div class="switch">
									    <label>Off 
									    <input type="checkbox" name="settings[dashboard_enabled]"  param-name="enabled" {% if module_settings.dashboard.enabled is defined and module_settings.dashboard.enabled %}checked="checked" value="1" {% endif %}>
									    <span class="lever"></span> On
									    </label>
									  </div>		
							      	  <div class="clearfix"></div>
						      </div>
						      </li>
						      
						      
						      <li class="collection-item"  field-type="array" field-name="dashboard_params" field-group="dashboard_view" id="dashboard_group_field">
						     
						      <b>Group Field: </b><br>
						      <div class="details_content">
						      <span class=" flow-text">{% if module_settings.dashboard.group_field is defined and module_settings.dashboard.group_field !="none" %}{{field_labels[module_settings.dashboard.group_field]|trans}}{% endif %}</span>
						      </div>
						      
						      <div class="edit_content hide">
						      <select  param-name="group_field" name="settings[dashboard_params]" class=""  >
								      <option value="none" {% if module_settings.dashboard.group_field is defined and "none" == module_settings.dashboard.group_field %}selected {% endif %}>None</option>
								      {% for field in module_params['fields'] %}
								      	{% if field.name!="id"  %}
								      		<option value="{{field.name}}" {% if module_settings.dashboard.group_field is defined and field.name == module_settings.dashboard.group_field %}selected {% endif %}>{{field.label|trans}}</option>
								      	{% endif %}	
								      {% endfor %}
							      </select>
						      </div>
						      
						      </li>



							</ul>
	                </div>
	                <div class="col s12 m6">
							<ul class="collection">
								
							  <li class="collection-item"  field-type="array" field-name="dashboard_params" field-group="dashboard_view">
						      
						      <b>Widget Type: </b><br>
						      <div class="details_content">
						      <span class=" flow-text">{% if module_settings.dashboard.chart_type is defined %}{{("chart_" ~ module_settings.dashboard.chart_type)|trans}}{% endif %}</span>
						      </div>
						      
						      <div class="edit_content hide">
						      <select  param-name="chart_type" id="dashboard_chart_type" name="settings[dashboard_params]" class="" required >
								      <option value="count" {% if module_settings.dashboard.chart_type is defined and module_settings.dashboard.chart_type == "count" %}selected {% endif %}>{{"chart_count"|trans}}</option>
								      <option value="bar" {% if module_settings.dashboard.chart_type is defined and module_settings.dashboard.chart_type == "bar" %}selected {% endif %}>{{"chart_bar"|trans}}</option>
								      <option value="doughnut" {% if module_settings.dashboard.chart_type is defined and module_settings.dashboard.chart_type == "doughnut" %}selected {% endif %}>{{"chart_doughnut"|trans}}</option>
								      <option value="list" {% if module_settings.dashboard.chart_type is defined and module_settings.dashboard.chart_type == "list" %}selected {% endif %}>{{"chart_list"|trans}}</option>
							      </select>	
						      </div>
						      
						      </li>
						      
						      
							</ul>
							
	                </div>
	                
	                 <div class="col s12 m12 center-align">
		                 <a class="btn red edit-group-btn" field-group="dashboard_view"><i class="material-icons left">edit</i>Edit</a>
						 <a class="btn green save-group-btn hide" field-group="dashboard_view" field-validation="dashboard_view">Save</a>
						 <a class="btn grey hide cancel-group-btn" field-group="dashboard_view"><i class="material-icons left">close</i>Cancel</a><br><br>
	                 </div>
