Making WordPress.org


Ignore:
Timestamp:
02/25/2016 07:02:13 PM (11 years ago)
Author:
kovshenin
Message:

WordCamp.org: Better status flow for payment requests.

Network administrators (super deputies) can see and change
the current request status and add incomplete notes.

Regular users (admins) can only take the request from draft
to pending-approval, or from incomplete to draft/pending-approval.
After a request is pending approval or any further status, the
author can no longer edit it, unless a network admin explicitly
set it to draft or incomplete.

Location:
sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/metabox-status.php

    r2604 r2615  
    11<div id="submitpost" class="wcb submitbox">
    22        <div id="minor-publishing">
     3
     4                <?php if ( $current_user_can_edit_request && ! current_user_can( 'manage_network' ) ) : ?>
     5                <div id="minor-publishing-actions">
     6                        <div id="save-action">
     7                                <?php submit_button( __( 'Save Draft', 'wordcamporg' ), 'button', 'wcb-save-draft', false ); ?>
     8                                <span class="spinner"></span>
     9                        </div>
     10                        <div class="clear"></div>
     11                </div>
     12                <?php endif; ?>
     13
    314                <div id="misc-publishing-actions">
    4 
    515                        <div class="misc-pub-section">
    616                                <?php _e( 'ID:', 'wordcamporg' ); ?>
    … …  
    1727                        </div>
    1828
     29                        <?php if ( $post->post_status != 'auto-draft' ) : ?>
    1930                        <div class="misc-pub-section">
    2031                                <?php $this->render_text_input( $post, 'Date Vendor was Paid', 'date_vendor_paid', '', 'date', array(), $date_vendor_paid_readonly ); ?>
    … …  
    4152                                                        <?php $status = get_post_status_object( $post->post_status ); ?>
    4253                                                        <?php echo esc_html( $status->label ); ?>
     54                                                        <input type="hidden" name="post_status" value="<?php echo esc_attr( $post->post_status ); ?>" />
    4355
    4456                                                <?php endif; ?>
    … …  
    4658                                </label>
    4759                        </div>
     60                        <?php endif; ?>
    4861
    4962                        <div class="misc-pub-section hide-if-js wcb-mark-incomplete-notes">
    5063                                <label for="wcp_mark_incomplete_notes">What information is needed?</label>
    5164                                <textarea id="wcp_mark_incomplete_notes" name="wcp_mark_incomplete_notes" class="large-text" rows="5"
    52                                         placeholder="Need to attach receipt, etc"><?php echo esc_textarea( $incomplete_notes ); ?></textarea>
     65                                        placeholder="Need to attach receipt, etc" <?php echo $incomplete_readonly; ?>><?php echo esc_textarea( $incomplete_notes ); ?></textarea>
    5366                        </div>
    5467
    … …  
    7386                        <div id="publishing-action">
    7487                                <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr( $submit_text ) ?>" />
    75                                 <?php submit_button( $submit_text, 'primary button-large', 'save', false, array( 'accesskey' => 'p' ) ); ?>
     88                                <?php submit_button( $submit_text, 'primary button-large', 'wcb-update', false, array( 'accesskey' => 'p' ) ); ?>
    7689                        </div>
    7790
    … …  
    8093                <?php else : ?>
    8194
    82                         <p><?php _e( 'Paid requests are closed and cannot be edited.', 'wordcamporg' ); ?></p>
     95                        <?php _e( 'This request can not be edited.', 'wordcamporg' ); ?>
    8396
    8497                <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.