 <div class="row">
		                
		                
		                {% set pcfields = 0 %}
							{% for field in module_params['fields'] %}
								{% if field.name!="id" and (field.type.name == "double" or field.type.name == "currency")  %}	
								   {% set pcfields = pcfields+1 %}
								{% endif %}	
							{% endfor %}
		                
		                {% if pcfields==0 %}
						     <div class="col s12 m12">
						      <div class="card-panel red">
						          <span class="white-text">
						          This module has no numeric/currency fields so the payment feature could not be used
						          </span>
						        </div>
						     </div>
						      {% else %}
						      
		                <div class="col s12 m6">
								<ul class="collection">
							 
						      
						      <li class="collection-item" field-name="enabled" field-group="payment_settings">
						      		
						      <b>Enable Payment: </b><br>
						      <div class="details_content">
						      <span class=" flow-text">{% if module_settings.payment.enabled is defined and module_settings.payment.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.payment.enabled is defined and module_settings.payment.enabled %}checked="checked" value="1" {% endif %} param-name="enabled">
									    <span class="lever"></span> On
									    </label>
									  </div>
						      </div>
						      </li>
						      
						      <li class="collection-item" field-name="currency_field" field-group="payment_settings">
						      <b>Payment Currency Field: </b><br>
						      <div class="details_content">
						      <span class=" flow-text">
						      {% if module_settings.payment.currency_field is defined and field_labels[module_settings.payment.currency_field] is defined %}
						      	{% if field_labels[module_settings.payment.currency_field] is defined %}
						      		{{field_labels[module_settings.payment.currency_field]|trans}}
							  	{% else %}
						      		{{module_settings.payment.currency_field|trans}}
							    {% endif %}
						      {% endif %}
						      </span>
						      </div>
						      
						      <div class="edit_content hide">
						      <select name="settings[currency_field]" class=""  param-name="currency_field" required>
								      {% for field in module_params['fields'] %}
								      	
								      	{% if field.type.name=="reference" and "Currency" in field.type.refersTo %}
								      		<option value="{{field.name}}" {% if module_settings.payment.currency_field is defined and field.name == module_settings.payment.currency_field %}selected {% endif %}>{{field.label|trans}}</option>
								      	{% endif %}	
								      {% endfor %}
								      
								      <option value="default" {% if module_settings.payment.currency_field is defined and  module_settings.payment.currency_field=="default" %}selected {% endif %}>Default</option>

							      </select>	
						      </div>
						    
						      </li>
						      
						      
							    </ul>
						</div>
						
						<div class="col s12 m6">
								<ul class="collection">
							      
							      <li class="collection-item" field-name="amount_field" field-group="payment_settings">
						      <b>Payment Amount Field: </b><br>
						      <div class="details_content">
						      <span class=" flow-text">
						      {% if module_settings.payment.amount_field is defined %}
						      	{{field_labels[module_settings.payment.amount_field]|trans}}
						      {% endif %}
						      </span>
						      </div>
						      
						      <div class="edit_content hide">
						      <select name="settings[amount_field]" class="" param-name="amount_field" >
							  
								      {% for field in module_params['fields'] %}
								      	{% if field.name!="id" and (field.type.name == "double" or field.type.name == "currency")  %}
								      		<option value="{{field.name}}" {% if module_settings.payment.amount_field is defined and field.name == module_settings.payment.amount_field %}selected {% endif %}>{{field.label|trans}}</option>
								      	{% endif %}	
								      {% endfor %}
							      </select>	
						      </div>
						      
						      
						      
						      </li>
							    </ul>
						</div>
						
						<div class="col s12 m12">
								<ul class="collection">		      
							    
							    {% include 'themes/default/config/module/condition-field.html' with { is_group: "true", condition_rows:  module_settings.payment.show_conditions, f_label: "Show on Conditions", f_name: "show_conditions", f_group: "payment_settings"} %}   
							  	      
							      {% include 'themes/default/config/module/update-field.html' with { is_group: "true", condition_rows:   module_settings.payment.update_success, f_label: "Update Fields On Success Payment", f_name: "update_success", f_group: "payment_settings"} %} 
						      {% include 'themes/default/config/module/update-field.html' with { is_group: "true", condition_rows:   module_settings.payment.update_cancel, f_label: "Update Fields On Cancel Payment", f_name: "update_cancel", f_group: "payment_settings"} %} 
						      
						      
							    </ul>
						</div>
						
						<div class="col s12 m12 center-align">
		                <a class="btn red edit-group-btn" field-group="payment_settings"><i class="material-icons left">edit</i>Edit</a>
			            <a class="btn green save-group-btn hide" field-group="payment_settings">Save</a>
			            <a class="btn grey hide cancel-group-btn" field-group="payment_settings"><i class="material-icons left">close</i>Cancel</a><br><br>
	                </div>
						
						{% endif %}
						
 </div>