<?php /* Smarty version Smarty-3.1.8, created on 2020-01-09 16:20:58
         compiled from "/home/agmc/public_html/beta/application/core/views/manage/standard/ProductCustomOptionAjax.tpl" */ ?>
<?php /*%%SmartyHeaderCode:14377055655e171aaa134759-83834223%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'd1fcb52a6e0dc0bb91c6844953f6ebddf3372031' => 
    array (
      0 => '/home/agmc/public_html/beta/application/core/views/manage/standard/ProductCustomOptionAjax.tpl',
      1 => 1577772526,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '14377055655e171aaa134759-83834223',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'view_javascript' => 0,
    'common_js' => 0,
    'productRequestID' => 0,
    'productID' => 0,
    'language' => 0,
    'resUserLevelAttributes' => 0,
    'resAttributesUser' => 0,
    'customOptionID' => 0,
    'resAtrributeInputTypes' => 0,
    'classtext' => 0,
    'editAttributeURL' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_5e171aaa194460_42523145',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5e171aaa194460_42523145')) {function content_5e171aaa194460_42523145($_smarty_tpl) {?><script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['view_javascript']->value;?>
/jquery.colorbox.js"></script> 
<script src="<?php echo $_smarty_tpl->tpl_vars['common_js']->value;?>
/validate.plugin.js"></script>
<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->start(array('name'=>"formCustomOptionAdd",'action'=>'','method'=>"post",'enctype'=>"multipart/form-data",'rel'=>"custom-option-save"),$_smarty_tpl);?>

<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"setDefaultRequired",'value'=>"1",'validate'=>"required"),$_smarty_tpl);?>

<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->validate(array('name'=>"validatesetDefaultRequired",'validate'=>"setDefaultRequired->isequal->1~*setDefaultRequired->required",'error'=>"Error"),$_smarty_tpl);?>

<?php if ($_smarty_tpl->tpl_vars['productRequestID']->value){?>
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['productRequestID']->value;?>
<?php $_tmp1=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["userAttrImportURL"] = new Smarty_variable((('product/importglobaloption/productRequestID/').($_tmp1)).('/'), null, 0);?>
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['productRequestID']->value;?>
<?php $_tmp2=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["userAddAttributeURL"] = new Smarty_variable((('productoption/new/productRequestID/').($_tmp2)).('/scope/user/'), null, 0);?>
<?php }elseif($_smarty_tpl->tpl_vars['productID']->value){?>
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['productID']->value;?>
<?php $_tmp3=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["userAttrImportURL"] = new Smarty_variable((('product/importglobaloption/productID/').($_tmp3)).('/'), null, 0);?>
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['productID']->value;?>
<?php $_tmp4=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["userAddAttributeURL"] = new Smarty_variable((('productoption/ajaxproductoptionadd/productID/').($_tmp4)).('/'), null, 0);?>
<?php }?>
<h3><span><?php echo $_smarty_tpl->tpl_vars['language']->value['lblCustomOptions'];?>
</span></h3>

<?php if (count($_smarty_tpl->tpl_vars['resUserLevelAttributes']->value)>0){?>  
    <div class="grid_table01 custom-option-grid">
    <table width="100%" cellspacing="0" cellpadding="0" border="0" id="userLevelCustomAttr" class="customAttributePriority">
    <tbody>              
    <tr class="nodrag nodrop">
    <th align="left" valign="middle"><?php echo $_smarty_tpl->tpl_vars['language']->value['lblName'];?>
</th>   
    <th align="left" valign="middle"  width="30%"><?php echo $_smarty_tpl->tpl_vars['language']->value['lblInputType'];?>
</th>
    <th width="65">&nbsp;</th>
    </tr>
    <?php  $_smarty_tpl->tpl_vars["resAttributesUser"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["resAttributesUser"]->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['resUserLevelAttributes']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["resAttributesUser"]->key => $_smarty_tpl->tpl_vars["resAttributesUser"]->value){
$_smarty_tpl->tpl_vars["resAttributesUser"]->_loop = true;
?>   
    <?php $_smarty_tpl->tpl_vars["customOptionID"] = new Smarty_variable($_smarty_tpl->tpl_vars['resAttributesUser']->value['customOptionID'], null, 0);?>
    <?php if ($_smarty_tpl->tpl_vars['productRequestID']->value){?>
    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['productRequestID']->value;?>
<?php $_tmp5=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["editAttributeURL"] = new Smarty_variable((((('attribute/edit/productRequestID/').($_tmp5)).('/custid/')).($_smarty_tpl->tpl_vars['customOptionID']->value)).('/'), null, 0);?>
    <?php }elseif($_smarty_tpl->tpl_vars['productID']->value){?>        
    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['productID']->value;?>
<?php $_tmp6=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["editAttributeURL"] = new Smarty_variable((((('productoption/ajaxproductoptionedit/productID/').($_tmp6)).('/id/')).($_smarty_tpl->tpl_vars['customOptionID']->value)).('/'), null, 0);?>
    <?php }?>
    <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->hidden(array('name'=>"customAttributes[".($_smarty_tpl->tpl_vars['customOptionID']->value)."][priority]",'value'=>(($tmp = @$_smarty_tpl->tpl_vars['resAttributesUser']->value['attributePriority'])===null||$tmp==='' ? '' : $tmp)),$_smarty_tpl);?>
 
    <tr id="<?php echo $_smarty_tpl->tpl_vars['customOptionID']->value;?>
" class="customAttributePriorityRows">
    <td align="left" valign="top"><?php echo $_smarty_tpl->tpl_vars['resAttributesUser']->value['customOptionName'];?>
<?php if ($_smarty_tpl->tpl_vars['resAttributesUser']->value['isGlobal']==1){?>(Global)<?php }?></td>        
    <td align="left" valign="top"><?php echo $_smarty_tpl->tpl_vars['resAtrributeInputTypes']->value[$_smarty_tpl->tpl_vars['resAttributesUser']->value['inputType']];?>
</td>
    <td align="left" valign="top"> 
    <?php if ($_smarty_tpl->tpl_vars['resAttributesUser']->value['status']=='A'){?> 
    <?php $_smarty_tpl->tpl_vars["classtext"] = new Smarty_variable("status-active hide-txt customOptionStatus icon-set", null, 0);?> 
    <?php }else{ ?> 
    <?php $_smarty_tpl->tpl_vars["classtext"] = new Smarty_variable("status-inactive hide-txt customOptionStatus icon-set", null, 0);?> 
    <?php }?>
    <?php ob_start();?><?php if ($_smarty_tpl->tpl_vars['resAttributesUser']->value['status']=='A'){?><?php echo " ";?><?php echo $_smarty_tpl->tpl_vars['language']->value['lblActive'];?><?php echo " ";?><?php }else{ ?><?php echo " ";?><?php echo $_smarty_tpl->tpl_vars['language']->value['lblInactive'];?><?php echo " ";?><?php }?><?php $_tmp7=ob_get_clean();?><?php ob_start();?><?php if ($_smarty_tpl->tpl_vars['resAttributesUser']->value['status']=='A'){?><?php echo " ";?><?php echo $_smarty_tpl->tpl_vars['language']->value['lblActive'];?><?php echo " ";?><?php }else{ ?><?php echo " ";?><?php echo $_smarty_tpl->tpl_vars['language']->value['lblInactive'];?><?php echo " ";?><?php }?><?php $_tmp8=ob_get_clean();?><?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->anchor(array('href'=>'','type'=>($_smarty_tpl->tpl_vars['resAttributesUser']->value['inputType']),'class'=>($_smarty_tpl->tpl_vars['classtext']->value),'customOptionID'=>($_smarty_tpl->tpl_vars['customOptionID']->value),'title'=>$_tmp7,'content'=>$_tmp8),$_smarty_tpl);?>

    <?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->anchor(array('href'=>$_smarty_tpl->tpl_vars['editAttributeURL']->value,'class'=>"icon-set edit02 editCustomAttributes",'title'=>($_smarty_tpl->tpl_vars['language']->value['lblEdit'])." ".($_smarty_tpl->tpl_vars['language']->value['lblCustomOption'])),$_smarty_tpl);?>
                
    <?php ob_start();?><?php if ($_smarty_tpl->tpl_vars['resAttributesUser']->value['isGlobal']){?><?php echo " 1 ";?><?php }else{ ?><?php echo " 0 ";?><?php }?><?php $_tmp9=ob_get_clean();?><?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->anchor(array('rel'=>$_tmp9,'title'=>($_smarty_tpl->tpl_vars['language']->value['lblDelete']),'customOptionID'=>($_smarty_tpl->tpl_vars['customOptionID']->value),'type'=>($_smarty_tpl->tpl_vars['resAttributesUser']->value['inputType']),'class'=>"icon-set delete02 customOptionDelete"),$_smarty_tpl);?>
  
    </td>
    </tr>
    <?php } ?>
    </tbody>
    </table>
    </div>	            
<?php }else{ ?>
<div class="message_info"> <?php echo $_smarty_tpl->tpl_vars['language']->value['msgNoRecords'];?>
</div>
<?php }?>
<div class="clear"></div>
<?php if (count($_smarty_tpl->tpl_vars['resUserLevelAttributes']->value)>0){?> 
<div id="custom-option-save-section" class="save-floating-section">
<div class="cm-buttons-floating">
  <div class="submit-position"> 
  <?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->submit(array('name'=>"submitOptionDetails",'id'=>"submitOptionDetails",'class'=>"button03 curve-3",'value'=>($_smarty_tpl->tpl_vars['language']->value['lblSavepriority'])),$_smarty_tpl);?>
                
  <?php echo $_smarty_tpl->tpl_vars['language']->value['lblOr'];?>
<?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->anchor(array('href'=>"product/index/",'content'=>$_smarty_tpl->tpl_vars['language']->value['lblCancel']),$_smarty_tpl);?>
 </div>
</div>
<div class="cm-buttons"></div>
</div>
<?php }?>
<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->close(array(),$_smarty_tpl);?>

<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->validate_script(array('form'=>"formCustomOptionAdd"),$_smarty_tpl);?>

<script type="text/javascript">

$(document).ready(function () {
	$(".importGlobalAttributes").colorbox({iframe:true,width:"60%", height:"60%"});		
	$(".addCustomAttributes").colorbox({iframe:true,width:"90%", height:"80%",onClosed:function(){ reloadCustomOptions(); }});		
	$(".editCustomAttributes").colorbox({iframe:true,width:"90%", height:"80%"});		
});

</script><?php }} ?>