WordPress.org

Make WordPress Core

Changeset 9637


Ignore:
Timestamp:
11/12/2008 06:03:07 PM (10 years ago)
Author:
ryan
Message:

First cut of edit link save box restyling. see #8143

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-link-form.php

    r9620 r9637  
    5959<div class="submitbox" id="submitlink">
    6060
    61 <div class="inside-submitbox">
    62 <div  class="insidebox"><label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label></div>
    63 </div>
    64 
    65 <p class="submit">
    66 <input type="submit" class="button button-highlighted" name="save" value="<?php _e('Save'); ?>" tabindex="4" />
    67 
     61<div id="minor-publishing">
     62
     63<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
     64<div style="display:none;">
     65<input type="submit" name="save" value="<?php echo attribute_escape( __('Save') ); ?>" />
     66</div>
     67
     68<div id="minor-publishing-actions">
     69<div id="preview-action">
    6870<?php if ( !empty($link->link_id) ) { ?>
    69 <a class="preview button" href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a>
     71    <a class="preview button" href="<?php echo $link->link_url; ?>" target="_blank" tabindex="4"><?php _e('Visit Link'); ?></a>
    7072<?php } ?>
    71 
    72 <?php
    73 if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('manage_links') )
    74     echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id) . "' onclick=\"if ( confirm('" . js_escape( sprintf( __("You are about to delete this link '%s'\n'Cancel' to stop, 'OK' to delete."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;link') . "</a>";
    75 ?>
    76 </p>
     73</div>
     74<div class="clear"></div>
     75</div>
     76
     77<div id="misc-publishing-actions">
     78<div class="misc-pub-section misc-pub-section-last">
     79    <label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label>
     80</div>
     81</div>
     82
     83</div>
     84
     85<div id="major-publishing-actions">
     86<?php do_action('post_submitbox_start'); ?>
     87<div id="delete-action">
     88<?php
     89if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('manage_links') ) { ?>
     90    <a class="submitdelete deletion" href="<?php echo wp_nonce_url("link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id); ?>" onclick="if ( confirm('<?php echo js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete."), $link->link_name )); ?>') ) {return true;}return false;"><?php _e('Delete'); ?></a>
     91<?php } ?>
     92</div>
     93
     94<div id="publishing-action">
     95    <input name="save" type="submit" class="button-primary" id="publish" tabindex="4" accesskey="p" value="<?php _e('Update Link') ?>" />
     96</div>
     97<div class="clear"></div>
     98</div>
    7799<?php do_action('submitlink_box'); ?>
    78100<div class="clear"></div>
Note: See TracChangeset for help on using the changeset viewer.