RCCWP_ManagementPage::AssignCustomWritePanel PHP Method

AssignCustomWritePanel() public method

    function AssignCustomWritePanel()
    {
        global $mf_domain;
        $postId = (int) $_GET['assign-custom-write-panel'];
        $customWritePanels = RCCWP_CustomWritePanel::GetCustomWritePanels();
        $customWritePanelOptions = RCCWP_Options::Get();
        $message = 'The Post that you\'re about to edit is not associated with any Custom Write Panel.';
        ?>
		
		<div id="message" class="updated"><p><?php 
        _e($message);
        ?>
</p></div>
		
		<div class="wrap">
		<h2><?php 
        _e('Assign Custom Write Panel');
        ?>
</h2>
		
		<form action="" method="post" id="assign-custom-write-panel-form">
		
		<table class="optiontable">
		<tbody>
		<tr valign="top">
			<th scope="row"><?php 
        _e('Custom Write Panel', $mf_domain);
        ?>
:</th>
			<td>
				<select name="custom-write-panel-id" id="custom-write-panel-id">
					<option value=""><?php 
        _e('(None)', $mf_domain);
        ?>
</option>
				<?php 
        $defaultCustomWritePanel = $customWritePanelOptions['default-custom-write-panel'];
        foreach ($customWritePanels as $panel) {
            $selected = $panel->id == $defaultCustomWritePanel ? 'selected="selected"' : '';
            ?>
					<option value="<?php 
            echo $panel->id;
            ?>
" <?php 
            echo $selected;
            ?>
><?php 
            echo $panel->name;
            ?>
</option>
				<?php 
        }
        ?>
				</select>
			</td>
		</tr>
		</tbody>
		</table>
		
		<input type="hidden" name="post-id" value="<?php 
        echo $postId;
        ?>
" />
		<p class="submit" >
			<input name="edit-with-no-custom-write-panel" type="submit" value="<?php 
        _e("Don't Assign Custom Write Panel", $mf_domain);
        ?>
" />
			<input name="edit-with-custom-write-panel" type="submit" value="<?php 
        _e('Edit with Custom Write Panel', $mf_domain);
        ?>
" />
		</p>
		
		</form>
		
		</div>
		
		<?php 
    }