| 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="70"><?php _e ('Name', 'redirection'); ?>:</th> |
| 5 |
<td><input style="width: 95%" type="text" name="name" value="<?php echo esc_attr( $group->get_name() ) ?>"/></td> |
| 6 |
</tr> |
| 7 |
<tr> |
| 8 |
<th width="70"><?php _e( 'Module', 'redirection' ); ?></th> |
| 9 |
<td> |
| 10 |
<select name="module_id"> |
| 11 |
<?php foreach ( Red_Module::get_for_select() AS $module ) : ?> |
| 12 |
<option value="<?php echo esc_attr( $module->get_id() ); ?>"<?php selected( $module->get_id(), $group->get_module_id() ); ?>><?php echo esc_html( $module->get_name() ); ?></option> |
| 13 |
<?php endforeach; ?> |
| 14 |
</select> |
| 15 |
</td> |
| 16 |
</tr> |
| 17 |
<tr> |
| 18 |
<th width="70"></th> |
| 19 |
<td> |
| 20 |
<div class="table-actions"> |
| 21 |
<input class="button-primary" type="submit" name="save" value="<?php _e ('Save', 'redirection'); ?>"/> |
| 22 |
<input class="button-secondary" type="submit" name="cancel" value="<?php _e ('Cancel', 'redirection'); ?>"/> |
| 23 |
|
| 24 |
<input type="hidden" name="action" value="red_group_save"/> |
| 25 |
<input type="hidden" name="id" value="<?php echo esc_attr( $group->id ); ?>"/> |
| 26 |
|
| 27 |
<?php wp_nonce_field( 'redirection-group_save_'.$group->id ) ?> |
| 28 |
</div> |
| 29 |
|
| 30 |
<div class="table-loading"> |
| 31 |
<div class="spinner"></div> |
| 32 |
</div> |
| 33 |
</td> |
| 34 |
</tr> |
| 35 |
</table> |
| 36 |
</div> |
| 37 |
|