<commit_before>{% extends 'base.html' %}
{% load static %}

{% block title %}- Add Event{% endblock title %}

{% block custom_css %}
	<link rel="stylesheet" type="text/css" href="{% static "css/jquery.datetimepicker.css" %}" />
	<link rel="stylesheet" type="text/css" href="{% static "css/jasny-bootstrap.min.css" %}" />
{% endblock %}


{% block content %}
	<div class="container">
		<div class="clearfix">
			<h1 class="pull-left">{% if editing %}Edit{% else %}Add {% endif %} your #codeEU event</h1>

			<div class="how-to">
				<a href="{% url 'web.guide' %}" target="_blank"
				   class="btn btn-sm pull-right">How to organize your own event?
				</a>
			</div>

		</div>


		<form enctype="multipart/form-data" method="post" id="event" role="form">{% csrf_token %}
			<div class="clearfix">
				{% for field in form %}

					{% if field.name == 'geoposition' %}
						<span style="display:none">{{ field.label_tag }}{{ field }}</span>
					{% elif field.name == 'location' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}<i class="fa fa-asterisk"></i>{% endif %}
								{{ field.label }}
							</label>
							{{ field }}
							<i class="fa fa-map-marker"></i>
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
						<div id="view-event-map-wrapper" class="col-md-6 pull-right">
							<div id="view-event-map">Loading map ...</div>
						</div>
					{% elif field.name == 'country' %}
						<span class="hidden">{{ field }}</span>
					{% elif field.name == 'start_date' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}
							</label>
							{{ field }}
							<i class="fa fa-calendar"></i>
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% elif field.name == 'end_date' %}
						<div class="clearfix">
							<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
								<label class="control-label" for="{{ field.auto_id }}">
									{% if field.field.required %}
										<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
										   title="This data is required"></i>
									{% endif %}
									{{ field.label }}</label>
								{{ field }}
								<i class="fa fa-calendar"></i>
								<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
							</div>
						</div>
					
					{% elif field.name == 'event_url' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<i class="fa fa-globe"></i>
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>

					{% elif field.name == 'contact_person' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<i class="fa fa-envelope"></i>
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% elif field.name == 'audience' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% elif field.name == 'theme' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% elif field.name == 'tags' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<i class="fa fa-tags"></i>
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% elif field.name == 'picture' %}
						<div class="pull-right col-md-6">
							<label>{{ field.label }}</label>

							<div class="fileinput {% if picture_url %}fileinput-exists{% else %}fileinput-new{% endif %} "
							     data-provides="fileinput">
								<div class="fileinput-new">
									<img data-src="holder.js/100%x100%/text:Your image..." alt="..." style="max-height: 204px" >
								</div>
								<div class="fileinput-preview fileinput-exists">
									<img src="{{ MEDIA_URL }}{{ picture_url }}" alt="{{ field.name }} Image" style="max-height: 204px" />
								</div>
								<div>
								<span class="btn btn-sm btn-file">
									<span class="fileinput-new">Select image</span>
									<span class="fileinput-exists">Change</span>
									<input type="file" name="{{ field.name }}"></span>
									<a href="#" class="btn btn-sm fileinput-exists" data-dismiss="fileinput">Remove</a>
								</div>
							</div>
						</div>
					{% else %}
						<div class="form-group {% if field.errors %}has-error{% endif %}">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% endif %}

				{% endfor %}
			</div>
			<div class="btn btn-primary btn-directional fa-plus-circle btn-lg submit-button-wrapper">
				<input type="submit" value="{% if editing %}Save{% else %}Add{% endif %} event" />
			</div>

		</form>

		<div class="event-footnote">
			Note: Events will be checked by one of our
			<a href="{% url 'web.ambassadors' %}" target="_blank">Local Ambassadors</a>
			before appearing on the map.
		</div>
	</div>
{% endblock content %}

{% block custom_js %}
	<script type="text/javascript" src="{% static "lib/bootstrap-sass/javascripts/bootstrap/tooltip.js" %}"></script>
	<script type="text/javascript" src="{% static "js/DateTimePicker.js" %}"></script>
	<script type="text/javascript" src="{% static "js/jquery.datetimepicker.js" %}"></script>
	<script type="text/javascript" src="{% static "js/jasny-bootstrap.min.js" %}"></script>
	<script type="text/javascript" src="{% static "js/holder.js" %}"></script>

	<script>
		$('#id_datepicker_start').datetimepicker({
			format: 'Y-m-d H:i',
			dayOfWeekStart: 1,
			lang: 'en'
		});
		$('#id_datepicker_end').datetimepicker({
			format: 'Y-m-d H:i',
			dayOfWeekStart: 1,
			lang: 'en'
		});
	</script>

	<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA3XIqeAZB_JDD7qSLBeqMRp0rvD2tcCrU&sensor=false&libraries=places"></script>

	<script>
		var placeSearch, autocomplete;
		var map;<commit_msg>Removed unused script<commit_after>{% extends 'base.html' %}
{% load static %}

{% block title %}- Add Event{% endblock title %}

{% block custom_css %}
	<link rel="stylesheet" type="text/css" href="{% static "css/jquery.datetimepicker.css" %}" />
	<link rel="stylesheet" type="text/css" href="{% static "css/jasny-bootstrap.min.css" %}" />
{% endblock %}


