<li class="collection-item" field-name="{{f_name}}" field-type="conditions" {% if f_id is defined %}id="{{f_id}}"{% endif %} {% if f_group is defined %}field-group="{{f_group}}"{% endif %} {% if f_validation is defined %}field-validation="{{f_validation}}"{% endif %}>
{% if is_group=="false" %}
						      <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>	{% endif %}		
						      
						      <b>{{f_label}}: </b><br>
						      <div class="details_content"><span class=" flow-text">
							  	{% for condition in condition_rows %}
							  		- <b>{{field_labels[condition.field]|trans}}</b> {{condition.condition|trans}} {% if condition.condition != "is_empty" and condition.condition != "not_empty" %}<b>{% if condition.field == "assigned_user_id" and crm_users_ids[condition.value] is defined %}{{crm_users_ids[condition.value].user_name}}{% else %}{% if field_labels[condition.value] is defined %}{{field_labels[condition.value]|trans}}{% else %}{% if condition.value_label is defined %}{{condition.value_label|trans}}{% else %}{{condition.value|trans}}{% endif %}{% endif %}{% endif %}</b>{% endif %} <br>
							  	{% endfor %}
							  </span>
						      </div>
						      <div class="edit_content hide">
							      <div class="row">
								  <div class="col s12"><br></div>
							      </div>
							      
							      <div class="condition-rows-visible">
								      {% for condition in condition_rows %}
								      <div class="row condition-row" condition-count="{{loop.index}}">
									      
										  <div class="col s4">
									      <select class="vt_field_picker browser-default" vt-field="condition_fields" condition-count="{{loop.index}}" name="settings"  config-val="field">
										      {% for field in module_params["fields"] %}
										      {% if field.name!="id" %}
										      <option value="{{field.name}}" field-type="{{field.type.name}}" field-info="{{field|json_encode()}}" {% if field.name==condition.field %}selected{% endif %}>{{field.label|trans}}</option>						
										      {% endif %}
										      {% if field.name=="id" and (module_params.route.module_name=="Contacts" or module_params.route.module_name=="Accounts") %}
										      <option value="{{field.name}}" field-type="{{field.type.name}}" field-info="{{field|json_encode()}}" {% if field.name==condition.field %}selected{% endif %}>{{field_labels[field.name]|trans}}</option>						
										      {% endif %}					
										      {% endfor %}
									      </select>
										  </div>
										  
										  <div class="col s3 center-align">
											<select class="vt_rule_contition browser-default" vt-field="condition_fields" name="settings" config-val="comparator" saved-value="{{condition.condition}}" >
											  <option value="comparator" selected disabled>Comparator</option>
										    </select>										  	  
										  </div>
										  
										  <div class="col s3  center-align vt_logged_values_options" {% if condition.condition == "is_empty" or condition.condition == "not_empty" %}style="display: none"{% endif %}>
											<div class="vt_field_target" vt-field="condition_fields" {% if condition.value starts with 'logged_contact' %} style="display: none"{% else %} style="display: block"{% endif %}>
												<input type="hidden" saved-value="{{condition.value}}" saved-value-label="{% if condition.value_label is defined %}{{condition.value_label}}{% else %}{{condition.value_label}}{% endif %}">
											</div>
											<div  class="vt_field_target_logged" vt-field="condition_fields" {% if condition.value starts with 'logged_contact' %} style="display: block"{% else %} style="display: none"{% endif %}>
												<select class="browser-default">
													{% for field in contact_fields %}
														<option value="{{field.name}}" {% if condition.value == field.name %}selected{% endif %} saved-value="{{condition.value}}" field-type="{{field.type.name}}" field-info="{{field|json_encode()}}" >{{field.label|trans}}</option>		
													{% endfor %}
												</select>
											</div>	    
										  </div>
										  <div class='col s1 center-align vt_logged_values_buttons' {% if condition.condition == "is_empty" or condition.condition == "not_empty" %}style="display: none"{% endif %}>
											  <a class='btn-floating blue vt_logged_values_picker' {% if condition.value starts with 'logged_contact' %} style="display: none"{% else %} style="display: block"{% endif %}><i class='material-icons small brown-text'>person</i></a>
											  <a class='btn-floating yellow vt_values_picker' {% if condition.value starts with 'logged_contact' %} style="display: block"{% else %} style="display: none"{% endif %}><i class='material-icons small brown-text'>assignment</i></a>
										  </div>
										  
										  <div class="col s1 right-align">
										  	<a class="btn-floating red delete-row"><i class="material-icons">close</i></a>											  </div>
										  								  
								      </div>
								      {% endfor %}
							      </div>
							      
							      <div class="conditions-row-empty hide">
									  <div class="row condition-row" condition-count="">
									      
										  <div class="col s4">
									      <select class="vt_field_picker browser-default" vt-field="condition_fields" condition-count="">
										      
										      {% for field in module_params["fields"] %}
										      {% if field.name!="id" %}
										      <option value="{{field.name}}" field-type="{{field.type.name}}" field-info="{{field|json_encode()}}" >{{field.label|trans}}</option>						
										      {% endif %}
										      {% if field.name=="id" and (module_params.route.module_name=="Contacts" or module_params.route.module_name=="Accounts") %}
										      <option value="{{field.name}}" field-type="{{field.type.name}}" field-info="{{field|json_encode()}}" >{{field_labels[field.name]|trans}}</option>						
										      {% endif %}	
										      				
										      {% endfor %}
									      </select>
										  </div>
										  
										  <div class="col s3 center-align">
											  	  <select class="vt_rule_contition  browser-default" vt-field="condition_fields">
											      	<option value="comparator" selected disabled>Comparator</option>
										      	  </select>										  	  
										  </div>
										  
										  <div class="col s3  center-align vt_logged_values_options">
											<div  class="vt_field_target" vt-field="condition_fields">
												<input type="text" disabled placeholder="Value">
											</div>
											<div  class="vt_field_target_logged" vt-field="condition_fields" style="display: none">
												<select class="browser-default">
													{% for field in contact_fields %}
														<option value="{{field.name}}" field-type="{{field.type.name}}" field-info="{{field|json_encode()}}" >{{field.label|trans}}</option>		
													{% endfor %}
												</select>
											</div>	    
										  </div>
										  <div class='col s1 center-align vt_logged_values_buttons'>
											  <a class='btn-floating blue vt_logged_values_picker'><i class='material-icons small brown-text'>person</i></a>
											  <a class='btn-floating yellow vt_values_picker' style='display:none'><i class='material-icons small brown-text'>assignment</i></a>
										  </div>
										  
										  <div class="col s1 right-align">
										  <a class="btn-floating red delete-row"><i class="material-icons">close</i></a>			
										  </div>							  
								      </div>
							      </div>
							      
							      
							      
							      
							      <div class="col s12 center-align">				      
								      <a class="btn green add-condition-row">Add New</a>
								      <br><br>
							      </div>
							      <hr>
							      {% if is_group=="false" %}
									  <a class="btn grey cancel-edit-btn">Cancel</a>
									  <a class="btn green save-edit-btn">Save</a>
								  {% endif %}
						      </div>
						       
							  </li>