New status fields.

git-svn-id: http://svn.automattic.com/wordpress/trunk@143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt
2003-06-01 14:49:30 +00:00
parent 96459f6958
commit 290ac10686
3 changed files with 79 additions and 24 deletions

View File

@@ -1,6 +1,10 @@
<div class="wrap">
<?php
function selected($selected, $current) {
if ($selected == $current) echo ' selected="selected"';
}
switch($action) {
case 'post':
$submitbutton_text = 'Blog this!';
@@ -48,18 +52,38 @@ switch($action) {
<?php if ($action != "editcomment") {
// this is for everything but comment editing
?>
<table>
<tr>
<td width="210">
<label for="title">Title:</label><br />
<input type="text" name="post_title" size="25" tabindex="1" style="width: 190px;" value="<?php echo $edited_post_title; ?>" id="title" />
<table>
<tr>
<td width="210"> <label for="title">Title:</label> <br /> <input type="text" name="post_title" size="25" tabindex="1" style="width: 190px;" value="<?php echo $edited_post_title; ?>" id="title" />
</td>
<td>
<label for="category">Category :</label>
<br /><?php dropdown_categories(); ?>
<td> <label for="category">Category :</label> <br />
<?php dropdown_categories(); ?>
</td>
</tr>
</table>
<td><label for="post_status">Post Status:</label><br />
<select name="post_status" id="post_status">
<option value="publish"<?php selected($post_status, 'publish'); ?>>Publish</option>
<option value="draft"<?php selected($post_status, 'draft'); ?>>Draft</option>
<option value="private"<?php selected($post_status, 'private'); ?>>Private</option>
</select> </td>
<td><label for="comment_status">Comments:</label><br />
<select name="comment_status" id="comment_status">
<option value="open"<?php selected($comment_status, 'open'); ?>>Open</option>
<option value="closed"<?php selected($comment_status, 'closed'); ?>>Closed</option>
</select> </td>
<td><label for="ping_status">Pings:</label><br />
<select name="ping_status" id="ping_status">
<option value="open"<?php selected($ping_status, 'open'); ?>>Open</option>
<option value="closed"<?php selected($ping_status, 'open'); ?>>Closed</option>
</select></td>
<td><label for="post_password">Post Password:</label>
<br />
<input name="post_password" type="text" id="post_password" value="<?php echo $post_password ?>" /> </td>
</tr>
</table>
<?php
} else {
@@ -134,7 +158,8 @@ echo $form_trackback;
if ($user_level > 4) {
touch_time(($action == 'edit'));
}
if ('edit' == $action) echo "
<p><a href='b2edit.php?action=delete&amp;post=$post' onclick=\"return confirm('You are about to delete this post \'".$edited_post_title."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete this post</a></p>";
?>
</form>
</div>