<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="platnosc.aspx.cs" Inherits="_Default" Title="Platnosci.AdMoto.pl" Culture="auto" UICulture="auto" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager id="ScriptManager1" runat="server"></asp:ScriptManager>

<div id="left">

</div>
<div id="content">
    <% if (1==1)//this.FormaPlatnosci == "karta"
       { %>
    <h2><asp:Literal ID="SzczegolyLiteral" runat="server" meta:resourcekey="SzczegolyLiteral">Szczegóły zlecenia:</asp:Literal></h2>
    <p><asp:Literal ID="SprawdzLiteral" runat="server" meta:resourcekey="SprawdzLiteral">
        Sprawdź czy poniższe dane są prawidłowe. Jeśli są poprawne kliknij przycisk Płacę znajdujący się poniżej. Zostaniesz przeniesiony na stronę firmy eCard gdzie nastąpi dokończenie transakcji. </asp:Literal></p>
        <p><asp:LinkButton ID="PomocLiteral" runat="server" meta:resourcekey="PomocLiteral" OnClientClick="return false;">Potrzebujesz pomocy?</asp:LinkButton></p>
        
    <div id="box">
        <p><span class="bold">
            <asp:Literal ID="NazwaText" runat="server" meta:resourcekey="NazwaText">Nazwa: </asp:Literal></span><asp:Literal ID="Nazwa" runat="server"></asp:Literal></p>
        <p><span class="bold">
            <asp:Literal ID="AdresText" runat="server" meta:resourcekey="AdresText">Adres: </asp:Literal></span><asp:Literal ID="Adres" runat="server"></asp:Literal></p>
        <p><span class="bold">
            <asp:Literal ID="NIPText" runat="server" meta:resourcekey="NIPText">NIP: </asp:Literal></span><asp:Literal ID="NIP" runat="server"></asp:Literal></p>
        <p><span class="bold">
            <asp:Literal ID="NrFakturyText" runat="server" meta:resourcekey="NrFakturyText">Nr faktury: </asp:Literal></span><asp:Literal ID="NrFaktury" runat="server"></asp:Literal></p>
        <p><span class="bold">
            <asp:Literal ID="DataWystawieniaText" runat="server" meta:resourcekey="DataWystawieniaText">Data wystawienia: </asp:Literal></span><asp:Literal ID="DataWystawienia" runat="server"></asp:Literal></p>
        <p><span class="bold">
            <asp:Literal ID="TerminPlatnosciText" runat="server" meta:resourcekey="TerminPlatnosciText">Termin płatności: </asp:Literal></span><asp:Literal ID="TerminPlatnosci" runat="server"></asp:Literal></p>
        <p><span class="bold"><asp:Literal ID="WartoscBruttoText" runat="server" 
                meta:resourcekey="WartoscBruttoText">Wartość brutto: </asp:Literal></span>
                <asp:Literal ID="Brutto" runat="server"></asp:Literal>
                <span class="bold odstep"><asp:Literal ID="zmienWalute" runat="server" 
                    meta:resourcekey="zmienWaluteText">Currency: </asp:Literal></span>
                    <asp:DropDownList ID="WyborWaluty" runat="server" CssClass="WyborWaluty" AutoPostBack="True" OnSelectedIndexChanged="WyborWaluty_SelectedIndexChanged" Enabled="False">                                                               
                        <asp:ListItem>PLN</asp:ListItem>
                    </asp:DropDownList></p>
                   
        <p><asp:Literal ID="WlascicielKarty" runat="server" meta:resourcekey="WlascicielKarty">Podaj imię i nazwisko osoby na którą jest wystawiona karta kredytowa:</asp:Literal></p>
        <p>
            <asp:Label ID="Imie" runat="server" AssociatedControlID ="ImieTextBox" Text="Imię: " meta:resourcekey="Imie"></asp:Label><asp:TextBox ID="ImieTextBox" runat="server"></asp:TextBox>
            <asp:Label ID="Nazwisko" runat="server" AssociatedControlID ="NazwiskoTextBox" Text="Nazwisko: " meta:resourcekey="Nazwisko"></asp:Label><asp:TextBox ID="NazwiskoTextBox" runat="server"></asp:TextBox></p>        
    </div>
        <p><asp:Button ID="PlaceButton" runat="server" Text="Płacę" OnClick="PlaceButton_Click" 
            meta:resourcekey="PlaceButton"/></p>
            
        <div id="flyout" style="display: none; overflow: hidden; z-index: 2; background-color: #FFFFFF; border: solid 1px #D0D0D0;"></div>
        
        <div id="info" style="display: none; width: 400px; z-index: 2; opacity: 0; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); font-size: 12px; border: solid 1px #CCCCCC; background-color: #FFFFFF; padding: 5px;">
            <div id="btnCloseParent" style="float: right; opacity: 0; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);">
                <asp:LinkButton id="btnClose" runat="server" OnClientClick="return false;" Text="X" ToolTip="Close"
                    Style="background-color: #666666; color: #FFFFFF; text-align: center; font-weight: bold; text-decoration: none; border: outset thin #FFFFFF; padding: 5px;" />
            </div>
            <div>
                <p class="bold">
                    <asp:Literal ID="InfoKontakt" runat="server" meta:resourcekey="InfoKontakt">Kontakt do Twojego opiekuna handlowego:</asp:Literal></p>
                <p>
                    <span class="bold"><asp:Literal ID="ImieNazwiskoLiteral" runat="server" meta:resourcekey="ImieNazwiskoLiteral">Imię i nazwisko:</asp:Literal></span> 
                    <asp:Literal ID="Handlowiec" runat="server"></asp:Literal></p>
                <p>
                    <span class="bold"><asp:Literal ID="AdresLiteral" runat="server" meta:resourcekey="AdresLiteral">Adres:</asp:Literal></span> 
                    <asp:Literal ID="BiuroAdres" runat="server"></asp:Literal></p>
                <p><asp:Literal ID="BiuroTelefon" runat="server"></asp:Literal></p>                                                  
            </div>
        </div>
       
       
       <script type="text/javascript" language="javascript">
            // Move an element directly on top of another element (and optionally
            // make it the same size)
            function Cover(bottom, top, ignoreSize) {
                var location = Sys.UI.DomElement.getLocation(bottom);
                top.style.position = 'absolute';
                top.style.top = location.y + 'px';
                top.style.left = location.x + 'px';
                if (!ignoreSize) {
                    top.style.height = bottom.offsetHeight + 'px';
                    top.style.width = bottom.offsetWidth + 'px';
                }
            }
        </script>


<ajaxToolkit:AnimationExtender id="OpenAnimation" runat="server" TargetControlID="PomocLiteral">
            <Animations>
                <OnClick>
                    <Sequence>
                        <%-- Disable the button so it can't be clicked again --%><EnableAction Enabled="false" /><%-- Position the wire frame on top of the button and show it --%><ScriptAction Script="Cover($get('ctl00_ContentPlaceHolder1_PomocLiteral'), $get('flyout'));" /><StyleAction AnimationTarget="flyout" Attribute="display" Value="block"/><%-- Move the wire frame from the button's bounds to the info panel's bounds --%><Parallel AnimationTarget="flyout" Duration=".3" Fps="25">
                            <Move Horizontal="250" Vertical="-50" />
                            <Resize Width="410" Height="105" />
                            <Color PropertyKey="backgroundColor" StartValue="#AAAAAA" EndValue="#FFFFFF" />
                        </Parallel>
                        
                        <%-- Move the info panel on top of the wire frame, fade it in, and hide the frame --%><ScriptAction Script="Cover($get('flyout'), $get('info'), true);" /><StyleAction AnimationTarget="info" Attribute="display" Value="block"/><FadeIn AnimationTarget="info" Duration=".2"/><StyleAction AnimationTarget="flyout" Attribute="display" Value="none"/><%-- Flash the text/border red and fade in the "close" button --%><Parallel AnimationTarget="info" Duration=".5">
                            <Color PropertyKey="color" StartValue="#666666" EndValue="#FF0000" />
                            <Color PropertyKey="borderColor" StartValue="#666666" EndValue="#FF0000" />
                        </Parallel>
                        <Parallel AnimationTarget="info" Duration=".5">
                            <Color PropertyKey="color" StartValue="#FF0000" EndValue="#666666" />
                            <Color PropertyKey="borderColor" StartValue="#FF0000" EndValue="#666666" />
                            <FadeIn AnimationTarget="btnCloseParent" MaximumOpacity=".9" />
                        </Parallel>
                    </Sequence>
                </OnClick>
            </Animations>
</ajaxToolkit:AnimationExtender>

<ajaxToolkit:AnimationExtender id="CloseAnimation" runat="server" TargetControlID="btnClose">
            <Animations>
                <OnClick>
                    <Sequence AnimationTarget="info">
                        <%--  Shrink the info panel out of view --%><StyleAction Attribute="overflow" Value="hidden"/><Parallel Duration=".3" Fps="15">
                            <Scale ScaleFactor="0.05" Center="true" ScaleFont="true" FontUnit="px" />
                            <FadeOut />
                        </Parallel>
                        
                        <%--  Reset the sample so it can be played again --%><StyleAction Attribute="display" Value="none"/><StyleAction Attribute="width" Value="400px"/><StyleAction Attribute="height" Value=""/><StyleAction Attribute="fontSize" Value="12px"/><OpacityAction AnimationTarget="btnCloseParent" Opacity="0" /><%--  Enable the button so it can be played again --%><EnableAction AnimationTarget="ctl00_ContentPlaceHolder1_PomocLiteral" Enabled="true" /></Sequence>
                </OnClick>
                <OnMouseOver>
                    <Color Duration=".2" PropertyKey="color" StartValue="#FFFFFF" EndValue="#FF0000" />
                </OnMouseOver>
                <OnMouseOut>
                    <Color Duration=".2" PropertyKey="color" StartValue="#FF0000" EndValue="#FFFFFF" />
                </OnMouseOut>
             </Animations>
        </ajaxToolkit:AnimationExtender>

 <asp:Panel ID="xmlShow" runat="server" style="display: none; z-index: 3; background-color:#DDD; border: thin solid navy;">
            <pre style="margin: 5px">&lt;ajaxToolkit:AnimationExtender id="OpenAnimation" runat="server" TargetControlID="btnInfo"&gt;
&lt;Animations&gt;
    &lt;OnClick&gt;
        &lt;Sequence&gt;
           <em>&lt;%-- Disable the button --%&gt;</em>
            &lt;EnableAction Enabled="false" /&gt; 
           <em>&lt;%-- Show the flyout --%&gt;</em>
            &lt;Parallel AnimationTarget="flyout" Duration=".3" Fps="25"&gt;
                &lt;Move Horizontal="250" Vertical="-50" /&gt;
                &lt;Resize Height="410" Width="120" /&gt;
                &lt;Color AnimationTarget="flyout" PropertyKey="backgroundColor"
                        StartValue="#AAAAAA" EndValue="#FFFFFF" /&gt;
            &lt;/Parallel&gt;
          <em>&lt;%-- Fade in the text --%&gt; </em>
            &lt;FadeIn AnimationTarget="info" Duration=".2"/&gt;
          <em>&lt;%-- Cycle the text and border color to red and back --%&gt;</em>
            &lt;Parallel AnimationTarget="info" Duration=".5"&gt;
                &lt;Color PropertyKey="color"
                        StartValue="#666666" EndValue="#FF0000" /&gt;
                &lt;Color PropertyKey="borderColor"
                        StartValue="#666666" EndValue="#FF0000" /&gt;
            &lt;/Parallel&gt;
            &lt;Parallel AnimationTarget="info" Duration=".5"&gt;
                &lt;Color PropertyKey="color"
                        StartValue="#FF0000" EndValue="#666666" /&gt;
                &lt;Color PropertyKey="borderColor"
                        StartValue="#FF0000" EndValue="#666666" /&gt;
                &lt;FadeIn AnimationTarget="btnCloseParent" MaximumOpacity=".9" /&gt;
            &lt;/Parallel&gt;
        &lt;/Sequence&gt;
    &lt;/OnClick&gt;
&lt;/Animations&gt;
&lt;/ajaxToolkit:AnimationExtender&gt;</pre>
        </asp:Panel>
        
        <asp:Panel ID="xmlClose" runat="server" style="display: none; z-index: 3; background-color: #DDD; border: thin solid navy;">
            <pre style="margin: 5px">&lt;ajaxToolkit:AnimationExtender id="CloseAnimation" runat="server" TargetControlID="btnClose"&gt;
&lt;Animations&gt;
    &lt;OnClick&gt;
        &lt;Sequence AnimationTarget="info"&gt;
          <em>&lt;%-- Scale the flyout down to 5% to make it disappear --%&gt;</em>
            &lt;Parallel Duration=".3" Fps="15"&gt;
                &lt;Scale ScaleFactor="0.05" Center="true"
                        ScaleFont="true" FontUnit="px" /&gt;
                &lt;FadeOut /&gt;
            &lt;/Parallel&gt;
          <em>&lt;%-- Reset the styles on the info box --%&gt;</em>
            &lt;StyleAction Attribute="display" Value="none"/&gt;
            &lt;StyleAction Attribute="width" Value="250px"/&gt;
            &lt;StyleAction Attribute="height" Value=""/&gt;
            &lt;StyleAction Attribute="fontSize" Value="12px"/&gt;
          <em>&lt;%-- Re-enable the button --%&gt;</em>
            &lt;EnableAction Enabled="true"
                    AnimationTarget="ctl00_SampleContent_btnInfo" /&gt;
        &lt;/Sequence&gt;
    &lt;/OnClick&gt;
&lt;/Animations&gt;
&lt;/ajaxToolkit:AnimationExtender&gt;
        </pre>
        </asp:Panel>
           
    <% }
       else
       { %>
        <p>
            <asp:Literal ID="NieKarta1" runat="server" meta:resourcekey="NieKarta1">Dla tego zlecenia nie została wybrana forma płatności: karta kredytowa.</asp:Literal></p>
        <p>
            <asp:Literal ID="NieKarta2" runat="server" meta:resourcekey="NieKarta2">Aby to zmienić skontaktuj się z osobą która wystawiła fakturę.</asp:Literal></p>
        <p><asp:Button ID="ZamknijButton" runat="server" Text="Zamknij" OnClick="ZamknijButton_Click" 
            meta:resourcekey="ZamknijButton"/></p>
    <% } %>
</div>
</asp:Content>

