| 1 |
<?php |
| 2 |
/** |
| 3 |
* Form Templates - Create new template modal. |
| 4 |
* |
| 5 |
* @package Formidable |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
die( 'You are not allowed to call this page directly.' ); |
| 10 |
} |
| 11 |
?> |
| 12 |
<div id="frm-create-template-modal" class="frm_wrap frm-form-templates-modal-item frm_hidden"> |
| 13 |
<div class="frm_modal_top"> |
| 14 |
<div class="frm-modal-title"> |
| 15 |
<h2><?php esc_html_e( 'Create New Template', 'formidable' ); ?></h2> |
| 16 |
</div> |
| 17 |
</div> |
| 18 |
|
| 19 |
<div class="inside frm_grid_container frm-fields frm-px-md frm-py-0 frm-mt-sm frm-m-0"> |
| 20 |
<div class="frm_form_field"> |
| 21 |
<label for="frm-create-template-modal-forms-select"> |
| 22 |
<?php esc_html_e( 'Select form for a new template', 'formidable' ); ?> |
| 23 |
</label> |
| 24 |
|
| 25 |
<select name="frm-create-template-modal-forms-select" id="frm-create-template-modal-forms-select"> |
| 26 |
<option value=""> </option> |
| 27 |
|
| 28 |
<?php if ( empty( $published_forms ) ) { ?> |
| 29 |
<option value="no-forms" disabled> |
| 30 |
<?php esc_html_e( 'You have not created any forms yet.', 'formidable' ); ?> |
| 31 |
</option> |
| 32 |
<?php |
| 33 |
} |
| 34 |
|
| 35 |
foreach ( $published_forms as $form ) { |
| 36 |
$form_description = FrmAppHelper::kses( $form->description, array( 'a', 'i', 'span', 'use', 'svg' ) ); |
| 37 |
?> |
| 38 |
<option value="<?php echo esc_attr( $form->id ); ?>" data-name="<?php echo esc_attr( $form->name ); ?>" data-description="<?php echo esc_attr( $form_description ); ?>"> |
| 39 |
<?php echo esc_html( FrmFormsHelper::edit_form_link_label( $form ) ); ?> |
| 40 |
</option> |
| 41 |
<?php } ?> |
| 42 |
</select> |
| 43 |
</div> |
| 44 |
|
| 45 |
<div class="frm_form_field"> |
| 46 |
<label for="frm_create_template_name"> |
| 47 |
<?php esc_html_e( 'Template name', 'formidable' ); ?> |
| 48 |
</label> |
| 49 |
<input type="text" name="frm_create_template_name" id="frm_create_template_name" disabled /> |
| 50 |
</div> |
| 51 |
|
| 52 |
<div class="frm_form_field"> |
| 53 |
<label for="frm_create_template_description"> |
| 54 |
<?php esc_html_e( 'Description', 'formidable' ); ?> |
| 55 |
</label> |
| 56 |
<textarea name="frm_create_template_description" id="frm_create_template_description" class="frm-rounded-sm" disabled></textarea> |
| 57 |
</div> |
| 58 |
</div> |
| 59 |
|
| 60 |
<div class="frm_modal_footer frm-flex-box frm-justify-between frm-pt-sm frm-pb-md"> |
| 61 |
<a href="#" class="button button-secondary frm-button-secondary frm-modal-close dismiss" role="button"> |
| 62 |
<?php esc_html_e( 'Cancel', 'formidable' ); ?> |
| 63 |
</a> |
| 64 |
<a id="frm-create-template-button" href="#" class="button button-primary frm-button-primary disabled" role="button"> |
| 65 |
<?php esc_html_e( 'Create Template', 'formidable' ); ?> |
| 66 |
</a> |
| 67 |
</div> |
| 68 |
</div> |
| 69 |
|