<%@ 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" %>

<oneit:dynIncluded>
<%
    ObjectTransaction   objTran         = process.getTransaction ();
    String              nextPage        = WebUtils.getSamePageInRenderMode(request, "JobMatchAssessment");
    JobApplication      jobApplication  = (JobApplication) process.getAttribute("JobApplication");
    Job                 job             = jobApplication.getJob();
    
%>
    <script>
        $(document.body).addClass('bg-color');
    </script>
    
    <div class="main-application-outline">
        <div class="selection-aust-logo">
            <img src="images/australia-post.png" />
            <span>Australia Post Chief Executive Officer</span>
        </div>
        <div class="show-mobile-title">
            <div class="mobile-title-page">Section 2 - Workplace Culture</div>
            <div class="mobile-estimated">Estimated time to complete: <b>5 mins</b></div>
        </div>
        <div class="section-title m-hide">Section 2</div>
        <div class="section-c-title m-hide">
            Workplace Culture
            <span>Estimated time to complete: <b>5 mins</b></span>
        </div>
        <div class="section-tab-view">
            
            <oneit:form name="editApplication"  method="post"   enctype="multipart/form-data">
            
                <oneit:dynInclude   page="/extensions/applicantportal/inc/multifieldtext.jsp"   data="<%= CollectionUtils.EMPTY_MAP%>"/>
                
                <oneit:dynInclude   page="/extensions/applicantportal/inc/application_main_tabs.jsp"    PageNumber="2"  data="<%= CollectionUtils.EMPTY_MAP%>"/>

                <div class="section-page-area">
                  <div class="main-sc-section">
                    <p>
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean semper at magna a
                        tristique. Ut ut magna ut mauris sagittis placerat. Suspendisse vitae tempus sem. Lorem
                        ipsum dolor sit amet, consectetur adipiscing elit.
                    </p>
                  </div>
                  <div class="selection-br-line"></div>
                  <div class="main-sc-section main-wc-section">
                    <%
                        for(CultureCriteriaAnswer   answer: jobApplication.getCultureCriteriaAnswersSet())
                        {
                            CultureCriteria                     criteria    = answer.getCultureCriteria();
                            Collection<CultureElementQuestion>  questions   = criteria.pipelineCultureCriteria().toCultureElement().toQuestions().vals();
                            CultureElementQuestion              selectedQst = answer.getSelectedQuestion();
                            BaseBusinessClass                   questionRef = answer.getSingleAssoc(CultureCriteriaAnswer.SINGLEREFERENCE_SelectedQuestion);
                            String                              key         = WebUtils.getRadioSingleAssocKey(request, questionRef, CultureCriteriaAnswer.SINGLEREFERENCE_SelectedQuestion);

                    %>
                            <div class="selection-form-title">Question 1</div>
                            <div class="form-group-new question-y-n">
                                <%
                                    for(CultureElementQuestion  question: questions)
                                    {
                                        String  id          = "question_" + question.getID();
                                        Boolean isSelected  = CollectionUtils.equals(selectedQst, question);
                                        String  selectedStr = (isSelected) ? "checked" : "";
                                %>
                                        <div class="radio radio-primary second-radio-primary full-width">
                                            <input type="radio" id="<%= id %>"  value="<%= question.getID().toString() %>"  name="<%= key %>"    <%= selectedStr %>/>
                                            <label for="<%= id %>">
                                                <oneit:toString value="<%= question.getDescription() %>"    mode="EscapeHTML"   nullValue="-"/>
                                            </label>
                                        </div>
                                <%
                                    }
                                %>
                            </div>              
                            <div class="section-br-inside"></div>
                    <%
                        }
                    %>
  
                  </div>            
                  <div class="selection-br-line"></div>
                  <div class="main-sc-section btn-remove-padd">
                    <div class="section-btn text-center">
                        <input type="button" class="box-btn-gray" value="Save and exit" />
                        <oneit:button   value="Proceed to step 3"   name="gotoPage" cssClass="box-btn"
                                        requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
                                                                        .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
                                                                        .toMap() %>"/>
                    </div>
                  </div>
                </div>
            </oneit:form>
        </div>
    </div>
</oneit:dynIncluded>