{form->fieldGroup 	fieldName		= "varValue" 
					group			= "attrOptionsGroup"
                    class="form-control"
					parentGroup		= "" 
                    validate		= "inputType->isnotequal->textbox~*inputType->isnotequal->textarea~*inputType->isnotequal->date~*inputType->isnotequal->datetime~*inputType->isnotequal->time~*inputType->isnotequal->file~*required"
					error			= $language.errAttrOptionValue}
                    
{form->fieldGroup 	fieldName		= "priceDiff" 
					group			= "attrOptionsGroup" 
					parentGroup		= "" 
                    class="form-control"
                    validate		= "inputType->isnotequal->textbox~*inputType->isnotequal->textarea~*inputType->isnotequal->date~*inputType->isnotequal->datetime~*inputType->isnotequal->time~*inputType->isnotequal->file~*required~*isPrice"
					error			= $language.errValidPrice}
                    
{form->fieldGroup 	fieldName		= "weightDiff" 
					group			= "attrOptionsGroup" 
					parentGroup		= "" 
                    class="form-control"
validate		= "inputType->isnotequal->textbox~*inputType->isnotequal->textarea~*inputType->isnotequal->date~*inputType->isnotequal->datetime~*inputType->isnotequal->time~*inputType->isnotequal->file~*required~*isPrice"
					error			= $language.errValidWeight}
                    
{assign var="numRows" value=$resAttributeOptions|default:''|count}
<div class="grid_table00 {if $numRows eq 0} hide {/if}" id="optionGrid">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tableElm" class="dragdrop-table-border">
    <tr class="nodrag nodrop">
      <th align="left" valign="middle">{$language.lblValue}</th>
      <th align="left" valign="middle" width="20%" class="priceSect">{$language.lblPrice}</th>
      <th align="left" valign="middle" width="20%" class="priceSect">{$language.lblWeight}</th>  
      {if $resAttributeEdit.inputType|default:'' neq 'multiselect'} 
	  <th align="left" class="variant_image" valign="middle" width="10%">
		   <span class="cmn-tooltip pos-rel">{$language.lblThumbnail}<span class="icon-question"></span> <span class="help">{$language.lblMaximumFileSize} {$FILE_UPLOAD_LIMIT}, {$language.lblFileTypes} {$VALID_IMAGE_FILES}</span></span></th>{/if}    
      <th align="left" valign="middle" width="10%">{$language.lblIsDefault}</th>
      <th align="left" valign="middle"  width="20"></th>
    </tr>
    {assign var="attrOptionCount" value="0"}
    {if $resAttributeOptions|default:''} 
    {foreach from=$resAttributeOptions item="attributeOptions"}
    {assign var="attrOptionCount" value=$attrOptionCount+1} 
	{if $attributeOptions.is_delete|default:''}
	{assign var="setIsDelete" value=$attributeOptions.is_delete} 
	{else}
	{assign var="setIsDelete" value="0"} 
	{/if}
    <tr class="attributeOptionRow {if $setIsDelete eq '1'} hide {/if} saved" id="attributeOptionRow_{$attrOptionCount}">
    <td align="left" valign="top">
{form->hidden name="attrOptionsGroup[{$attrOptionCount}][sortOrder]" value=$attributeOptions.sortOrder}
	{form->hidden 	name			= "attrOptionsGroup[{$attrOptionCount}][customOptionVariantID]" 
    				value			= $attributeOptions.customOptionVariantID} 		
	{form->hidden 	name			= "attrOptionsGroup[{$attrOptionCount}][is_delete]" 
    				class			= "attributeOptionsRows"
    				value			= $setIsDelete}                       
  	{form->textbox 	name			= "attrOptionsGroup[{$attrOptionCount}][varValue]" 
    				error_class		= "message_inline_validation"
                    class			= "form-control"  
                    form			= "formAttributeAdd" 
                    value			= $attributeOptions.value|default:''|html_entity_decode                    
                    maxlength		= "255" 
                    rel				= "attrOptionsGroup_{$attrOptionCount}_is_delete"  
                    fieldName		= "varValue" 
					group			= "attrOptionsGroup"
                    row				= $attrOptionCount}
   </td>
  <td align="left" valign="top" class="priceSect">
    <span class="small-field">
  	{form->textbox 	name			= "attrOptionsGroup[{$attrOptionCount}][priceDiff]" 
                    class			= "form-control"
                    form			= "formAttributeAdd" 
                    value			= $attributeOptions.priceDiff|escape
					
                    fieldName		= "priceDiff" 
					group			= "attrOptionsGroup"
                    row				= $attrOptionCount} 
    </span> 
  	{form->select 	name			= "attrOptionsGroup[{$attrOptionCount}][priceDiffType]" 
    				class			= "grid-select form-control" 
    				error_class		= "message_inline_validation"   
                    form			= "formAttributeAdd" 
					
                    fieldName		= "priceDiffType" 
					group			= "attrOptionsGroup"
                    value			= $attributeOptions.priceDiffType|escape
                    options			="N->{$language.lblNone}~*I->{$language.lblIncrease}"
                    row				= $attrOptionCount}
   
  </td>
  <td align="left" valign="top" class="priceSect">
     <span class="small-field">
    	{form->textbox 	name			= "attrOptionsGroup[{$attrOptionCount}][weightDiff]"  
    				class			= "form-control"  
    				error_class		= "message_inline_validation" 
                    form			= "formAttributeAdd" 
				
                    value			= $attributeOptions.weightDiff|escape
                    fieldName		= "weightDiff" 
					group			= "attrOptionsGroup"
                    row				= $attrOptionCount} 
     </span>
  	{form->select 	name			= "attrOptionsGroup[{$attrOptionCount}][weightDiffType]"
    				class			= "form-control grid-select"
                    error_class		= "message_inline_validation" 
                    form			= "formAttributeAdd"
                    value			= $attributeOptions.weightDiffType|escape
                    fieldName		= "weightDiffType"
                    options			="N->{$language.lblNone}~*I->{$language.lblIncrease}"
					group			= "attrOptionsGroup"
                    row				= $attrOptionCount} 
  </td>{form->hidden name="no_image_path" value="{$view_images}/thumbnail.gif"}
   {if $attributeOptions.inputType|default:'' eq 'select'}  
    <td align="center" valign="top"> {if $productReqID} 
                  {assign var="varImageLoc" value="catalog-request"}                  
                  {else}                  
                  {assign var="varImageLoc" value="catalog"} 
                  {/if}	
