| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
?><li> |
| 6 |
<h3><?php esc_html_e( 'Create a template from an existing form', 'formidable' ); ?></h3> |
| 7 |
<div class="dropdown frm-fields"> |
| 8 |
<button type="button" class="frm-dropdown-toggle dropdown-toggle btn btn-default" id="frm-template-drop" data-toggle="dropdown" style="width:auto"> |
| 9 |
<?php esc_html_e( 'Select form for new template', 'formidable' ); ?> |
| 10 |
<b class="caret"></b> |
| 11 |
</button> |
| 12 |
<ul class="frm-dropdown-menu" role="menu" aria-labelledby="frm-template-drop"> |
| 13 |
<?php |
| 14 |
if ( empty( $forms ) ) { |
| 15 |
?> |
| 16 |
<li class="frm_dropdown_li"> |
| 17 |
<?php esc_html_e( 'You have not created any forms yet.', 'formidable' ); ?> |
| 18 |
</li> |
| 19 |
<?php |
| 20 |
} else { |
| 21 |
foreach ( $forms as $form ) { |
| 22 |
?> |
| 23 |
<li> |
| 24 |
<a href="#" data-formid="<?php echo esc_attr( $form->id ); ?>" class="frm-build-template" data-fullname="<?php echo esc_attr( $form->name ); ?>" tabindex="-1"> |
| 25 |
<?php echo esc_html( empty( $form->name ) ? __( '(no title)', 'formidable' ) : FrmAppHelper::truncate( $form->name, 33 ) ); ?> |
| 26 |
</a> |
| 27 |
</li> |
| 28 |
<?php |
| 29 |
unset( $form ); |
| 30 |
} |
| 31 |
} |
| 32 |
?> |
| 33 |
</ul> |
| 34 |
</div> |
| 35 |
</li><?php |
| 36 |
|