<%-- 
    Document   : register
    Created on : 2010.02.19., 11:19:46
    Author     : Szilárd
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <style type="text/css">
            .box{
                    position:absolute;
                    margin-left: 300px;
                    margin-top: 200px;
                    height: 298px;
                    width: 590px;
                    background-image:url("regiszter.jpg");
                    background-repeat: repeat-x;
                }
                .cim{
                    margin-top: 70px;
                    margin-left: 105px;
                }
            </style>
            <title>Regisztráció</title>
        </head>
        <body bgcolor="#C0C0C0">
           <h:form>
               <div class="box">
                  <div class="cim">
               <h:panelGrid columns="2" styleClass="form" headerClass="tableHeader" footerClass="tableFooter" rowClasses="tableRowOdd, tableRowEven">

                    <f:facet name="header">
                        <h:outputText value="Regisztráció" />
                    </f:facet>
                    <f:facet name="footer">
                        <h:panelGroup>
                            <h:commandButton  action="#{CreateUser.saveAction}" value="Mentés"/>
                            <h:commandButton action="#{CreateUser.cancelAction}" value="Cancel" immediate="true"/>
                        </h:panelGroup>
                    </f:facet>

                    <h:outputText value="Név: " />
                    <h:inputText id="name" value="#{CreateUser.user.name}" required="true">
                        <f:validateLength minimum="5" maximum="30"/>
                    </h:inputText>
                    <h:inputHidden/>
                    <h:message for="name" />
                    
                    <h:outputText value="Felhasználónév: " />
                    <h:inputText id="code" value="#{CreateUser.user.userName}" required="true">
                        <f:validateLength minimum="5" maximum="30"/>
                    </h:inputText>
                    <h:inputHidden/>
                    <h:message for="code" />

                    <h:outputText value="Jelszó: " />
                    <h:inputSecret id="password" value="#{CreateUser.user.password}" required="true" redisplay="true">
                        <f:validateLength minimum="5" maximum="30"/>
                    </h:inputSecret>
                    <h:inputHidden/>
                    <h:message for="password" />
                    
                    <h:outputText value="Jogosultság" />
                    <h:selectOneRadio value="#{CreateUser.role}" >
                        <f:selectItem id="item1" itemLabel="Student" itemValue="STUDENT"/>
                        <f:selectItem id="item2" itemLabel="Teacher" itemValue="TEACHER"/>
                        <f:selectItem id="item3" itemLabel="Admin" itemValue="ADMIN"/>
                    </h:selectOneRadio>
                    
            </h:panelGrid>
                       </div>
                  </div>
            </h:form>
        </body>
    </html>
</f:view>
