<%@ page extends="oneit.servlets.jsp.JSPInclude" %>

<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<%@ page import="oneit.security.SecUser"%>

<oneit:dynIncluded>
<%
    CompanyUser companyUser =   (CompanyUser) getData(request, "CompanyUser"); 

    Debug.assertion(companyUser != null, "Invalid CompanyUser in admin portal");

    SecUser     secUser     =   companyUser.getUser();
    Company     company     =   companyUser.getCompany();
%>
    
    <div class="form-group text-left">
        <label>Email Address</label>
        <%
            if(companyUser.getStatus()==ObjectStatus.NEW || secUser.getEmail()==null)
            {
        %>
                <oneit:ormInput obj="<%= secUser %>"    type="text" attributeName="Email"   cssClass="form-control"    style="text-transform: lowercase"    required="true"/>
        <%
            }
            else
            {
        %>
                <oneit:ormInput obj="<%= secUser %>"    type="text" attributeName="Email"   cssClass="form-control"    readonly="true"  style="text-transform: lowercase"    required="true"/>
        <%
            }
        %>
    </div>
    <div class="row">
        <div class="form-group text-left col-sm-6 col-xs-12">
            <label><oneit:ormlabel  obj="<%= secUser %>"    field="FirstName" /></label>
            <oneit:ormInput obj="<%= secUser %>"    type="text" attributeName="FirstName"   cssClass="form-control second-style"    required="true" spellcheck="false"  />
        </div>
        <div class="form-group text-left col-sm-6 col-xs-12">
            <label><oneit:ormlabel  obj="<%= secUser %>"    field="LastName" /></label>
            <oneit:ormInput obj="<%= secUser %>"    type="text" attributeName="LastName"    cssClass="form-control second-style"    required="true" spellcheck="false"  />
        </div>
    </div>
    <div class="form-group text-left">
        <label><oneit:ormlabel  obj="<%= companyUser %>"    field="Phone" /></label>
        <oneit:ormInput obj="<%= companyUser %>"    type="text" attributeName="Phone"       cssClass="form-control" required="true"/>
    </div>
    <div class="form-group text-left">
        <label>Hiring Team</label>
        <%
            if(company.getIsVerified()==Boolean.TRUE || !CollectionUtils.equals(company.getAddedByUser(), companyUser))
            {
        %>
                <oneit:ormInput obj="<%= company %>"    type="text" attributeName="CompanyName" cssClass="form-control"  readonly="true"    required="true" placeholder="Your company name"/>
        <%
            }
            else
            {
        %>
                <oneit:ormInput obj="<%= company %>"    type="text" attributeName="CompanyName" cssClass="form-control" required="true" placeholder="Your company name"/>
        <%
            }
        %>
    </div>
</oneit:dynIncluded>
