Exemple #1
0
function renderFieldOption($optionId, $affiliateId, $profileId)
{
    ?>
	<div id="mm-partner-container-<?php 
    echo $optionId;
    ?>
">
	<input id="mm-partner-<?php 
    echo $optionId;
    ?>
" type="text" size="15" class="field-option" value="<?php 
    echo $affiliateId;
    ?>
" />
	<select id='mm-commission-profile-<?php 
    echo $optionId;
    ?>
'>
		<option value="<?php 
    MM_CommissionProfile::$DFLT_COMMISSION_PROFILE_ID;
    ?>
" <?php 
    echo $profileId == MM_CommissionProfile::$DFLT_COMMISSION_PROFILE_ID ? "selected" : "";
    ?>
>
			&mdash; Use system default &mdash;
		</option>
		<?php 
    echo MM_HtmlUtils::getCommissionProfilesList($profileId);
    ?>
	</select>
	<a href="javascript:mmjs.addFieldOption('<?php 
    echo htmlentities(MM_Utils::getIcon('plus-circle', 'green', '1.2em', '1px'), ENT_QUOTES);
    ?>
', '<?php 
    echo htmlentities(MM_Utils::getIcon('trash-o', 'red', '1.2em', '1px'), ENT_QUOTES);
    ?>
');"><?php 
    echo MM_Utils::getIcon('plus-circle', 'green', '1.2em', '1px');
    ?>
</a>
		
	<?php 
    if ($optionId > 1) {
        ?>
	<a href="javascript:mmjs.removeFieldOption('mm-partner-container-<?php 
        echo $optionId;
        ?>
');"><?php 
        echo MM_Utils::getIcon('trash-o', 'red', '1.2em', '1px');
        ?>
</a>
	<?php 
    }
    ?>
	</div>
<?php 
}