<div class="df_w">
	<div class="df{if !$_MODEL->existsUsers} hidden{/if}" data-presentation="slide-remove-results-layer">
		<div class="space space_15"></div>
		<div class="df_title"><span>Usuń wyniki quizu</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Usuwa wyniki quizu dla tego pytania"><div class="df_tooltip_mask"></div><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"></use></svg></div></div> 
		<div class="space space_10"></div>
		<div class="df_ct"><button type="button" data-presentation="slide-remove-results" class="btn btn-primary btn-outline full-width"><div class="icon"><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-trash"/></svg></div><span>Usuń wyniki</span></button></div>
		<div class="space space_15"></div> 
	</div>
	{assign var=element value=$_MODEL->getElement("name")}
	<div class="df">
		<div class="space space_15"></div>
		<div class="df_title"><span>Pytanie</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Maksymalna długość tekstu to 100 znaków"><div class="df_tooltip_mask"></div><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"></use></svg></div></div> 
		<div class="space space_10"></div>
		<div class="df_ct">
			<div class="input-group"><input type="text" name="name" value="{htmlspecialchars($element->getValue())}" class="form-control fn_data_max_length" data-max-length="100"><span class="input-group-addon input-group-addon-max-length">100</span></div>
		</div>
		<div class="space space_15"></div> 
	</div>
	{assign var=element value=$_MODEL->getElement("image")}
	{assign var=element_name value=$_MODEL->getElement("image_name")}
	<div class="df">
		<div class="space space_15"></div>
		<div class="df_title"><span>Obrazek do pytania</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Wstawia ukryty obrazek do slajdu"><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"/></svg></div></div> 
		<div class="space space_10"></div>
		<div class="df_ct">
			{include file="../../../helper/form/image.tpl" value=$element name=$element_name fieldFile="image_upload" fieldValue="image" fieldName="image_name"}
		</div>
		<div class="space space_15"></div> 
	</div>
	{assign var=element value=$_MODEL->getElement("description")}
	<div class="df">
		<div class="space space_15"></div>
		<div class="df_title"><span>Opis pytania</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Maksymalna długość tekstu to 200 znaków"><div class="df_tooltip_mask"></div><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"></use></svg></div></div> 
		<div class="space space_10"></div>
		<div class="df_ct">
			<div class="input-group input-group-textarea"><textarea name="description" class="form-control fn_data_max_length" rows="4" data-max-length="200">{htmlspecialchars($element->getValue())}</textarea></div>
		</div>
		<div class="space space_15"></div> 
	</div>
	{assign var=element value=$_MODEL->getElement("options")}
	<div class="df" data-presentation="elementDisabled">
		<div class="space space_15"></div>
		<div class="df_title"><span>Dostępne odpowiedzi</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Maksymalna ilość opcji to 10"><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"/></svg></div></div> 
		<div class="space space_5"></div>
		<div class="df_ct">
			{assign var=element_values value=$element->getValue()}
			{assign var=idx value=1}
			<div class="sortable_options">
				{foreach from=$element_values item=option}
					<div class="input-group"><span class="input-group-addon input-group-addon-move"><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-move"/></svg></span><input type="text" name="options[]" value="{$option.text}" class="form-control fn_data_max_length" data-max-length="40"><span class="input-group-addon input-group-addon-max-length">40</span><span class="input-group-addon input-group-addon-btn" data-presentation="slide-form-option-remove"><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-trash"/></svg></span></div>
					{$idx=$idx+1}
				{/foreach}
			</div>
			<div class="space space_5"></div>
			<div data-presentation="slide-form-option-add" data-type="with-max-length" class="btn btn-primary full-width"><div class="icon"><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-plus"/></svg></div><span>Dodaj opcję</span></div>
		</div>
		<div class="space space_15"></div> 
	</div>
	{assign var=element value=$_MODEL->getElement("min_label")}
	{assign var=element_value value=$_MODEL->getElement("min_value")}
	<div class="df">
		<div class="space space_15"></div>
		<div class="df_title"><span>Tytuł i wartość lewej etykiety</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Maksymalna długość tekstu to 40 znaków"><div class="df_tooltip_mask"></div><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"></use></svg></div></div> 
		<div class="space space_10"></div>
		<div class="df_ct">
			<div class="row">
				<div class="col-xs-8">
					<div class="input-group"><input type="text" name="min_label" value="{htmlspecialchars($element->getValue())}" class="form-control fn_data_max_length" data-max-length="40"><span class="input-group-addon input-group-addon-max-length">40</span></div>
				</div>
				<div class="col-xs-4">
					<input type="text" name="min_value" value="{htmlspecialchars($element_value->getValue())}" class="touchspin_1">
					<script>
						$(document).ready(function () {
							$(".touchspin_1").TouchSpin({
								verticalbuttons: true,
								buttondown_class: 'btn btn-white',
								buttonup_class: 'btn btn-white'
							});
						});
					</script>
				</div>
			</div>
		</div>
		<div class="space space_15"></div> 
	</div>
	{assign var=element value=$_MODEL->getElement("max_label")}
	{assign var=element_value value=$_MODEL->getElement("max_value")}
	<div class="df">
		<div class="space space_15"></div>
		<div class="df_title"><span>Tytuł i wartość prawej etykiety</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Maksymalna długość tekstu to 40 znaków"><div class="df_tooltip_mask"></div><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"></use></svg></div></div> 
		<div class="space space_10"></div>
		<div class="df_ct">
			<div class="row">
				<div class="col-xs-8">
					<div class="input-group"><input type="text" name="max_label" value="{htmlspecialchars($element->getValue())}" class="form-control fn_data_max_length" data-max-length="40"><span class="input-group-addon input-group-addon-max-length">40</span></div>
				</div>
				<div class="col-xs-4">
					<input type="text" name="max_value" value="{htmlspecialchars($element_value->getValue())}" class="touchspin_1">
					<script>
						$(document).ready(function(){
							$(".touchspin_1").TouchSpin({
								verticalbuttons: true,
								buttondown_class: 'btn btn-white',
								buttonup_class: 'btn btn-white'
							});
						});
					</script>
				</div>
			</div>
		</div>
		<div class="space space_15"></div> 
	</div>
	{assign var=element value=$_MODEL->getElement("show_avg")}
	<div class="df">
		<div class="space space_15"></div>
		<div class="df_title"><span>Wyświetl średnią wartość</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Dodaje linię wskazującą średnią wartość"><div class="df_tooltip_mask"></div><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"></use></svg></div></div> 
		<div class="space space_10"></div>
		<div class="df_ct">
			<div class="df_options">
				<div class="df_option">
					<input type="radio" name="show_avg" value="0" id="show_avg_0"{if $element->getValue() == "0"} checked{/if}>
					<label for="show_avg_0"><span>Nie</span></label>
				</div>
				<div class="df_option">
					<input type="radio" name="show_avg" value="1" id="show_avg_1"{if $element->getValue() == "1"} checked{/if}>
					<label for="show_avg_1"><span>Tak</span></label>
				</div>
			</div>
		</div>
		<div class="space space_15"></div> 
	</div>
