<!--
 * Copyright (c) 2001, 2005, Oracle. All rights reserved.  
 *
 *      NAME
 *       dateTime.uix
 *
 *      NOTES
 *       (generic) date and time selection - used in cloneWiz
 *
 * MODIFIED (MM/DD/YY)  VERSION
 *    audupi 07/07/05 - 4467739 - Addition of maximum length for text-input 
 *    audupi 05/17/05 - 4253157 - TimeZone display change 
 *    kchias 02/04/03 - remove ^M
 *    kchias 02/03/03 - kchiasso_new_clonehome
 *
 *  @author  kChiasson
 *
-->

<dataScope  xmlns="http://bali.us.oracle.com/cabo/marlin"
            xmlns:uix="http://bali.us.oracle.com/cabo/marlin"
            xmlns:marlin="http://bali.us.oracle.com/cabo/marlin"
            xmlns:html="http://www.w3.org/TR/REC-html40"
            xmlns:data="http://bali.us.oracle.com/cabo/marlin">

  <provider>
    <data name="ResourceBundle">
       <bundle class = "oracle.sysman.eml.ecm.cloneHome.util.CloneHomeResourceBundle"/>
    </data>

    <data name="dateData">
        <method class="oracle.sysman.eml.ecm.DateTimeData" method="populateDateData"/>
    </data>

  </provider>     
  <contents>
  
<script>
<contents>
    // selectLater() in document.caller
</contents>
</script>


    <switcher uix:childName="status@dateData" childName="success">
    <case name="failure">
                <messageBox automatic="false"
                    uix:text="errHdr@dateData"
                    uix:message="errMsg@dateData"
                    messageType="error" />
    </case>
    <case name="success">
  

        <tableLayout>
        <contents>
        <rowLayout>
        <contents>
            <!-- IMMEDIATELY RADIO BUTTON -->
            <cellFormat hAlign="left">
            <contents>
            <radioButton 
                name="scheduleType" 
                value="now"
                uix:text="OPT_IMMED@ResourceBundle"
                uix:selected="nowSelect@dateData"
            />
            </contents>
            </cellFormat>
        </contents>
        </rowLayout>

        <rowLayout>
        <contents>
            <!-- LATER RADIO BUTTON -->
            <cellFormat hAlign="left">
            <contents>
            <radioButton 
                name="scheduleType" 
                value="later"
                uix:text="OPT_LATER@ResourceBundle"
                uix:selected="laterSelect@dateData"
            />
            </contents>
            </cellFormat>
        </contents>
        </rowLayout>

        <rowLayout>
        <contents>
            <!-- START DATE -->
            <cellFormat hAlign="right">
            <contents>
                <messagePrompt 
                    uix:prompt="LBL_DATE@ResourceBundle"
            />
            </contents>
            </cellFormat>
            <spacer width="3"/>
            <messageDateField
                    name="startDate"
                    uix:tip="tipStartDate@dateData"
                    uix:value="startDate@dateData"
                    onChange="javascript:selectLater();"
                    columns="24"
                    maximumLength="64">

            <onSubmitValidater>
                <date dateStyle="long" pattern="MMM-dd-yyyy"/>
            </onSubmitValidater>
            </messageDateField>
        </contents>
        </rowLayout>

        <rowLayout>
        <contents>
        <!-- START HOUR -->
            <cellFormat hAlign="right">
            <contents>
                <messagePrompt 
                    uix:prompt="LBL_TIME@ResourceBundle"/>
            </contents>
            </cellFormat>
            <spacer width="3"/>

            <flowLayout>
            <contents>
            <choice
                name="startHour"
                uix:selectedValue="startHourSelect@dateData"
                onChange="javascript:selectLater();">

             <contents>
                <option value="12" text="12"/>
                <option value="1" text="1"/>
                <option value="2" text="2"/>
                <option value="3" text="3"/>
                <option value="4" text="4"/>
                <option value="5" text="5"/>
                <option value="6" text="6"/>
                <option value="7" text="7"/>
                <option value="8" text="8"/>
                <option value="9" text="9"/>
                <option value="10" text="10"/>
                <option value="11" text="11"/>
             </contents>
            </choice>

            <!-- START MINUTE -->
            <choice 
                name="startMinute" 
                uix:selectedValue="startMinSelect@dateData"
                onChange="javascript:selectLater();">

             <contents>
                <option value="0" text="00"/>
                <option value="5" text="05"/>
                <option value="10" text="10"/>
                <option value="15" text="15"/>
                <option value="20" text="20"/>
                <option value="25" text="25"/>
                <option value="30" text="30"/>
                <option value="35" text="35"/>
                <option value="40" text="40"/>
                <option value="45" text="45"/>
                <option value="50" text="50"/>
                <option value="55" text="55"/>
             </contents>
            </choice>

            <!-- START AM/PM -->
            <radioButton
                name="startAMPM" 
                value="AM"
                uix:text="LBL_AM@ResourceBundle"
                uix:selected="AMSelect@dateData"
                onClick="javascript:selectLater();"/>
            <radioButton 
                name="startAMPM" 
                value="PM"
                uix:text="LBL_PM@ResourceBundle"  
                uix:selected="PMSelect@dateData"
                onClick="javascript:selectLater();"/>

            </contents>
            </flowLayout>
        </contents>
        </rowLayout>


        <!-- TIME ZONE -->
        <rowLayout>
        <contents>
            <spacer height="3"/>
        </contents>
        </rowLayout>

        <rowLayout>
        <contents>
            <cellFormat hAlign="right">
            <contents>
                <messagePrompt 
                    uix:prompt="LBL_TIMEZONE@ResourceBundle"/>
            </contents>
            </cellFormat>
            <spacer width="3"/>
            <choice 
                name="timeZone" 
                uix:selectedValue="tzSelect@dateData"
                onChange="javascript:selectLater();">
             <contents uix:childData="tzList@dateData">
                <option uix:text="tzName" uix:value="tzValue"/>
             </contents>
            </choice>
        </contents>
        </rowLayout>

        </contents>
        </tableLayout>

    </case>
    </switcher>

  </contents>
</dataScope>
