PageRenderTime 23ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/git_src/wp-content/plugins/custom-content-type-manager/views/metabox.php

https://bitbucket.org/murtuza88/carolina-home-stone
PHP | 111 lines | 91 code | 20 blank | 0 comment | 0 complexity | 5cc430a215a94b8f51934b4e042e24b5 MD5 | raw file
  1. <script type="text/javascript">
  2. function set_continue_editing() {
  3. jQuery('#continue_editing').val(1);
  4. return true;
  5. }
  6. </script>
  7. <style>
  8. <?php print $data['style']; ?>
  9. </style>
  10. <div class="metabox-holder">
  11. <form id="custom_post_type_manager_basic_form" method="post" action="">
  12. <input type="hidden" name="continue_editing" id="continue_editing" value="0" />
  13. <input type="hidden" name="old_id" id="old_id" value="<?php print $data['id']; ?>" />
  14. <?php wp_nonce_field($data['action_name'], $data['nonce_name']); ?>
  15. <div class="postbox">
  16. <div class="handlediv" title="Click to toggle"><br /></div>
  17. <h3 class="hndle"><span><?php _e('Metabox Definition', CCTM_TXTDOMAIN); ?></span></h3>
  18. <div class="inside">
  19. <!-- !id -->
  20. <div class="cctm_element_wrapper" id="custom_field_wrapper_id">
  21. <label for="id_label" class="cctm_label cctm_text_label" id="id">
  22. <?php _e('ID', CCTM_TXTDOMAIN); ?> *
  23. </label>
  24. <input type="text" name="id" class="cctm_text <?php print $data['id.error_class']; ?>" id="id" value="<?php print htmlspecialchars($data['id']); ?>"/>
  25. <?php print $data['id.error']; ?>
  26. <span class="cctm_description"><?php _e('Unique CSS ID for the metabox. No special characters allowed.', CCTM_TXTDOMAIN); ?></span>
  27. </div>
  28. <!-- !title -->
  29. <div class="cctm_element_wrapper" id="custom_field_wrapper_title">
  30. <label for="title_label" class="cctm_label cctm_text_label" id="cctm_label_title">
  31. <?php _e('Title', CCTM_TXTDOMAIN); ?> *
  32. </label>
  33. <input type="text" name="title" class="cctm_text <?php print $data['title.error_class']; ?>" id="title" value="<?php print htmlspecialchars($data['title']); ?>"/>
  34. <?php print $data['title.error']; ?>
  35. <span class="cctm_description"><?php _e('Title of the Metabox', CCTM_TXTDOMAIN); ?></span>
  36. </div>
  37. <!--!context -->
  38. <div class="cctm_element_wrapper" id="custom_field_wrapper_context">
  39. <label for="context" class="cctm_label cctm_text_label" id="cctm_label_context"><?php _e('Context', CCTM_TXTDOMAIN); ?></label>
  40. <select name="context" class="cctm_dropdown" id="context">
  41. <option value="normal" <?php print CCTM::is_selected('normal',$data['context']); ?>><?php _e('Normal'); ?></option>
  42. <option value="advanced" <?php print CCTM::is_selected('advanced',$data['context']); ?>><?php _e('Advanced'); ?></option>
  43. <option value="side" <?php print CCTM::is_selected('side',$data['context']); ?>><?php _e('Side'); ?></option>
  44. </select>
  45. <span class="cctm_description"><?php _e('The part of the page where the edit screen section should be shown.', CCTM_TXTDOMAIN); ?></span>
  46. </div>
  47. <!--!priority -->
  48. <div class="cctm_element_wrapper" id="custom_field_wrapper_priority">
  49. <label for="priority" class="cctm_label cctm_text_label" id="cctm_label_priority"><?php _e('Priority', CCTM_TXTDOMAIN); ?></label>
  50. <select name="priority" class="cctm_dropdown" id="priority">
  51. <option value="high" <?php print CCTM::is_selected('high',$data['priority']); ?>><?php _e('High'); ?></option>
  52. <option value="core" <?php print CCTM::is_selected('core',$data['priority']); ?>><?php _e('Core'); ?></option>
  53. <option value="default" <?php print CCTM::is_selected('default',$data['priority']); ?>><?php _e('Default'); ?></option>
  54. <option value="low" <?php print CCTM::is_selected('low',$data['priority']); ?>><?php _e('Low'); ?></option>
  55. </select>
  56. <span class="cctm_description"><?php _e('The priority within the context where the boxes should show.', CCTM_TXTDOMAIN); ?></span>
  57. </div>
  58. <!--!callback -->
  59. <div class="cctm_element_wrapper" id="custom_field_wrapper_callback">
  60. <label for="callback_label" class="cctm_label cctm_text_label" id="cctm_label_callback">
  61. <?php _e('Callback Function', CCTM_TXTDOMAIN); ?>
  62. </label>
  63. <input type="text" name="callback" class="cctm_text <?php print $data['callback.error_class']; ?>" id="callback" value="<?php print htmlspecialchars($data['callback']); ?>"/>
  64. <?php print $data['callback.error']; ?>
  65. <span class="cctm_description"><?php _e('Use this only if you want to override the standard CCTM behavior.', CCTM_TXTDOMAIN); ?></span>
  66. </div>
  67. <!--!callback_args -->
  68. <div class="cctm_element_wrapper" id="custom_field_wrapper_callback_args">
  69. <label for="callback_args_label" class="cctm_label cctm_text_label" id="cctm_label_callback_args">
  70. <?php _e('Callback Arguments', CCTM_TXTDOMAIN); ?>
  71. </label>
  72. <input type="text" name="callback_args" class="cctm_text" id="callback_args" value="<?php print htmlspecialchars($data['callback_args']); ?>"/>
  73. <span class="cctm_description"><?php _e('Comma-separaated arguments to pass into your callback function. These are used only if you supply a callback function.', CCTM_TXTDOMAIN); ?></span>
  74. </div>
  75. </div><!-- /inside -->
  76. </div><!-- /postbox -->
  77. <div class="postbox">
  78. <div class="handlediv" title="Click to toggle"><br /></div>
  79. <h3 class="hndle"><span><?php _e('Manual Overrides', CCTM_TXTDOMAIN); ?></span></h3>
  80. <div class="inside">
  81. <p class="custom_field_info">
  82. <?php _e('Check a box to force the metabox to be drawn even if no custom fields are in it.', CCTM_TXTDOMAIN); ?></p>
  83. <?php print $data['associations']; ?>
  84. </div><!-- /inside -->
  85. </div><!-- /postbox -->
  86. <br />
  87. <input type="submit" class="button-primary" value="<?php _e('Save', CCTM_TXTDOMAIN ); ?>" />
  88. <input type="submit" class="button" onclick="javascript:set_continue_editing();" value="<?php _e('Save and Continue Editing', CCTM_TXTDOMAIN ); ?>" />
  89. <a href="<?php print get_admin_url(false, 'admin.php'); ?>?page=cctm" title="<?php _e('Cancel'); ?>" class="button"><?php _e('Cancel'); ?></a>
  90. </form>
  91. </div><!-- /metabox-holder -->