<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright 2017 Red Hat, Inc. and/or its affiliates.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~       http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
             xmlns:g="urn:import:com.google.gwt.user.client.ui"
             xmlns:b="urn:import:org.gwtbootstrap3.client.ui"
             xmlns:c="urn:import:org.jbpm.workbench.common.client.util"
             xmlns:p="urn:import:org.uberfire.client.views.pfly.widgets">

  <ui:with field="i18n" type="org.jbpm.workbench.ht.client.resources.i18n.Constants"/>

  <ui:style>
    .spacer {
      padding-top: 15px;
    }
  </ui:style>

  <g:HTMLPanel>
    <b:TabPanel ui:field="tabPanel" addStyleNames="uf-tabbar-panel">
      <b:NavTabs addStyleNames="uf-tabbar-panel-nav-tabs nav-tabs-pf">
        <b:TabListItem active="true" text="{i18n.Basic}" ui:field="basicTab" addStyleNames="uf-dropdown-tab-list-item"/>
        <b:TabListItem text="{i18n.Advanced}" ui:field="advancedTab" addStyleNames="uf-dropdown-tab-list-item"/>
        <b:TabListItem text="{i18n.Task_Form}" ui:field="taskformTab" addStyleNames="uf-dropdown-tab-list-item"/>
      </b:NavTabs>
      <b:TabContent>
        <b:TabPane active="true" ui:field="basicTabPane" addStyleNames="{style.spacer}">
          <b:Container fluid="true">
            <b:Column size="MD_12">
              <b:Form type="HORIZONTAL">
                <b:FieldSet>
                  <b:FormGroup ui:field="taskNameControlGroup">
                    <p:FormLabelHelp text="{i18n.Task_Name}" addStyleNames="col-md-3" showRequiredIndicator="true"/>
                    <b:Column size="MD_9">
                      <b:TextBox ui:field="taskNameText"/>
                      <b:HelpBlock ui:field="taskNameHelpLabel"/>
                    </b:Column>
                  </b:FormGroup>
                </b:FieldSet>
              </b:Form>
            </b:Column>
          </b:Container>
        </b:TabPane>
        <b:TabPane ui:field="advancedTabPane" addStyleNames="{style.spacer}">
          <b:Container fluid="true">
            <b:Column size="MD_12">
              <b:Form type="HORIZONTAL">
                <b:FieldSet ui:field="controlsPanel">
                  <b:FormGroup>
                    <p:FormLabelHelp text="{i18n.Due_On}" addStyleNames="col-md-3"/>
                    <b:Column size="MD_9">
                      <c:UTCDateBox ui:field="dueDate" styleName="col-md-8"/>
                      <c:UTCTimeBox ui:field="dueDateTime" styleName="col-md-4"/>
                    </b:Column>
                  </b:FormGroup>
                  <b:FormGroup>
                    <p:FormLabelHelp text="{i18n.Priority}" addStyleNames="col-md-3"/>
                    <b:Column size="MD_9">
                      <b:ListBox ui:field="taskPriorityListBox"/>
                    </b:Column>
                  </b:FormGroup>
                  <b:FormGroup>
                    <b:Column size="MD_9" offset="MD_3">
                      <b:Button ui:field="addUserButton" text="{i18n.Add_User}"/>
                      <b:Button ui:field="addGroupButton" text="{i18n.Add_Group}"/>
                    </b:Column>
                  </b:FormGroup>
                </b:FieldSet>
              </b:Form>
            </b:Column>
          </b:Container>
        </b:TabPane>
        <b:TabPane ui:field="taskformTabPane" addStyleNames="{style.spacer}">
          <b:Container fluid="true">
            <b:Column size="MD_12">
              <b:Form type="HORIZONTAL">
                <b:FieldSet>
                  <b:FormGroup ui:field="taskFormDeploymentIdControlGroup">
                    <p:FormLabelHelp text="{i18n.Task_Form_DeploymentId}" addStyleNames="col-md-3"/>
                    <b:Column size="MD_9">
                      <b:ListBox ui:field="taskFormDeploymentId"/>
                      <b:HelpBlock ui:field="taskFormDeploymentIdHelpLabel"/>
                    </b:Column>
                  </b:FormGroup>
                  <b:FormGroup ui:field="taskFormNameControlGroup">
                    <p:FormLabelHelp text="{i18n.Task_Form_Name}" addStyleNames="col-md-3"/>
                    <b:Column size="MD_9">
                      <b:ListBox ui:field="taskFormName"/>
                      <b:HelpBlock ui:field="taskFormNameHelpLabel"/>
                    </b:Column>
                  </b:FormGroup>
                </b:FieldSet>
              </b:Form>
            </b:Column>
          </b:Container>
        </b:TabPane>
      </b:TabContent>
    </b:TabPanel>

    <b:FormGroup ui:field="errorMessagesGroup">
      <b:HelpBlock ui:field="errorMessages"/>
    </b:FormGroup>

  </g:HTMLPanel>

</ui:UiBinder>
