<commit_before>{# ---------------------------------- Search Form Types ---------------------------- #}
{% block asf_search_field_widget %}
{% spaceless %}
    {{ block('choice_widget') }}

	<script type="text/javascript">
	(function($, window, document) {
		$(function() {
			$('.select2-entity-ajax').each(function(){
				$(this).select2({
					ajax: {
						url: Routing.generate($(this).attr('data-route')),
						dataType: 'json',
						delay: 250,
						data: function(params) {
							return {
								q: params.term,
								page: params.page
							};
						},
						processResults: function(data, params) {
							params.page = params.page || 1;
							return {
								results: data.items,
								pagination: {
									more: (params.page * 30) > data.total_count
								}
							};
						},
						cache: true
					},
					escapeMarkup: function(markup){ return markup; },
					minimumInputLength: 3,
					templateResult: function(repo) {
						if (repo.loading) return repo.text;
						
						 var markup = "<div class='select2-result-repository clearfix'>" +
						 	"<div class='select2-result-repository__title'>" + repo.name + "</div>" +
						 	"</div>";
						 
						 return markup;
					},
					templateSelection: function(repo) {
						return repo.text;
					}
				});
			});
		});
	}(window.jQuery, window, document));
	</script>
{% endspaceless %}
{% endblock %}

{% block search_product_widget %}
{% spaceless %}
	{{ block('asf_search_field_widget') }}
{% endspaceless %}
{% endblock %}

{% block search_category_widget %}
{% spaceless %}
	{{ block('asf_search_field_widget') }}
{% endspaceless %}
{% endblock %}

{% block search_brand_widget %}
{% spaceless %}
	{{ block('asf_search_field_widget') }}
{% endspaceless %}
{% endblock %}

{# ---------------------------------- Product Form Type ---------------------------- #}
{% block _product_type_errors %}
{% spaceless %}
	{{ block('form_errors')  }}
{% endspaceless %}
{% endblock %}

{% block _product_widget %}
{% spaceless %}

	{{ form_errors(form) }}
	
	<div class="row">
		<div class="col-sm-4">
			{{ form_row(form.name) }}
		</div>
		{% if display_brand_field is defined and display_brand_field == true %}
		<div class="col-sm-4">
			{{ form_row(form.brand) }}
		</div>
		{% endif %}
	</div>
	<div class="row">
		<div class="col-sm-4">
			{{ form_row(form.weight) }}
		</div>
		<div class="col-sm-4">
			{{ form_row(form.capacity) }}
		</div>
		<div class="col-sm-4">
			{{ form_row(form.state) }}
		</div>
	</div>
	<div class="row">
		<div class="col-sm-12">
			{{ form_row(form.categories) }}
		</div>
	</div>
	
{% endspaceless %}
{% endblock %}

{# ---------------------------------- Brand Form Type ---------------------------- #}
{% block _brand_form_errors %}
{% spaceless %}
	{{ block('form_errors')  }}
{% endspaceless %}
{% endblock %}

{% block _product_brand_form_type_widget %}
{% spaceless %}

	{{ form_errors(form) }}
	
	<div class="row">
		<div class="col-sm-6">
			{{ form_row(form.name) }}
		</div>
		<div class="col-sm-6">
			{{ form_row(form.state) }}
		</div>
	</div>
	
{% endspaceless %}
{% endblock %}<commit_msg>Add in fields.html.twig template for Category Form<commit_after>{# ---------------------------------- Search Form Types ---------------------------- #}
{% block asf_search_field_widget %}
{% spaceless %}
    {{ block('choice_widget') }}

	<script type="text/javascript">
	(function($, window, document) {
		$(function() {
			$('.select2-entity-ajax').each(function(){
				$(this).select2({
					ajax: {
						url: Routing.generate($(this).attr('data-route')),
						dataType: 'json',
						delay: 250,
						data: function(params) {
							return {
								q: params.term,
								page: params.page
							};
						},
						processResults: function(data, params) {
							params.page = params.page || 1;
							return {
								results: data.items,
								pagination: {
									more: (params.page * 30) > data.total_count
								}
							};
						},
						cache: true
					},
					escapeMarkup: function(markup){ return markup; },
					minimumInputLength: 3,
					templateResult: function(repo) {
						if (repo.loading) return repo.text;
						
						 var markup = "<div class='select2-result-repository clearfix'>" +
						 	"<div class='select2-result-repository__title'>" + repo.name + "</div>" +
						 	"</div>";
						 
						 return markup;
					},
					templateSelection: function(repo) {
						return repo.text;
					}
				});
			});
		});
	}(window.jQuery, window, document));
	</script>
{% endspaceless %}
{% endblock %}

{% block search_product_widget %}
{% spaceless %}
	{{ block('asf_search_field_widget') }}
{% endspaceless %}
{% endblock %}

{% block search_category_widget %}
{% spaceless %}
	{{ block('asf_search_field_widget') }}
{% endspaceless %}
{% endblock %}

{% block search_brand_widget %}
{% spaceless %}
	{{ block('asf_search_field_widget') }}
{% endspaceless %}
{% endblock %}

{# ---------------------------------- Product Form Type ---------------------------- #}
{% block _product_type_errors %}
{% spaceless %}
	{{ block('form_errors')  }}
{% endspaceless %}
{% endblock %}

{% block _product_widget %}
{% spaceless %}

	{{ form_errors(form) }}
	
	<div class="row">
		<div class="col-sm-4">
			{{ form_row(form.name) }}
		</div>
		{% if display_brand_field is defined and display_brand_field == true %}
		<div class="col-sm-4">
			{{ form_row(form.brand) }}
		</div>
		{% endif %}
	</div>
	<div class="row">
		<div class="col-sm-4">
			{{ form_row(form.weight) }}
		</div>
		<div class="col-sm-4">
			{{ form_row(form.capacity) }}
		</div>
		<div class="col-sm-4">
			{{ form_row(form.state) }}
		</div>
	</div>
	<div class="row">
		<div class="col-sm-12">
			{{ form_row(form.categories) }}
		</div>
	</div>
	
{% endspaceless %}
{% endblock %}

{# ---------------------------------- Brand Form Type ---------------------------- #}
{% block _brand_form_errors %}
{% spaceless %}
	{{ block('form_errors')  }}
{% endspaceless %}
{% endblock %}

{% block _product_brand_form_type_widget %}
{% spaceless %}

	{{ form_errors(form) }}
	
	<div class="row">
		<div class="col-sm-6">
			{{ form_row(form.name) }}
		</div>
		<div class="col-sm-6">
			{{ form_row(form.state) }}
		</div>
	</div>
	
{% endspaceless %}
{% endblock %}

{# ---------------------------------- Category Form Type ---------------------------- #}
{% block _category_widget %}
{% spaceless %}

	{{ form_errors(form) }}
	
	<div class="row">
		<div class="col-sm-6">
			{{ form_row(form.name) }}
		</div>
		<div class="col-sm-6">
			{{ form_row(form.state) }}
		</div>
	</div>
	
	<div class="row">
		<div class="col-sm-12">
			<input type="submit" value="{{ 'Save'|trans }}" class="btn btn-primary" />
		</div>
	</div>
	
	
{% endspaceless %}
{% endblock %}
{'fraction_non_alphanumeric': 0.24800708591674048, 'fraction_numerical': 0.006495423678771774, 'mean_word_length': 2.3572844400396433, 'pattern_counts': {'":': 0, '<': 74, '<?xml version=': 0, '>': 76, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '508378', 'n_tokens_mistral': 2925, 'n_tokens_neox': 2223, 'n_words': 398}