{% block content %}
	<div class="container">
		<div class="clearfix">
			<h1 class="pull-left">{% if editing %}Edit{% else %}Add {% endif %} your #codeEU event</h1>

			<div class="how-to">
				<a href="{% url 'web.guide' %}" target="_blank"
				   class="btn btn-sm pull-right">How to organize your own event?
				</a>
			</div>

		</div>


		<form enctype="multipart/form-data" method="post" id="event" role="form">{% csrf_token %}
			<div class="clearfix">
				{% for field in form %}

					{% if field.name == 'geoposition' %}
						<span style="display:none">{{ field.label_tag }}{{ field }}</span>
					{% elif field.name == 'location' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}<i class="fa fa-asterisk"></i>{% endif %}
								{{ field.label }}
							</label>
							{{ field }}
							<i class="fa fa-map-marker"></i>
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
						<div id="view-event-map-wrapper" class="col-md-6 pull-right">
							<div id="view-event-map">Loading map ...</div>
						</div>
					{% elif field.name == 'country' %}
						<span class="hidden">{{ field }}</span>
					{% elif field.name == 'start_date' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}
							</label>
							{{ field }}
							<i class="fa fa-calendar"></i>
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% elif field.name == 'end_date' %}
						<div class="clearfix">
							<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
								<label class="control-label" for="{{ field.auto_id }}">
									{% if field.field.required %}
										<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
										   title="This data is required"></i>
									{% endif %}
									{{ field.label }}</label>
								{{ field }}
								<i class="fa fa-calendar"></i>
								<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
							</div>
						</div>
					
					{% elif field.name == 'event_url' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<i class="fa fa-globe"></i>
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>

					{% elif field.name == 'contact_person' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<i class="fa fa-envelope"></i>
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% elif field.name == 'audience' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% elif field.name == 'theme' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% elif field.name == 'tags' %}
						<div class="form-group {% if field.errors %}has-error{% endif %} col-md-6 first input-with-icon">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<i class="fa fa-tags"></i>
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% elif field.name == 'picture' %}
						<div class="pull-right col-md-6">
							<label>{{ field.label }}</label>

							<div class="fileinput {% if picture_url %}fileinput-exists{% else %}fileinput-new{% endif %} "
							     data-provides="fileinput">
								<div class="fileinput-new">
									<img data-src="holder.js/100%x100%/text:Your image..." alt="..." style="max-height: 204px" >
								</div>
								<div class="fileinput-preview fileinput-exists">
									<img src="{{ MEDIA_URL }}{{ picture_url }}" alt="{{ field.name }} Image" style="max-height: 204px" />
								</div>
								<div>
								<span class="btn btn-sm btn-file">
									<span class="fileinput-new">Select image</span>
									<span class="fileinput-exists">Change</span>
									<input type="file" name="{{ field.name }}"></span>
									<a href="#" class="btn btn-sm fileinput-exists" data-dismiss="fileinput">Remove</a>
								</div>
							</div>
						</div>
					{% else %}
						<div class="form-group {% if field.errors %}has-error{% endif %}">
							<label class="control-label" for="{{ field.auto_id }}">
								{% if field.field.required %}
									<i class="fa fa-asterisk" data-toggle="tooltip" data-placement="left"
									   title="This data is required"></i>
								{% endif %}
								{{ field.label }}</label>
							{{ field }}
							<span class="help-block {% if field.errors %}{% endif %}">{{ field.errors }}</span>
						</div>
					{% endif %}

				{% endfor %}
			</div>
			<div class="btn btn-primary btn-directional fa-plus-circle btn-lg submit-button-wrapper">
				<input type="submit" value="{% if editing %}Save{% else %}Add{% endif %} event" />
			</div>

		</form>

		<div class="event-footnote">
			Note: Events will be checked by one of our
			<a href="{% url 'web.ambassadors' %}" target="_blank">Local Ambassadors</a>
			before appearing on the map.
		</div>
	</div>
{% endblock content %}

{% block custom_js %}
	<script type="text/javascript" src="{% static "lib/bootstrap-sass/javascripts/bootstrap/tooltip.js" %}"></script>
	<script type="text/javascript" src="{% static "js/jquery.datetimepicker.js" %}"></script>
	<script type="text/javascript" src="{% static "js/jasny-bootstrap.min.js" %}"></script>
	<script type="text/javascript" src="{% static "js/holder.js" %}"></script>

	<script>
		$('#id_datepicker_start').datetimepicker({
			format: 'Y-m-d H:i',
			dayOfWeekStart: 1,
			lang: 'en'
		});
		$('#id_datepicker_end').datetimepicker({
			format: 'Y-m-d H:i',
			dayOfWeekStart: 1,
			lang: 'en'
		});
	</script>

	<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA3XIqeAZB_JDD7qSLBeqMRp0rvD2tcCrU&sensor=false&libraries=places"></script>

	<script>
		var placeSearch, autocomplete;
		var map;
{'fraction_non_alphanumeric': 0.2055373064289066, 'fraction_numerical': 0.0035194744251525107, 'mean_word_length': 2.693457538994801, 'pattern_counts': {'":': 0, '<': 311, '<?xml version=': 0, '>': 311, 'https://': 2, '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': '2213239', 'n_tokens_mistral': 7666, 'n_tokens_neox': 5358, 'n_words': 1243}