<div>

    <form class="DigitalSignage4_form {$myForm->getClass()}" method="post" action="#">
		{$watermark_nonce}
        {if $myForm->getHtml() != ""}

            {$myForm->getHtml()}

        {else}
			{if $myForm->getClass() == "placementForm"}
			<div id="placement_6_click" onclick="checkBoxClick()" class="image_emplacement_placement_6_click">
				
                <script>
					
					function checkBoxClick(){
						
						document.getElementById("placement_6").checked = !document.getElementById("placement_6").checked;
						
						
						
						if (document.getElementById("placement_6").checked) {
							document.getElementById("placement_6_click").classList.add('image_emplacement_placement_6_click_checked');
							document.getElementById("placement_6_click").classList.remove('image_emplacement_placement_6_click');
						} else {
							document.getElementById("placement_6_click").classList.add('image_emplacement_placement_6_click');
							document.getElementById("placement_6_click").classList.remove('image_emplacement_placement_6_click_checked');
						}
						
					}
					
					function placement_6Click(){
						
						if (document.getElementById("placement_6").checked) {
							document.getElementById("placement_6_click").classList.add('image_emplacement_placement_6_click_checked');
							document.getElementById("placement_6_click").classList.remove('image_emplacement_placement_6_click');
						} else {
							document.getElementById("placement_6_click").classList.add('image_emplacement_placement_6_click');
							document.getElementById("placement_6_click").classList.remove('image_emplacement_placement_6_click_checked');
						}
						
					}
					
					function affiche_warning_placement(id_placement){
						//tester si il y a un placement 2 a 6 coché
						var isChecked = ((document.getElementById("placement_1").checked) || (document.getElementById("placement_2").checked) ||
						(document.getElementById("placement_3").checked) ||
						(document.getElementById("placement_4").checked) ||
						(document.getElementById("placement_5").checked));
						
						if (isChecked){
							document.getElementById("message_placements_alerte").style.display = 'block';
						} else {
							document.getElementById("message_placements_alerte").style.display = 'none';
						}
						
					}

					
				</script>
				
				
            </div>
			
			
			{/if}
			
			

            <section>
				
				

                {foreach from=$myForm->getChamps()  key=m item=champ}

                    {if $champ->getType() == "checkbox"}
                        <div>
                            <input id="{$champ->getId()}" type="{$champ->getType()}"
                                   name="{$champ->getName()}" {if $champ->getId()=="placement_6"} onclick="placement_6Click()" {else} onclick="affiche_warning_placement()"{/if} {if $champ->getChecked()} checked {/if} />
                            <label for="{$champ->getId()}">{$champ->getLabel()}</label>
                        </div>
						{if $champ->getId()=="placement_6"} <script>placement_6Click();</script>" {/if}
                    {elseif $champ->getType() == "radio"}
                        <section>
                            <input id="{$champ->getId()}" type="{$champ->getType()}"
                                   name="{$champ->getName()}" {if $champ->getChecked()} checked {/if}
                                   value="{$champ->getValue()}"/>
                            <label style="margin-bottom: 0;" for="{$champ->getId()}">{$champ->getLabel()}</label>
                        </section>
                    {else}
                        <label for="{$champ->getId()}">{$champ->getLabel()} : </label> <br>
                        <input style="width: 45ch" id="{$champ->getId()}" type="{$champ->getType()}" name="{$champ->getName()}"
                               value="{$champ->getValue()}"/> <br>
                    {/if}



                {/foreach}

                {foreach from=$myForm->getExtraLink()  key=m item=link}
                  <br>  <a style="width: max-content" {if $link.blank }target="_blank"{/if}
                       href="{$link.url}">{$link.label}</a>
                {/foreach}

                {foreach from=$myForm->getExtraText()  key=m item=link}
                    <p>
                        {$link}
                    </p>
                {/foreach}

            </section>
			
			

        {/if}
		
		

        {if $myForm->getValidLabel() != ""}
			
			
		
            <input class="btn DigitalSignage4_button btn-primary" type="submit" name="{$myForm->getName()}"
                   value="{$myForm->getValidLabel()}"/>
			
        {/if}

    </form>

</div>