@@ -20,16 +20,16 @@ discard block |
||
| 20 | 20 | <div id="publishing-action"> |
| 21 | 21 | <?php |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * @filter `gravityview/edit_entry/cancel_link` Modify the cancel button link URL |
|
| 25 | - * @since 1.11.1 |
|
| 26 | - * @since 2.11 The cancel link now uses history.back() so the $back_link URL matters less. |
|
| 27 | - * @param string $back_link Existing URL of the Cancel link |
|
| 28 | - * @param array $form The Gravity Forms form |
|
| 29 | - * @param array $entry The Gravity Forms entry |
|
| 30 | - * @param int $view_id The current View ID |
|
| 31 | - */ |
|
| 32 | - $back_link = apply_filters( 'gravityview/edit_entry/cancel_link', remove_query_arg( array( 'page', 'view', 'edit' ) ), $object->form, $object->entry, $object->view_id ); |
|
| 23 | + /** |
|
| 24 | + * @filter `gravityview/edit_entry/cancel_link` Modify the cancel button link URL |
|
| 25 | + * @since 1.11.1 |
|
| 26 | + * @since 2.11 The cancel link now uses history.back() so the $back_link URL matters less. |
|
| 27 | + * @param string $back_link Existing URL of the Cancel link |
|
| 28 | + * @param array $form The Gravity Forms form |
|
| 29 | + * @param array $entry The Gravity Forms entry |
|
| 30 | + * @param int $view_id The current View ID |
|
| 31 | + */ |
|
| 32 | + $back_link = apply_filters( 'gravityview/edit_entry/cancel_link', remove_query_arg( array( 'page', 'view', 'edit' ) ), $object->form, $object->entry, $object->view_id ); |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * @action `gravityview/edit-entry/publishing-action/before` Triggered before the submit buttons in the Edit Entry screen, inside the `<div id="publishing-action">` container. |
@@ -84,11 +84,11 @@ discard block |
||
| 84 | 84 | * @used-by GravityView_Delete_Entry::add_delete_button() |
| 85 | 85 | * |
| 86 | 86 | * @since 1.5.1 |
| 87 | - * @since 2.0.13 Added $post_id |
|
| 87 | + * @since 2.0.13 Added $post_id |
|
| 88 | 88 | * @param array $form The Gravity Forms form |
| 89 | 89 | * @param array $entry The Gravity Forms entry |
| 90 | 90 | * @param int $view_id The current View ID |
| 91 | - * @param int $post_id The current Post ID |
|
| 91 | + * @param int $post_id The current Post ID |
|
| 92 | 92 | */ |
| 93 | 93 | do_action( 'gravityview/edit-entry/publishing-action/after', $object->form, $object->entry, $object->view_id, $object->post_id ); |
| 94 | 94 | ?> |
@@ -44,35 +44,35 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | if ( $object->show_previous_button ) { |
| 46 | 46 | $previous_tabindex = GFCommon::get_tabindex(); |
| 47 | - $previous_label = GFCommon::replace_variables( $labels['previous'], $object->form, $object->entry ); |
|
| 47 | + $previous_label = GFCommon::replace_variables( $labels[ 'previous' ], $object->form, $object->entry ); |
|
| 48 | 48 | ?> |
| 49 | - <input id="gform_previous_button_<?php echo esc_attr( $object->form['id'] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-previous" type="submit" <?php echo $previous_tabindex; ?> value="<?php echo esc_attr( $previous_label ); ?>" name="save" /> |
|
| 49 | + <input id="gform_previous_button_<?php echo esc_attr( $object->form[ 'id' ] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-previous" type="submit" <?php echo $previous_tabindex; ?> value="<?php echo esc_attr( $previous_label ); ?>" name="save" /> |
|
| 50 | 50 | <?php |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | if ( $object->show_next_button ) { |
| 54 | - $next_tabindex = GFCommon::get_tabindex(); |
|
| 55 | - $next_label = GFCommon::replace_variables( $labels['next'], $object->form, $object->entry ); |
|
| 54 | + $next_tabindex = GFCommon::get_tabindex(); |
|
| 55 | + $next_label = GFCommon::replace_variables( $labels[ 'next' ], $object->form, $object->entry ); |
|
| 56 | 56 | ?> |
| 57 | - <input id="gform_next_button_<?php echo esc_attr( $object->form['id'] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-next" type="submit" <?php echo $next_tabindex; ?> value="<?php echo esc_attr( $next_label ); ?>" name="save" /> |
|
| 57 | + <input id="gform_next_button_<?php echo esc_attr( $object->form[ 'id' ] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-next" type="submit" <?php echo $next_tabindex; ?> value="<?php echo esc_attr( $next_label ); ?>" name="save" /> |
|
| 58 | 58 | <?php |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | if ( $object->show_update_button ) { |
| 62 | - $update_tabindex = GFCommon::get_tabindex(); |
|
| 63 | - $update_label = GFCommon::replace_variables( $labels['submit'], $object->form, $object->entry ); |
|
| 62 | + $update_tabindex = GFCommon::get_tabindex(); |
|
| 63 | + $update_label = GFCommon::replace_variables( $labels[ 'submit' ], $object->form, $object->entry ); |
|
| 64 | 64 | ?> |
| 65 | - <input id="gform_submit_button_<?php echo esc_attr( $object->form['id'] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-update" type="submit" <?php echo $update_tabindex; ?> value="<?php echo esc_attr( $update_label ); ?>" name="save" /> |
|
| 65 | + <input id="gform_submit_button_<?php echo esc_attr( $object->form[ 'id' ] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-update" type="submit" <?php echo $update_tabindex; ?> value="<?php echo esc_attr( $update_label ); ?>" name="save" /> |
|
| 66 | 66 | <?php |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - $cancel_tabindex = GFCommon::get_tabindex(); |
|
| 70 | - $cancel_label = GFCommon::replace_variables( $labels['cancel'], $object->form, $object->entry ); |
|
| 69 | + $cancel_tabindex = GFCommon::get_tabindex(); |
|
| 70 | + $cancel_label = GFCommon::replace_variables( $labels[ 'cancel' ], $object->form, $object->entry ); |
|
| 71 | 71 | |
| 72 | 72 | // If the entry has been edited, history.back() will keep pointing to the Edit Entry screen. Go back before editing, please! |
| 73 | 73 | // On first visit, will be history.go(-1) because (0 + 1 * -1). |
| 74 | 74 | // After updating twice, history.go(-3) because (2 + 1 * -1) |
| 75 | - $update_count = (int) \GV\Utils::_POST( 'update_count', 0 ); |
|
| 75 | + $update_count = (int)\GV\Utils::_POST( 'update_count', 0 ); |
|
| 76 | 76 | $cancel_onclick = 'history.go(' . ( $update_count + 1 ) * -1 . '); return false;'; |
| 77 | 77 | ?> |
| 78 | 78 | <a class="btn btn-sm button button-small gv-button-cancel" onclick="<?php echo esc_attr( $cancel_onclick ); ?>" <?php echo $cancel_tabindex; ?> href="<?php echo esc_url( $back_link ); ?>"><?php echo esc_attr( $cancel_label ); ?></a> |
@@ -94,5 +94,5 @@ discard block |
||
| 94 | 94 | ?> |
| 95 | 95 | <input type='hidden' name='update_count' value='<?php echo $update_count + 1; ?>'/> |
| 96 | 96 | <input type="hidden" name="action" value="update" /> |
| 97 | - <input type="hidden" name="lid" value="<?php echo esc_attr( $object->entry['id'] ); ?>" /> |
|
| 97 | + <input type="hidden" name="lid" value="<?php echo esc_attr( $object->entry[ 'id' ] ); ?>" /> |
|
| 98 | 98 | </div> |