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

<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>

<%
    HiringTeam  hiringTeam      =   (HiringTeam) getData(request, "HiringTeam"); 
    boolean     isReplace       =   (boolean) getData(request, "IsReplace"); 
    boolean     isEdit          =   (boolean) getData(request, "IsEdit"); 
    String      replaceCardPage =   WebUtils.getSamePageInRenderMode(request, "ReplaceCard");
    String      editCardPage    =   WebUtils.getSamePageInRenderMode(request, "EditCard");
    String      cardNumber      =   hiringTeam.getCardNumber();
    Job         job             =   (Job) process.getAttribute("Job");
    Boolean     ppj             =   (Boolean) process.getAttribute("PPJ");
    String      nextPage        =   WebUtils.getSamePageInRenderMode(request, "Billing");

%>
<oneit:dynIncluded>
    <div class="form-group row">
        <div class="col-lg-3 col-md-3 col-sm-3">
            <label>Card on file</label>
        </div>
        <div class="col-lg-5 col-md-5 col-sm-5" style="margin-top: -20px;">
            <img src="<%= hiringTeam.getStripeBrand().equals("MasterCard") ? "images/master.svg" : "images/visa.svg" %>" style="width:60px;"/>
            <label><%= cardNumber %></label>
        </div>
        <div class="col-lg-2 col-md-2 col-sm-2">
            <oneit:button   value=" "    name="gotoPage"  skin="link" cssClass="<%= "edit-card-link " + (isEdit ? "" : "deselected-link")%>"
                            requestAttribs="<%= CollectionUtils.mapEntry("nextPage", editCardPage)
                                                                .mapEntry("procParams", CollectionUtils.mapEntry("HiringTeam", hiringTeam).toMap())
                                                                .toMap() %>">
                Edit Card
            </oneit:button>                                                    
        </div>
        <div class="col-lg-2 col-md-2 col-sm-2">
            <oneit:button   value=" "    name="gotoPage"  skin="link" cssClass="<%= "edit-card-link " + (isReplace ? "" : "deselected-link")%>"
                            requestAttribs="<%= CollectionUtils.mapEntry("nextPage", replaceCardPage)
                                                                .mapEntry("procParams", CollectionUtils.mapEntry("HiringTeam", hiringTeam).toMap())
                                                                .toMap() %>">
                Replace Card
            </oneit:button>                                                    
        </div>
    </div>
</oneit:dynIncluded>

