| 1 | <div class="field"> |
|---|
| 2 | <div class="field_meta"> |
|---|
| 3 | <table class="widefat"> |
|---|
| 4 | <tr> |
|---|
| 5 | <td class="field_order"> |
|---|
| 6 | |
|---|
| 7 | </td> |
|---|
| 8 | <td class="field_label"> |
|---|
| 9 | <a class="cfs_edit_field row-title"><?php echo esc_html( $field->label ); ?></a> |
|---|
| 10 | </td> |
|---|
| 11 | <td class="field_name"> |
|---|
| 12 | <?php echo esc_html( $field->name ); ?> |
|---|
| 13 | </td> |
|---|
| 14 | <td class="field_type"> |
|---|
| 15 | <a class="cfs_edit_field"><?php echo esc_html( $field->type ); ?></a> |
|---|
| 16 | </td> |
|---|
| 17 | </tr> |
|---|
| 18 | </table> |
|---|
| 19 | </div> |
|---|
| 20 | |
|---|
| 21 | <div class="field_form"> |
|---|
| 22 | <table class="widefat"> |
|---|
| 23 | <tbody> |
|---|
| 24 | <tr class="field_basics"> |
|---|
| 25 | <td colspan="2"> |
|---|
| 26 | <table> |
|---|
| 27 | <tr> |
|---|
| 28 | <td class="field_label"> |
|---|
| 29 | <label> |
|---|
| 30 | <?php _e( 'Label', 'cfs' ); ?> |
|---|
| 31 | <div class="cfs_tooltip">? |
|---|
| 32 | <div class="tooltip_inner"><?php _e( 'The field label that editors will see.', 'cfs' ); ?></div> |
|---|
| 33 | </div> |
|---|
| 34 | </label> |
|---|
| 35 | <input type="text" name="cfs[fields][<?php echo $field->weight; ?>][label]" value="<?php echo empty( $field->id ) ? '' : esc_attr( $field->label ); ?>" /> |
|---|
| 36 | </td> |
|---|
| 37 | <td class="field_name"> |
|---|
| 38 | <label> |
|---|
| 39 | <?php _e( 'Name', 'cfs' ); ?> |
|---|
| 40 | <div class="cfs_tooltip">? |
|---|
| 41 | <div class="tooltip_inner"> |
|---|
| 42 | <?php _e( 'The field name is passed into get() to retrieve values. Use only lowercase letters, numbers, and underscores.', 'cfs' ); ?> |
|---|
| 43 | </div> |
|---|
| 44 | </div> |
|---|
| 45 | </label> |
|---|
| 46 | <input type="text" name="cfs[fields][<?php echo $field->weight; ?>][name]" value="<?php echo empty( $field->id ) ? '' : esc_attr( $field->name ); ?>" /> |
|---|
| 47 | </td> |
|---|
| 48 | <td class="field_type"> |
|---|
| 49 | <label><?php _e( 'Field Type', 'cfs' ); ?></label> |
|---|
| 50 | <select name="cfs[fields][<?php echo $field->weight; ?>][type]"> |
|---|
| 51 | <?php foreach ( CFS()->fields as $type ) : ?> |
|---|
| 52 | <?php $selected = ($type->name == $field->type) ? ' selected' : ''; ?> |
|---|
| 53 | <option value="<?php echo esc_attr( $type->name ); ?>"<?php echo $selected; ?>><?php echo esc_html( $type->label ); ?></option> |
|---|
| 54 | <?php endforeach; ?> |
|---|
| 55 | </select> |
|---|
| 56 | </td> |
|---|
| 57 | </tr> |
|---|
| 58 | </table> |
|---|
| 59 | </td> |
|---|
| 60 | </tr> |
|---|
| 61 | |
|---|
| 62 | <?php CFS()->fields[ $field->type ]->options_html( $field->weight, $field ); ?> |
|---|
| 63 | |
|---|
| 64 | <tr class="field_notes"> |
|---|
| 65 | <td class="label"> |
|---|
| 66 | <label> |
|---|
| 67 | <?php _e( 'Notes', 'cfs' ); ?> |
|---|
| 68 | <div class="cfs_tooltip">? |
|---|
| 69 | <div class="tooltip_inner"><?php _e( 'Notes for editors during data entry', 'cfs' ); ?></div> |
|---|
| 70 | </div> |
|---|
| 71 | </label> |
|---|
| 72 | </td> |
|---|
| 73 | <td> |
|---|
| 74 | <textarea name="cfs[fields][<?php echo $field->weight; ?>][notes]"><?php echo esc_textarea( $field->notes ); ?></textarea> |
|---|
| 75 | </td> |
|---|
| 76 | </tr> |
|---|
| 77 | <tr class="field_actions"> |
|---|
| 78 | <td class="label"></td> |
|---|
| 79 | <td style="vertical-align:middle"> |
|---|
| 80 | <input type="hidden" name="cfs[fields][<?php echo $field->weight; ?>][id]" class="field_id" value="<?php echo $field->id; ?>" /> |
|---|
| 81 | <input type="hidden" name="cfs[fields][<?php echo $field->weight; ?>][parent_id]" class="parent_id" value="<?php echo $field->parent_id; ?>" /> |
|---|
| 82 | <input type="button" value="<?php _e( 'Close', 'cfs' ); ?>" class="button-secondary cfs_edit_field" /> |
|---|
| 83 | -<?php _e( 'or', 'cfs' ); ?>- <span class="cfs_delete_field"><?php _e( 'delete', 'cfs' ); ?></span> |
|---|
| 84 | </td> |
|---|
| 85 | </tr> |
|---|
| 86 | </tbody> |
|---|
| 87 | </table> |
|---|
| 88 | </div> |
|---|
| 89 | </div> |
|---|