| @@ 95-132 (lines=38) @@ | ||
| 92 | </tr> |
|
| 93 | ||
| 94 | <?php |
|
| 95 | if ( class_exists( 'Pods_Templates' ) ) { |
|
| 96 | $all_templates = (array) $api->load_templates( array() ); |
|
| 97 | ||
| 98 | $templates = array( |
|
| 99 | '' => '- ' . __( 'Custom Template', 'pods' ) . ' -' |
|
| 100 | ); |
|
| 101 | ||
| 102 | foreach ( $all_templates as $template ) { |
|
| 103 | $templates[ $template[ 'name' ] ] = $template[ 'name' ]; |
|
| 104 | } |
|
| 105 | ?> |
|
| 106 | <tr> |
|
| 107 | <td valign="top"> |
|
| 108 | <label for="template"><?php _e( 'Template', 'pods' ); ?></label> |
|
| 109 | </td> |
|
| 110 | <td> |
|
| 111 | <?php |
|
| 112 | if ( 0 < count( $all_templates ) ) |
|
| 113 | $form->add_drop_down( 'template', $templates ); |
|
| 114 | else |
|
| 115 | echo '<strong class="red">' . __( 'None Found', 'pods' ) . '</strong>'; |
|
| 116 | ?> |
|
| 117 | </td> |
|
| 118 | </tr> |
|
| 119 | <?php |
|
| 120 | } |
|
| 121 | else { |
|
| 122 | ?> |
|
| 123 | <tr> |
|
| 124 | <td valign="top"> |
|
| 125 | <label for="template"><?php _e( 'Template', 'pods' ); ?></label> |
|
| 126 | </td> |
|
| 127 | <td> |
|
| 128 | <?php $form->add_text_box( 'template' ); ?> |
|
| 129 | </td> |
|
| 130 | </tr> |
|
| 131 | <?php |
|
| 132 | } |
|
| 133 | ?> |
|
| 134 | ||
| 135 | <tr> |
|
| @@ 99-136 (lines=38) @@ | ||
| 96 | </tr> |
|
| 97 | ||
| 98 | <?php |
|
| 99 | if ( class_exists( 'Pods_Templates' ) ) { |
|
| 100 | $all_templates = (array) $api->load_templates( array() ); |
|
| 101 | ||
| 102 | $templates = array( |
|
| 103 | '' => '- ' . __( 'Custom Template', 'pods' ) . ' -' |
|
| 104 | ); |
|
| 105 | ||
| 106 | foreach ( $all_templates as $template ) { |
|
| 107 | $templates[ $template[ 'name' ] ] = $template[ 'name' ]; |
|
| 108 | } |
|
| 109 | ?> |
|
| 110 | <tr> |
|
| 111 | <td valign="top"> |
|
| 112 | <label for="template"><?php _e( 'Template', 'pods' ); ?></label> |
|
| 113 | </td> |
|
| 114 | <td> |
|
| 115 | <?php |
|
| 116 | if ( 0 < count( $all_templates ) ) |
|
| 117 | $form->add_drop_down( 'template', $templates ); |
|
| 118 | else |
|
| 119 | echo '<strong class="red">' . __( 'None Found', 'pods' ) . '</strong>'; |
|
| 120 | ?> |
|
| 121 | </td> |
|
| 122 | </tr> |
|
| 123 | <?php |
|
| 124 | } |
|
| 125 | else { |
|
| 126 | ?> |
|
| 127 | <tr> |
|
| 128 | <td valign="top"> |
|
| 129 | <label for="template"><?php _e( 'Template', 'pods' ); ?></label> |
|
| 130 | </td> |
|
| 131 | <td> |
|
| 132 | <?php $form->add_text_box( 'template' ); ?> |
|
| 133 | </td> |
|
| 134 | </tr> |
|
| 135 | <?php |
|
| 136 | } |
|
| 137 | ?> |
|
| 138 | ||
| 139 | <tr> |
|