| 1 |
<?php if ( !defined( 'ABSPATH' ) ) die( 'No direct access allowed' ); ?> |
| 2 |
<table class="edit" data-url="<?php echo admin_url( 'admin-ajax.php' ) ?>"> |
| 3 |
<tr> |
| 4 |
<th width="100"><?php _e ('Description', 'redirection'); ?>:</th> |
| 5 |
<td> |
| 6 |
<input style="width: 85%" type="text" name="title" value="<?php echo esc_attr( $redirect->title ); ?>"/> |
| 7 |
<span class="sub">(<?php _e( "optional", 'redirection' ); ?>)</span> |
| 8 |
</td> |
| 9 |
</tr> |
| 10 |
|
| 11 |
<tr> |
| 12 |
<th width="100"><a target="_blank" href="<?php echo esc_url( $redirect->url ) ?>"><?php _e( 'Source URL', 'redirection' ); ?>:</a></th> |
| 13 |
<td> |
| 14 |
<input style="width: 85%" type="text" name="old" value="<?php echo esc_attr( $redirect->url ); ?>" id="original"/> |
| 15 |
<label><?php _e( 'Regex', 'redirection' ); ?>: <input type="checkbox" name="regex" <?php if ( $redirect->regex == true ) echo ' checked="checked"' ?>/></label> |
| 16 |
</td> |
| 17 |
</tr> |
| 18 |
|
| 19 |
<?php $redirect->match->show(); ?> |
| 20 |
|
| 21 |
<tr> |
| 22 |
<th></th> |
| 23 |
<td> |
| 24 |
<div class="table-actions"> |
| 25 |
<input class="button-primary" type="submit" name="save" value="<?php _e( 'Save', 'redirection' ); ?>"/> |
| 26 |
<input class="button-secondary" type="submit" name="cancel" value="<?php _e( 'Cancel', 'redirection' ); ?>"/> |
| 27 |
|
| 28 |
<input type="hidden" name="action" value="red_redirect_save"/> |
| 29 |
<input type="hidden" name="id" value="<?php echo esc_attr( $redirect->id ); ?>"/> |
| 30 |
<input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce( 'redirection-redirect_save_'.$redirect->id ); ?>"/> |
| 31 |
|
| 32 |
<span id="info_<?php echo esc_attr( $redirect->id ) ?>"></span> |
| 33 |
</div> |
| 34 |
<div class="table-loading"> |
| 35 |
<div class="spinner"></div> |
| 36 |
</div> |
| 37 |
</td> |
| 38 |
</tr> |
| 39 |
</table> |
| 40 |
|