﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">

  <xsl:include href="../Version_2_0/PopUpHeader.xslt"/>

  <xsl:output method="xml" indent="yes"/>

  <xsl:template match="/">
    <xsl:variable name="PortalItemID" select="AjaxRequest/Params/PortalItemID"></xsl:variable>
    <xsl:variable name="SourceID" select="AjaxRequest/Params/SourceID"></xsl:variable>
    <xsl:variable name="TemplateURL" select="AjaxRequest/TemplateURL"></xsl:variable>
    <xsl:variable name="DestXML" select="AjaxRequest/DestXML/."></xsl:variable>
    <xsl:variable name="StepTypesXML" select="AjaxRequest/StepTypesXML/."></xsl:variable>


    <xsl:call-template name="PopUpHeader">
      <xsl:with-param name="ItemID" select="$PortalItemID"></xsl:with-param>
      <xsl:with-param name="TemplateURL" select="$TemplateURL"></xsl:with-param>
      <xsl:with-param name="HeaderText">
        <xsl:text>Add New Step</xsl:text>
      </xsl:with-param>
    </xsl:call-template>

    <table class="tableMaster" cellpadding="5" cellspacing="5">
      <tr>
        <td width="20%">
          <span class="packageTitle">Step</span>
        </td>
        <td width="80%">
          <input id="txtStep_{$PortalItemID}" type="text" style="width:200px;"></input>
        </td>
      </tr>
      <tr>
        <td width="20%">
          <span class="packageTitle">SeqNum</span>
        </td>
        <td width="80%">
          <input id="txtSeqNum_{$PortalItemID}" type="text" style="width:70px;"></input>
        </td>
      </tr>
      <tr>
        <td width="20%">
          <span class="packageTitle">StepType</span>
        </td>
        <td width="80%">
          <select class="smallDropdown" id="optStepType_{$PortalItemID}">
            <option value="-99">-Select-</option>
            <xsl:for-each select="$StepTypesXML/StepType">
              <option value="{StepTypeID}">
                <xsl:value-of select="StepType"></xsl:value-of>
              </option>
            </xsl:for-each>
          </select>
        </td>
      </tr>
      <tr>
        <td width="20%">
          <span class="packageTitle">SpToExec</span>
        </td>
        <td width="80%">
          <input id="txtSpToExec_{$PortalItemID}" type="text" style="width:200px;"></input>
        </td>
      </tr>
      <tr>
        <td>
          <span class="packageTitle">Description</span>
        </td>
        <td>
          <textarea id="txtdescription_{$PortalItemID}" style="width:350px;height:50px;"
                    onFocus="removeWhiteSpace('txtdescription_{$PortalItemID}');"></textarea>
        </td>
      </tr>

      <tr>
        <td></td>
        <td>
          <div class="verticallyMiddle onMouseOver divBrowseGradient spanBrowseGradientTextGray" style="width:70px;line-height:22px;"
           onmouseover="document.getElementById('img_AddSource').src='{$TemplateURL}Web/Images/Ver_2_0/icon_add_over.png';"
           onmouseout="document.getElementById('img_AddSource').src='{$TemplateURL}Web/Images/Ver_2_0/icon_Add.png';"
           onclick="SaveDataXSourceStep('{$SourceID}','{$PortalItemID}','txtStep_{$PortalItemID}','txtSeqNum_{$PortalItemID}','optStepType_{$PortalItemID}'
               ,'txtSpToExec_{$PortalItemID}','txtdescription_{$PortalItemID}');">
            <img id="img_AddSource" src="{$TemplateURL}Web/Images/Ver_2_0/icon_Add.png" align="absmiddle" style="padding-left:8px;" class="marginRight5"></img>
            <span id="span_saveSource" class="capitalFont">save</span>
          </div>
        </td>
      </tr>
    </table>
  </xsl:template>
</xsl:stylesheet>
