Ticket #15631: 15631.4.diff
File 15631.4.diff, 3.2 KB (added by , 11 months ago) |
---|
-
src/wp-admin/css/edit.css
1068 1068 padding: 0 8px 8px; 1069 1069 } 1070 1070 1071 #postcustom #postcustomstuff .add-custom-field { 1072 padding: 12px 8px 8px; 1073 } 1074 1071 1075 #side-sortables #postcustom #postcustomstuff .submit { 1072 1076 margin: 0; 1073 1077 padding: 0; … … 1118 1122 width: auto; 1119 1123 } 1120 1124 1121 #postcustomstuff #newmetaleft a { 1125 #postcustomstuff #newmetaleft a, 1126 #postcustomstuff #newmeta-button { 1122 1127 display: inline-block; 1123 1128 margin: 0 8px 8px; 1124 1129 text-decoration: none; -
src/wp-admin/includes/template.php
724 724 725 725 if ( $keys ) { 726 726 natcasesort( $keys ); 727 $meta_key_input_id = 'metakeyselect';728 } else {729 $meta_key_input_id = 'metakeyinput';730 727 } 731 728 ?> 732 729 <p><strong><?php _e( 'Add New Custom Field:' ); ?></strong></p> … … 733 730 <table id="newmeta"> 734 731 <thead> 735 732 <tr> 736 <th class="left"><label for=" <?php echo $meta_key_input_id; ?>"><?php _ex( 'Name', 'meta name' ); ?></label></th>733 <th class="left"><label for="metakeyselect"><?php _ex( 'Name', 'meta name' ); ?></label></th> 737 734 <th><label for="metavalue"><?php _e( 'Value' ); ?></label></th> 738 735 </tr> 739 736 </thead> … … 753 750 } 754 751 ?> 755 752 </select> 756 <input class="hid e-if-js" type="text" id="metakeyinput" name="metakeyinput" value="" />757 < a href="#postcustomstuff" class="hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">753 <input class="hidden" type="text" id="metakeyinput" name="metakeyinput" value="" aria-label="<?php _e( 'New custom field name' ); ?>" /> 754 <button type="button" id="newmeta-button" class="button button-small hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggleClass('hidden');jQuery('#metakeyinput, #metakeyselect').filter(':visible').trigger('focus');"> 758 755 <span id="enternew"><?php _e( 'Enter new' ); ?></span> 759 <span id="cancelnew" class="hidden"><?php _e( 'Cancel' ); ?></span></ a>756 <span id="cancelnew" class="hidden"><?php _e( 'Cancel' ); ?></span></button> 760 757 <?php } else { ?> 761 758 <input type="text" id="metakeyinput" name="metakeyinput" value="" /> 762 759 <?php } ?> … … 763 760 </td> 764 761 <td><textarea id="metavalue" name="metavalue" rows="2" cols="25"></textarea></td> 765 762 </tr> 766 767 < tr><td colspan="2">768 <div class="submit ">763 </tbody> 764 </table> 765 <div class="submit add-custom-field"> 769 766 <?php 770 767 submit_button( 771 768 __( 'Add Custom Field' ), … … 775 772 array( 776 773 'id' => 'newmeta-submit', 777 774 'data-wp-lists' => 'add:the-list:newmeta', 775 'onclick' => "jQuery('#metakeyselect, #enternew').removeClass('hidden');jQuery('#metakeyinput, #cancelnew').addClass('hidden');jQuery('#metakeyselect').trigger('focus');" 778 776 ) 779 777 ); 780 778 ?> 781 779 </div> 782 <?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>783 </td></tr>784 </tbody>785 </table>786 780 <?php 787 781 wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); 788 782 } 789 783 790 784 /**