<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java" %>

<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<f:view locale="#{Session.locale}">
    
    <%@ include file ="../../WEB-INF/jspf/Header.jspf" %>
    <body>
        <%@ include file="../../WEB-INF/jspf/TopMenu.jspf" %>
        <div class="container">
            <div class="adminContent">
                
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                
                <h1><h:outputText value="#{msgs.BuyingSet}" />: <h:outputText value="#{ShoppingCart.currentSet.title}" /></h1>
                
                <h:form>
                    <h:panelGrid columns="2">
                        <h:panelGroup styleClass="mediumCol">
                            Description:
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputText value="#{ShoppingCart.currentSet.description}" />
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputText value="Questions:" />
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputText value="#{ShoppingCart.numberOfQuestions}" />
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputText value="Choose:" />
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputText rendered="#{ShoppingCart.currentSet.viewPrice > 0}">
                                <div>
                                    <input type="radio" name="ordering_model" value="0" />
                                    pay-per-view: <h:outputText value="#{ShoppingCart.currentSet.viewPrice}" /> .-
                                </div>
                            </h:outputText>
                            <h:outputText rendered="#{ShoppingCart.currentSet.oneMonthPrice > 0}">
                                <div>
                                    <input type="radio" name="ordering_model" value="1" />
                                    1 month usage rights: <h:outputText value="#{ShoppingCart.currentSet.oneMonthPrice}" /> .-
                                </div>
                            </h:outputText>
                            <h:outputText rendered="#{ShoppingCart.currentSet.threeMonthPrice > 0}">
                                <div>
                                    <input type="radio" name="ordering_model" value="3" />
                                    3 months usage rights: <h:outputText value="#{ShoppingCart.currentSet.threeMonthPrice}" /> .-
                                </div>
                            </h:outputText>
                            <h:outputText rendered="#{ShoppingCart.currentSet.sixMonthPrice > 0}">
                                <div>
                                    <input type="radio" name="ordering_model" value="6" />
                                    half-year usage rights: <h:outputText value="#{ShoppingCart.currentSet.sixMonthPrice}" /> .-
                                </div>
                            </h:outputText>
                        </h:panelGroup>
                    </h:panelGrid>
                    
                    <h:commandButton value="Buy" action="#{ShoppingCart.confirmBuying}" />
                </h:form>
                
                <%@ include file ="../../WEB-INF/jspf/Footer.jspf" %>
            </div>
        </div>
    </body>
</f:view>