<div class="thumb-image2 grid-upload-img thumb-image_{$attrOptionCount}">
{form->upload_image  message_delete="{$language.lblmsgdeleteImg}" icon="icon-img-upload.png"
name="OptionVariantThumb_"|cat:$attrOptionCount
path="uploads/{$varImageLoc}/custom-option-variant/"
file= $attributeOptions.variantThumbImage|default:''
form="formAttributeAdd" width="77" validate="isImage"
error=$language.errValidImage} 
</div>       
    </td>{/if}
    <td align="center" valign="top"> 
    {if $attributeOptions.isDefault|default:''==1}
    {assign var="isDefaultCheckboxChecked" value="checked"} 
    {else}
    {assign var="isDefaultCheckboxChecked" value=""}  
    {/if}
  {form->checkbox name="attrOptionsGroup[{$attrOptionCount}][isDefault]"  class="isDefaultCheckbox" checked=$isDefaultCheckboxChecked value="1"}
        <label for="attrOptionsGroup_{$attrOptionCount}_isDefault"></label></td>
  <td align="center"  valign="top" width="20">
  {html->anchor id="{$attributeOptions.customOptionVariantID}" rel="attrOptionsGroup_{$attrOptionCount}_is_delete" title="{$language.lblDelete}"  content=""  class="delete03 icon-close deleteRow"} 
   </td>    
    </tr>
    {/foreach}
    {/if}
    <tr class="nodrag nodrop hide" id="attroptions_loader">
      <td colspan="7" align="center"><img src="{$view_images}/loader-1.gif" /></td>
    </tr>
  </table>
</div>
{html->anchor class="btn btn-primary btn-sm pull-right margin-top forSelectType" href="" id="add_new_options" content="<span class='plus-v'></span><span class='plus-h'></span> {$language.lblAddNew}"}  

{form->hidden name="attrOptionAddCount" value=$attrOptionCount}
{if $customOptionID|default:'' > 0}
{assign var="currentAction" value="edit"} 
{else}
{assign var="currentAction" value="new"} 
{/if}
{form->hidden name="attributeMode" value=$currentAction}
{form->validate_script form="formAttributeAdd"}
