if ($profile->getId() != 0) { echo $profile->getId(); } ?> ' /> <input id='mm-enable-initial-commission' type='hidden' /> <input id='mm-enable-rebill-commissions' type='hidden' /> <input id='mm-limit-rebill-commissions' type='hidden' /> <input id='mm-enable-reverse-commissions' type='hidden' /> <input id='mm-rebill-commission-type' type='hidden' /> <table cellspacing="10"> <tr> <td width="135">Name*</td> <td><input id="mm-display-name" type="text" style="width:100%;" value='<?php echo htmlentities($profile->getName(), ENT_QUOTES, 'UTF-8', true); ?> '/></td> </tr> <tr> <td>Description</td> <td> <textarea id="mm-description" name='description' style="width:100%;"><?php echo $profile->getDescription(); ?> </textarea> </td> </tr> <tr>
} if ($profile->doReverseCommissions()) { $doReverseCommissions = MM_Utils::getCheckIcon(); } else { $doReverseCommissions = MM_Utils::getCrossIcon(); } // Actions $editActionUrl = 'onclick="mmjs.edit(\'mm-commission-profiles-dialog\', \'' . $item->id . '\')"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->id . '\')"'; $actions = MM_Utils::getEditIcon("Edit Commission Profile", '', $editActionUrl); if (!$profile->hasAssociations()) { $actions .= MM_Utils::getDeleteIcon("Delete Commission Profile", 'margin-left:5px;', $deleteActionUrl); } else { $actions .= MM_Utils::getDeleteIcon("This commission profile is currently being used and cannot be deleted", 'margin-left:5px;', '', true); } $rows[] = array(array('content' => $defaultFlag . " <span title='ID [" . $item->id . "]'>" . $profile->getName() . "</span>"), array('content' => $initialCommission), array('content' => $rebillCommissions), array('content' => $doReverseCommissions), array('content' => $actions)); } $headers = array('name' => array('content' => '<a onclick="mmjs.sort(\'name\');" href="#">Name</a>'), 'initial_commission_enabled' => array('content' => '<a onclick="mmjs.sort(\'initial_commission_enabled\');" href="#">Initial Commission</a>'), 'rebill_commissions_enabled' => array('content' => '<a onclick="mmjs.sort(\'rebill_commissions_enabled\');" href="#">Rebill Commissions</a>'), 'do_reverse_commissions' => array('content' => '<a onclick="mmjs.sort(\'do_reverse_commissions\');" href="#">Cancel Commissions</a>'), 'actions' => array('content' => 'Actions')); $dataGrid->setHeaders($headers); $dataGrid->setRows($rows); $dataGrid->width = "85%"; $dgHtml = $dataGrid->generateHtml(); if ($dgHtml == "") { $dgHtml = "<p><i>No commission profiles.</i></p>"; } ?> <div class="mm-wrap"> <div class="mm-button-container"> <a onclick="mmjs.create('mm-commission-profiles-dialog')" class="mm-ui-button green"><?php echo MM_Utils::getIcon('plus-circle', '', '1.2em', '1px');