PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.4.4
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.4.4
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / views / frm-forms / list-templates.php

list-templates.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 5.4.4, at classes/views/frm-forms/list-templates.php

83 lines 3.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5 ?>
6 <ul class="frm-templates-list frm-featured-forms">
7 <li class="frm-add-blank-form frm-selectable">
8 <div class="frm-featured-form">
9 <div class="frm-category-icon" role="button" style="background-color: #F4AD3D;">
10 <?php FrmAppHelper::icon_by_class( 'frmfont frm_plus_icon' ); ?>
11 </div><div>
12 <h3 role="button"><?php esc_html_e( 'Blank Form', 'formidable' ); ?></h3>
13 <p role="button"><?php esc_html_e( 'Create a new form from scratch', 'formidable' ); ?></p>
14 </div>
15 </div>
16 </li><?php
17 $render_icon = true;
18 foreach ( array( 20872734, 20874748, 20882522, 20874739, 20908981, 28109851 ) as $template ) {
19 if ( isset( $templates[ $template ] ) ) {
20 $template = $templates[ $template ];
21 require $view_path . 'list-template.php';
22 }
23 }
24 ?><li class="frm-selectable" data-href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-import' ) ); ?>">
25 <div class="frm-featured-form">
26 <div class="frm-category-icon" role="button" style="background-color: #805EF6;">
27 <?php FrmAppHelper::icon_by_class( 'frmfont frm_upload_icon' ); ?>
28 </div><div>
29 <h3 role="button"><?php esc_html_e( 'Import', 'formidable' ); ?></h3>
30 <p role="button"><?php esc_html_e( 'Upload your Formidable XML or CSV file to import forms.', 'formidable' ); ?></p>
31 </div>
32 </div>
33 </li>
34 </ul>
35 <?php
36 FrmAppHelper::show_search_box(
37 array(
38 'input_id' => 'template',
39 'placeholder' => __( 'Search Templates', 'formidable' ),
40 'tosearch' => 'frm-searchable-template',
41 )
42 );
43 ?>
44 <div tabindex="0" class="accordion-container">
45 <ul class="frm-templates-list frm-categories-list">
46 <?php foreach ( $categories as $category ) { ?>
47 <?php
48 $category_templates = $templates_by_category[ $category ];
49 $count = count( $category_templates );
50 $available = FrmFormsHelper::available_count( $category_templates, $args );
51 ?>
52 <li class="control-section accordion-section">
53 <div class="frm-featured-form">
54 <div class="frm-category-icon" role="button" style="background-color: #805EF6;">
55 <?php FrmFormsHelper::template_icon( array( $category ) ); ?>
56 </div><div>
57 <div role="button" class="accordion-section-title">
58 <h3><?php echo esc_attr( $category ); ?></h3>
59 <p><span class="frm-template-count"><?php echo esc_html( $count ); ?></span> <span class="frm-templates-plural <?php echo $count === 1 ? 'frm_hidden' : ''; ?>"><?php esc_html_e( 'templates', 'formidable' ); ?></span><span class="frm-templates-singular <?php echo $count !== 1 ? 'frm_hidden' : ''; ?>"><?php esc_html_e( 'template', 'formidable' ); ?></span><?php echo $available !== $count ? '&nbsp;&nbsp;|&nbsp;&nbsp;<span class="frm-available-templates-count">' . esc_html( $available ) . '</span> ' . esc_html__( 'available', 'formidable' ) : ''; ?></p>
60 </div>
61 <div class="accordion-section-content" aria-expanded="false">
62 <ul>
63 <?php
64 if ( $my_templates_translation === $category ) {
65 require $view_path . 'create-template-from-an-existing-form.php';
66 }
67
68 $searchable = true;
69 $render_icon = false;
70 foreach ( $category_templates as $category_template ) {
71 $template = $category_template;
72 require $view_path . 'list-template.php';
73 }
74 ?>
75 </ul>
76 </div>
77 </div>
78 </div>
79 </li>
80 <?php } ?>
81 </ul>
82 </div>
83