<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$language.lblBusiness}: {$language.lblManageAttributes}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/grid_listing.css" />
<link href="{$view_styles}/right-menu.css" rel="stylesheet" type="text/css" />
{include file='CommonCustomStyles.tpl'}
{form->rootpath_script}
{form->basepath_script}
</head>
<body class="{$languageDirection}">
<div class="outer_container"> {include file='CommonHeader.tpl'} 
  <!--End:Header Container--> 
  <!--***********************************************************************END HEADER CONTAINER******************************************************-->
  <div class="content_container2 clearfix">
    <div class="right-sidebar">
      <div class="side_wrapper"> {html->anchor href="productoption/new/" title="Add Option" class="custom-btnt" content="<span class='plus-v'></span> <span class='plus-h'></span><strong>Add Option</strong>"} 
        {include file='CustomOptionRightLinks.tpl'} </div>
    </div>
    <!--End: Right Block-->
    <div class="left_wrapper">
      <div class="content_wrapper">
        <h2>{$language.lblManageOptions}</h2>
        <div id="common_message"></div>
        {if $resListCustomOptions|@count>0 || $customOptionName!='' || $status!=''}
        <div class="search_container">
          <div class="inner"> {form->start name="formOptionSearch" action="" method="post"}
            <ul class="clearfix">
              <li class="column">
                <p class="label-field01">{$language.lblName}</p>
                <span class="form-field01">{form->textbox name="customOptionName"  class="textbox"}</span>
              </li>
              <li class="column">
                <p class="label-field01">{$language.lblStatus}</p>
                <span class="form-field01">{form->select caption="->{$language.lblSelect}" class="select-box" name="status" 
				options="A->{$language.lblActive}~*I->{$language.lblInactive}" 
				caption="->{$language.lblSelect}"}</span>
              </li> 
              <li class="column">
                <p class="label-field01">&nbsp;</p>
                <span class="form-field01">{form->submit name="submitSearch" class="button01" value="{$language.lblSearch}"}                   
                  {html->anchor href="/productoption/" caption=$language.lblListAll  class="action-link"}</span>
              </li>              
            </ul>            
            {form->close}
            <div class="clear"></div>
          </div>
        </div>
        {/if}
        {if $resListCustomOptions|@count>0}		
        <div class="clear"></div> 
        {include file='ContentLanguageOptions.tpl'} 
        <div class="clear"></div>               
        <div class="grid_table00"> {form->start name="formOption" action="" method="post"}
          <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tableElm" class="dragdrop-table-border">
            <tr class="nodrag nodrop">
              <th align="left" valign="middle"  class="checkbox_column" width="35"> <div class="chekingdiv">
                  <ul>
                    <li> {form->checkbox id="ListStatusLinkCheckbox"  class="fixing_left" tabindex="1"} 
                      {html->anchor href="" id="ListStatusLink" class="status-arw fixing_left"}
                      <ul id="ListStatusSelection"  class="check_status">
                        <li> {html->anchor href="" rel="ListActive" content="{$language.lblActive}"}</li>
                        <li> {html->anchor href="" rel="ListInactive"  content="{$language.lblInactive}"}</li>
                        <li> {html->anchor href="" rel="ListAll"  content="{$language.lblSelectAll}"}</li>
                      </ul>
                    </li>
                  </ul>
                </div></th>   
              {if $sortkey=="asc"}
              {assign var="sortimg" value="sortdesc"} 
              {else}  
              {assign var="sortimg" value="sortasc"}
              {/if}
              {if $sortkey1=="asc" }
              {assign var="sortimg1" value="sortdesc"} 
              {else}  
              {assign var="sortimg1" value="sortasc"}
              {/if}
              {if $sortkey2=="asc"}
              {assign var="sortimg2" value="sortdesc"} 
              {else}  
              {assign var="sortimg2" value="sortasc"}
              {/if} 
              <th align="left" valign="middle">Option Name</th>              
              <th align="left" valign="middle" width="30%">{$language.lblInputType}</th>
              <th align="left" valign="middle" width="10%" >{$language.lblRequired}</th>
              <th align="left" valign="middle"  width="65">&nbsp;</th>
            </tr>
            {foreach from=$resListCustomOptions item="resOptions"}
            {assign var="customOptionID" value=$resOptions.customOptionID}
            <tr id="{$customOptionID}">
            <td align="left" valign="top" class="checkbox_column"> {form->checkbox name="check_$customOptionID" name="checkcustomOptionIDs[]" value=$customOptionID class="checkbox01 ListAll List"|cat :{$resOptions.status}}</td>
           
            <td align="left" valign="top">{$resOptions.customOptionName}</td>            
            <td align="left" valign="top">{$resAtrributeInputTypes[$resOptions.inputType]}</td>
            <td align="left" valign="top">{if $resOptions.validateRule|strstr:"required"}{$language.lblAlertYes}{else}{$language.lblAlertNo}{/if}</td>
	    <td align="left" valign="top">
            {if $resOptions.status=='A'} 
            {assign var="classtext" value="status-active hide-txt icon-set"} 
            {else} 
            {assign var="classtext" value="status-inactive hide-txt icon-set"} 
            {/if}
            {html->anchor href="" class="{$classtext}"  customOptionID="{$customOptionID}" title="{if $resOptions.status == 'A'} {$language.lblActive} {else} {$language.lblInactive} {/if}"}
            {html->anchor href="productoption/edit/id/$customOptionID/" title="{$language.lblEdit}" class="edit02 icon-set"}                
            {html->anchor onclick="delsubconfirm($customOptionID);" title="{$language.lblDelete}" class="delete02 icon-set"}  
            </td>
            </tr>
            {/foreach}
          </table>
        </div>
        <div class="action_box" > {form->select class="select-box width-auto" name="changeStatus" options="->{$language.lblDonotchange}~*A->{$language.lblActive} ~*I->{$language.lblInactive}~*D->{$language.lblDelete}"}      {form->submit name="submitBulkStatus" id="submitBulkStatus"  class="update_btn_table button04" value="{$language.lblUpdate}"} </div>
	  <div class="clear"></div>
        {else}
	<div id="common_message"  class="message_info"> {$language.msgNoRecords}</div>
        {/if}
      </div>
    </div>
  </div>
  {include file='CommonBottom.tpl'} </div>
{html->messages_script id="common_message"}
{include file='CommonJavaScriptBottom.tpl'} 
<script type="text/javascript">
var lblSelectItem ="{$language.lblSelectItem}";
var msgSelectAStatus ="{$language.msgSelectAStatus}";
var statusChange="{$language.msgCustomOptionStatus}";
var msgConfirmDelete="{$language.lblCustomOptionDeleted}";
var okText	=	"{$language.lblOK}";
var AlertText= "{$language.lblAlert}";
var cancelText = "{$language.lblCancel}";	
var lblAlertOk="{$language.lblAlertOk}";
var lblAlertCancel="{$language.lblAlertCancel}";
var lblAlertYes="{$language.lblAlertYes}";
var lblAlertNo="{$language.lblAlertNo}";
var lblAlert="{$language.lblAlert}";
var msgSelectSearchCriteria ='{$language.msgSelectSearchCriteria}';
var enablePriority = '{$enablePriority}';
</script> 
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/jquery.tablednd.js"></script>
<script type="text/javascript" src="{$view_javascript}/CustomOption.page.js"></script>  
<script type="text/javascript">
{literal}
$(document).ready(function(){	
if(enablePriority=='1')
{
	$("#tableElm").tableDnD({
		onDragClass: "myDragClass",
		onDrop: function(table, row) {
		var	Order	=	escape($.tableDnD.serialize());		
		Order	=	Order.replace(/tableElm%5B%5D%3D/g,'');
		Order	=	Order.replace(/%26/g,'|');
		saveListOrder(Order);
		}		
	});
}
});
{/literal}
</script>
</body>
</html>
