<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="/WEB-INF/dateformat.tld" prefix="da" %>
<%--
  ~ This file is part of DebGen Biobank Software developed by ASTRID Research.
  ~ All rights reserved. Reproduction, modification, use or disclosure
  ~ to third parties without express authority is forbidden.
  ~
  ~ Copyright ASTRID Research Inc., Hungary, 2009-2011.
  ~
  ~ ASTRID Research
  ~ Headquaters: Csapo utca 42. Debrecen H-4029 HUNGARY
  ~ Phone: +36-52-533-173        Fax: +36-52-533-174
  ~ Web: http://www.astrid.hu    E-mail: info@astrid.hu
  ~
  ~ Project name: DebGen Biobank Software project.
  ~ URLS:
  ~ Developers: Istvan Zoltan Nagy (istvan.nagy@astrid.hu)
  --%>

<script type="text/javascript">
    setWebTitle('<fmt:message key="BIOBANK_FELHASZNÁLÓ" />');
    autocompleteOff();
</script>
<div class="window500">
    <div class="title"><fmt:message key="BIOBANK_FELHASZNÁLÓ" /></div>
    <div class="content">
        <div style="padding: 10px;">
            <table border="0" cellspacing="10" cellpadding="5">
                <tbody>
                    <tr>
                        <td class="userheader"></td>
                        <td><fmt:message key="BIOBANK_FELHASZNÁLÓ" /></td>
                    </tr>
                </tbody>
            </table>
            <div style="width: 476px;" class="userline">
                <fmt:message key="BIOBANK_FELHASZNÁLÓ_ADATAI" />
            </div>
            <form action="saveuser.html" method="POST">
                <input type="hidden" name="id" value="${usr.id}">

                <%@ include file="../showembedederror.jsp" %>
                <div id="userdiv">
                    <table class="formtable" border="0" width="477px" cellspacing="0" cellpadding="3">
                        <tbody>
                            <tr>
                                <td style="width: 120px;"><fmt:message key="FELHASZNALOI_NEV" /></td>
                                <td>
                                    <c:if test="${empty usr.id}">
                                        <input class="required" type="text" name="userName" value="${usr.userName}">
                                    </c:if>
                                    <c:if test="${not empty usr.id}">
                                    ${usr.userName}
                                    </c:if>
                                </td>
                            </tr>
                            <tr>
                                <td><fmt:message key="TELJES_NÉV" /></td>
                                <td><input class="required" type="text" name="fullName" value="${usr.fullName}"></td>
                            </tr>
                            <tr>
                                <td><fmt:message key="EMAIL_CÍM" /></td>
                                <td><input class="required" type="text" name="email" value="${usr.email}"></td>
                            </tr>
                            <tr>
                                <td><fmt:message key="NYELV" /></td>
                                <td><select name="languageCode" class="styled">
                                        <option value="HU" ${usr.languageCode eq 'HU' ? 'selected' : ''}><fmt:message key="HU" /></option>
                                        <option value="EN" ${usr.languageCode eq 'EN' ? 'selected' : ''}><fmt:message key="EN" /></option>
                                    </select></td>
                            </tr>
                            <tr>
                                <td><fmt:message key="FIELD_OF_ACTIVITY" /></td>
                                <td><input ${usr.userAdministrator ? 'checked' : ''} ${usr.id eq user.id ? 'disabled' : ''} type="checkbox" name="userAdministrator" value="ON"><fmt:message key="LEGYEN_ADMIN" />${usr.id eq user.id and usr.userAdministrator ? '<input type="hidden" name="userAdministrator" value="ON">' : ''}</td>
                            </tr>
                            <tr>
                                <td></td>
                                <td><input ${usr.dataRecorder ? 'checked' : ''} ${usr.id eq user.id ? 'disabled' : ''} type="checkbox" name="dataRecorder" value="ON"><fmt:message key="dataRecorder_message" />${usr.id eq user.id and usr.dataRecorder ? '<input type="hidden" name="dataRecorder" value="ON">' : ''}</td>
                            </tr>
                            <tr>
                                <td></td>
                                <td><input ${usr.researcher ? 'checked' : ''} ${usr.id eq user.id ? 'disabled' : ''} type="checkbox" name="researcher" value="ON"><fmt:message key="researcher_message" />${usr.id eq user.id and usr.researcher ? '<input type="hidden" name="researcher" value="ON">' : ''}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <br />
                <div align="right">
                    <input class="button" type="submit" value="<fmt:message key="MENTÉS" />">
                </div>
            </form>
        </div>
    </div>
        <div class="copyright">
            &copy; 2009-2010 Astrid Research Inc.
        </div>
</div>