</div>


{*
{assign var=element_name value=$_MODEL->getElement("name")}
<div class="form-group">
	<label>Twoje pytanie</label>
	<input type="text" name="name" value="{htmlspecialchars($element_name->getValue())}" class="form-control" placeholder="Twoje pytanie">
</div>
{assign var=element_name value=$_MODEL->getElement("description")}
<div class="form-group">
	<label>Opis</label>
	<textarea class="form-control" name="description" rows="3" placeholder="Twój opis">{htmlspecialchars($element_name->getValue())}</textarea>
</div>
{assign var=element_name value=$_MODEL->getElement("options")}
<div class="form-group">
	<label>Opcje</label>
	<div id="slide-option-template" class="d-none">
		<div class="slide-option input-group mt-1">
			<span class="input-group-addon"><div class="sort-handle"><i class="fa fa-sort"></i></div></span>
			<input type="text" name="options[-1]" value="" class="form-control" placeholder="Opcja [[Idx]]">
			<span class="input-group-addon"><button data-type="slide-option-remove" type="button" class="btn"><i class="fa fa-trash"></i></button></span>
		</div>
	</div>
	<div id="slide-options">
		{assign var=element_values value=$element_name->getValue()}
		{assign var=idx value=1}
		{foreach from=$element_values item=option}
			<div class="slide-option input-group mt-1">
				<span class="input-group-addon"><div class="sort-handle"><i class="fa fa-sort"></i></div></span>
				<input type="text" name="options[{$idx}]" value="{$option.text}" class="form-control" placeholder="Opcja {$idx}">
				<span class="input-group-addon"><button data-type="slide-option-remove" type="button" class="btn"><i class="fa fa-trash"></i></button></span>
			</div>
			{$idx=$idx+1}
		{/foreach}
	</div>
</div>
<div class="form-group">
	<button id="slide-add-option" type="button" class="btn btn-primary btn-sm btn-block">Dodaj opcję</button>
</div>
<div class="form-group row">
	<div class="col-sm-12">Wymiary</div>
</div>
{assign var=element_name value=$_MODEL->getElement("max_label")}
<div class="form-group">
	<label>Etykieta maksimum</label>
	<input type="text" name="max_label" value="{htmlspecialchars($element_name->getValue())}" class="form-control" placeholder="Twoje pytanie">
</div>
{assign var=element_name value=$_MODEL->getElement("max_value")}
<div class="form-group">
	<label>Maksymalna wartość</label>
	<input type="text" name="max_value" value="{htmlspecialchars($element_name->getValue())}" class="form-control" placeholder="Twoje pytanie">
</div>
{assign var=element_name value=$_MODEL->getElement("min_label")}
<div class="form-group">
	<label>Etykieta minimum</label>
	<input type="text" name="min_label" value="{htmlspecialchars($element_name->getValue())}" class="form-control" placeholder="Twoje pytanie">
</div>
{assign var=element_name value=$_MODEL->getElement("min_value")}
<div class="form-group">
	<label>Minimalna wartość</label>
	<input type="text" name="min_value" value="{htmlspecialchars($element_name->getValue())}" class="form-control" placeholder="Twoje pytanie">
</div>
{assign var=element_name value=$_MODEL->getElement("show_type")}
<fieldset class="form-group">
	<div class="row">
		<legend class="col-form-legend col-sm-12">Układ wyników</legend>
		<div class="col-sm-12">
			<div class="form-check">
				<label class="form-check-label"><input class="form-check-input" type="radio" name="show_type" value="1"{if $element_name->getValue()=="1" || $element_name->getValue()==""} checked{/if}> paski</label>
			</div>
			<div class="form-check">
				<label class="form-check-label"><input class="form-check-input" type="radio" name="show_type" value="2"{if $element_name->getValue()=="2"} checked{/if}> radarowy</label>
			</div>
		</div>
	</div>
</fieldset>
<div class="form-group row">
	<div class="col-sm-12">Dodatki</div>
	<div class="col-sm-12">
		{assign var=element_name value=$_MODEL->getElement("show_avg")}
		<div class="form-check">
			<label class="form-check-label"><input class="form-check-input" type="checkbox" name="show_avg" value="1"{if $element_name->getValue()=="1"} checked{/if}> Pokaż łączną średnią wszystkich odpowiedzi</label>
		</div>
	</div>
	<div class="col-sm-12">
		{assign var=element_name value=$_MODEL->getElement("hide_button")}
		<div class="form-check">
			<label class="form-check-label"><input class="form-check-input" type="checkbox" name="hide_button" value="1"{if $element_name->getValue()=="1"} checked{/if}> Ukryj przycisk "pomiń"</label>
		</div>
	</div>
</div>
*}