| 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"><a target="_blank" href="<?php echo esc_url( $redirect->get_url() ) ?>"><?php _e( 'Source URL', 'redirection' ); ?>:</a></th> |
| 5 |
<td> |
| 6 |
<input style="width: 85%" type="text" name="old" value="<?php echo esc_attr( $redirect->get_url() ); ?>" id="original"/> |
| 7 |
<label><?php _e( 'Regex', 'redirection' ); ?>: <input type="checkbox" name="regex" <?php if ( $redirect->is_regex() ) echo ' checked="checked"' ?>/></label> |
| 8 |
</td> |
| 9 |
</tr> |
| 10 |
<tr class="advanced"> |
| 11 |
<th width="100"><?php _e( 'Description', 'redirection' ); ?>:</th> |
| 12 |
<td> |
| 13 |
<input style="width: 85%" type="text" name="title" value="<?php echo esc_attr( $redirect->get_title() ); ?>"/> |
| 14 |
<span class="sub">(<?php _e( 'optional', 'redirection' ); ?>)</span> |
| 15 |
</td> |
| 16 |
</tr> |
| 17 |
<tr class="advanced"> |
| 18 |
<th width="100"><?php _e( 'Group', 'redirection' ); ?>:</th> |
| 19 |
<td> |
| 20 |
<select name="group_id"> |
| 21 |
<?php echo $this->select( Red_Group::get_for_select(), $redirect->get_group_id() );?> |
| 22 |
</select> |
| 23 |
</td> |
| 24 |
</tr> |
| 25 |
|
| 26 |
<?php $redirect->match->show(); ?> |
| 27 |
|
| 28 |
<tr> |
| 29 |
<th></th> |
| 30 |
<td> |
| 31 |
<div class="table-actions"> |
| 32 |
<input class="button-primary" type="submit" name="save" value="<?php _e( 'Save', 'redirection' ); ?>"/> |
| 33 |
<input class="button-secondary" type="submit" name="cancel" value="<?php _e( 'Cancel', 'redirection' ); ?>"/> |
| 34 |
|
| 35 |
<a href="#" class="advanced-toggle" title="<?php esc_attr_e( 'Advanced Settings' ); ?>"> |
| 36 |
<img src="https://s.w.org/images/core/emoji/72x72/2699.png"/> |
| 37 |
</a> |
| 38 |
|
| 39 |
<input type="hidden" name="action" value="red_redirect_save"/> |
| 40 |
<input type="hidden" name="id" value="<?php echo esc_attr( $redirect->get_id() ); ?>"/> |
| 41 |
<?php wp_nonce_field( 'redirection-redirect_save_'.$redirect->get_id() ) ?> |
| 42 |
|
| 43 |
<span id="info_<?php echo esc_attr( $redirect->get_id() ) ?>"></span> |
| 44 |
</div> |
| 45 |
<div class="table-loading"> |
| 46 |
<div class="spinner"></div> |
| 47 |
</div> |
| 48 |
</td> |
| 49 |
</tr> |
| 50 |
</table> |
| 51 |
|