{* Main *}
<div style="text-align: left;">

    {if $showNews}
        <h2>{$indexNews->GetTitle()}</h2><p>{$indexNews->GetDescription()}</p>
        <a href="{url label=$objNewsElement->GetUrlLabel()}" >{$objNewsElement->GetName()}</a>
    {else}
        <h2>{$indexNews->GetName()}</h2><p>{$indexNews->GetDescription()}</p>
    {/if}
    <div class="formBox">
        <div class="trescAdd">
            <div class="cb"></div>
            <div class="formContainer">
                <div id="info_container">
                    {if isset($info)}
                        <div class="{if $error && $error!='info'}error{else}info{/if}">{$info}</div>
                    {/if}
                </div>

                <form method="post" action="{url label=current}" id="sendContactForm" class="contactForm">
                    <input name="send" type="hidden" value="true" />
                    <div class="entry">
                         <div><h5 align="center">{translate word='Dane uczestnika (służbowe)'}:</h5></div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='Imię'}:</div>
                        <div class="value">{formField  name="name" type="text" errorClass="warning"}</div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='Nazwisko'}:</div>
                        <div class="value">{formField  name="surname" type="text" errorClass="warning"}</div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='Tytuł/stop. naukowy'}:</div>
                        <div class="value">{formField  name="degree" type="text" errorClass="warning"}</div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='Stanowisko'}:</div>
                        <div class="value">{formField  name="position" type="text" errorClass="warning"}</div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='Telefon'}:</div>
                        <div class="value">{formField  name="phone" type="text" errorClass="warning"}</div>
                    </div>                                        
                    <div class="entry">
                        <div class="label">{translate word='Fax'}:</div>
                        <div class="value">{formField  name="fax" type="text" errorClass="warning"}</div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='email'}:</div>
                        <div class="value">{formField  name="email" type="text" errorClass="warning"}</div>
                    </div>
                    <div class="cb"></div>
                    <div class="entry">
                        <div><h5 align="center">{translate word='Miejsce pracy'}:</h5></div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='Instytucja'}:</div>
                        <div class="value">{formField  name="institution" type="text" errorClass="warning"}</div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='Ulica i numer'}:</div>
                        <div class="value">{formField  name="address" type="text" errorClass="warning"}</div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='Kod pocztowy'}:</div>
                        <div class="value">{formField  name="post_code" type="text" errorClass="warning"}</div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='Miejscowość'}:</div>
                        <div class="value">{formField  name="city" type="text" errorClass="warning"}</div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='NIP Instytucji'}:</div>
                        <div class="value">{formField  name="nip" type="text" errorClass="warning"}</div>
                    </div>  
                    <div class="cb"></div>
                    <div class="entry">
                        <div class="label">Zgłaszam referat</div>
                        <div class="value" title="s">

                            <label class="control control--radio">Tak
                              <input type="radio" name="referat" class="referat" value="1" />
                                <div class="control__indicator"></div>
                            </label>
                            <label class="control control--radio">Nie
                                <input type="radio" name="referat" class="referat" value="2" />
                                <div class="control__indicator"></div>
                            </label>
                        </div>
                    </div>	
                    <div class="cb"></div>
                    <div class="entry">
                        <div class="label">Zgłaszam poster</div>
                        <div class="value" title="s">

                            <label class="control control--radio">Tak
                                <input type="radio" name="poster" value="1" />
                                <div class="control__indicator"></div>
                            </label>
                            <label class="control control--radio">Nie
                                <input type="radio" name="poster" value="2" />
                                <div class="control__indicator"></div>
                            </label>

                        </div>
                    </div>			           

                    <div class="cb"></div>
                    <div class="entry">
                        <div class="label">{translate word='Tytuł referatu/posteru'}:</div>
                        <div class="value">{formField  name="message" type="text" errorClass="warning"}</div>
                    </div>  
                    <div class="cb"></div>
                    <div class="entry">
                      <div class="label">{translate word='Streszczenie referatu/posteru'}:</br><sub>(maksymalnie 1200 znaków)</sub></div>
                        <div class="value">{formField  name="message_long" type="textarea" maxlength="1200"}</div>
                    </div>  
                    <div class="cb"></div>
                    <div class="entry">
                        <div class="label">{translate word='Autor referatu/posteru'}:</div>
                        <div class="value">{formField  name="autor" type="text" errorClass="warning"}</div>
                    </div>  
                    <div class="cb">&nbsp;</div>
                    <div class="entry">
                        <label class="control control--checkbox" title="{translate word='agree_title'}">
                            <input type="checkbox" name="agree1" id="agree1" data-theme="d" >{translate word='agree1'}
                            <div class="control__indicator"></div>
                        </label> 
                        <label class="control control--checkbox" title="{translate word='agree_title'}">
                            <input type="checkbox" name="agree2" id="agree2" data-theme="d" >{translate word='agree2'}
                            <div class="control__indicator"></div>
                        </label> 		            
                        <div class="cb"></div>
                    </div>
                    <div class="entry">
                        <div><h5 align="center">{translate word='Udział w konrefencji'}:</h5></div>
                        
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='Opłata'}: </div>
                        <div class="value">
                          <div class="confOption"> 

                            <label class="control control--radio">Opłata zwykła (płatność po 14.10.2022)
                                <input type="radio" name="conference_fee_disc" checked="true"  id="conference_fee_norm" class="conference_fee_disc" value="2" onclick="calculatePrice();"/>
                                <div class="control__indicator"></div>
                            </label>
                          </div>
                        </div>
                    </div>
                    <div class="entry">
                        <div class="label">{translate word='Cała konferencja'}: </div>
                        <div class="value">
                            <div class="configContainer">
                                <div class="confOption"> 
                                    <label class="control control--radio">&nbsp;
                                        <input type="radio" name="conference_fee" checked="true" id="conference_fee" class="conference_fee" value="1" onclick="$('#conference_1').show();
                                                $('#conference_2').hide(); calculatePrice();" />
                                        <div class="control__indicator"></div>
                                    </label>
                                    <script>
                                        {literal}
                                          
                                          $(function () {  
                                            $('#conference_1').show();
                                            calculatePrice();
                                          });
                                          
                                          function calculatePrice() {
                                             if ($("#conference_fee_disc").is(':checked')) {
                                                 //alert('disc');
                                                var price = {/literal}{$arrayPricePromJson}{literal};
                                                var priceVat = {/literal}{$arrayPricePromVatJson}{literal};
                                              } 
                                              if ($("#conference_fee_norm").is(':checked')) {
                                                //alert('normal');
                                                var price = {/literal}{$arrayPriceJson}{literal};
                                                var priceVat = {/literal}{$arrayPriceVatJson}{literal};
                                              }  
                                              
                                              
                                                    var sumPrice = 0;
                                                    var sumPriceVat = 0;
                                                    var price_info = '';
                                                    if ($("#conference_fee").is(':checked')) {
                                                        sumPrice = price[1];
                                                        sumPriceVat = priceVat[1];
                                                        price_info += 'cała conf ';
                                                    }                                                                                                       
                                                    if ($("#price_plus_room").is(':checked')) {
                                                       sumPrice = sumPrice + price[2];
                                                       sumPriceVat = sumPriceVat + priceVat[2];
                                                       price_info += 'pokój jedynka ';
                                                    }
                                                    if ($("#price_plus_person").is(':checked')) {
                                                       sumPrice = sumPrice + price[3];
                                                       sumPriceVat = sumPriceVat + priceVat[3];
                                                       price_info += 'osoba dodatkoawa ';
                                                    }
                                                    if ($("#price_plus_ang").is(':checked')) {
                                                        sumPrice = sumPrice + price[4];
                                                        sumPriceVat = sumPriceVat + priceVat[4];
                                                        price_info += 'ang ';
                                                    }
                                                    if ($("#conference_fee_one").is(':checked')) {
                                                       sumPrice = price[5];
                                                       sumPriceVat = priceVat[5];
                                                       price_info = 'jeden dzień ';
                                                     }
                                                    $("p.price_full_fee").html(sumPrice + ',00 PLN netto ' + '(' + sumPriceVat + ',00 PLN brutto)');
                                                    //alert(sumPrice);
                                                    $("p.price_info").html(price_info);
                                                    window.sumPrice = sumPrice;
                                                    window.sumPriceVat = sumPriceVat;
                                              
                                            
                                          }
                                            $(function () {  
                                                $(".conference_fee").on('change', function () { 
                                                  if ($("#conference_fee_one").is(':checked')) {                                                        
                                                        $("#price_plus_room").prop("checked", false);
                                                        $("#price_plus_ang").prop("checked", false);
                                                        $("#price_plus_person").prop("checked", false);                                                        
                                                    }                                                    
                                                });
                                            });
                                        {/literal}
                                    </script>
                                    <div class="confOptionContainer" id="conference_1">
                                        <label class="control control--checkbox" > Dopłata do pokoju 1-osobowego
                                          <input type="checkbox" name="fee_room1" class="price_plus_room" id="price_plus_room" data-theme="d" value="2" onchange="calculatePrice();" >
                                            <div class="control__indicator"></div>
                                        </label>
                                        <label class="control control--checkbox" > Opłata za pobyt osoby towarzyszącej lub kierowcy w pokoju dwuosobowym
                                            <input type="checkbox" name="fee_room_add_person" id="price_plus_person" data-theme="d" onclick="$('#price_plus_room').prop
                                                    ("checked", true);" value="3" onchange="calculatePrice();" >
                                            <div class="control__indicator"></div>
                                        </label>
                                      <label class="control control--checkbox" style="display: none;" > Udział w konferencji Ang. 
                                            <input type="checkbox" name="fee_ang_conference" id="price_plus_ang" data-theme="d" value="4" onchange="calculatePrice();" >
                                            <div class="control__indicator"></div>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>  
                    <div class="entry">
                        <div class="label">{translate word='Jeden dzień (bez noclegu)'}:</div>
                        <div class="value">
                            <div class="configContainer">
                                <div class="confOption"> 
                                    <label class="control control--radio">&nbsp;
                                        <input type="radio" name="conference_fee" id="conference_fee_one" class="conference_fee" value="5"  onclick="$('#conference_1').hide();
                                                $('#conference_2').show(); calculatePrice();" />
                                        <div class="control__indicator"></div>
                                    </label>
                                    <div class="confOptionContainer" id="conference_2">
                                        Wybierz dzień konferencji:
                                        <label class="control control--radio">04.11
                                            <input type="radio" name="day_conference" value="03.11" />
                                            <div class="control__indicator"></div>
                                        </label>
                                        <label class="control control--radio">05.11
                                            <input type="radio" name="day_conference" value="04.11" />
                                            <div class="control__indicator"></div>
                                        </label>
                                        <label class="control control--radio">06.11
                                            <input type="radio" name="day_conference" value="05.11" />
                                            <div class="control__indicator"></div>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>  
                    <div class="entry">
                        <div class="label">{translate word='Cena za konferencje'}</div>
                        <div class="value"><p class="price_full_fee" style="margin: 0px;">&nbsp;</p></div>
                        
                    </div>

 <div class="entry">
                        <div><h5 align="center">&nbsp;</h5></div>
                    </div>

                    <div class="cb"></div>
                    <div>
                            <p>{$indexNews->GetShortnote()}</p>
                    </div>

                    
                    <div class="entry" style="padding-top: 1.1em;">
                    <div class="label"> </div>
                    <div class="value"><div class="g-recaptcha" data-sitekey="6LfUVuoUAAAAAD7noZ6S0rf8ZPiZKQ2KVpNBA274" data-callback="recaptchaCallback"></div>
                    <input type="hidden" class="hiddenRecaptcha required" name="hiddenRecaptcha" id="hiddenRecaptcha">
                    </div>
                    </div>
                    <div class="entry entryLast">
                        <div class="label">&nbsp;</div>
                        <div class="value"><input class="button _sendContact" type="button" value="{translate word='send'}" /></div>
                    </div>	

                </form>
            </div>
            <div class="cb"></div>
        </div>


    </div>
</div>


