PluginProbe
Poll Maker by AYS – Versus Polls, Anonymous Polls, Image Polls / 5.6.6
Poll Maker by AYS – Versus Polls, Anonymous Polls, Image Polls v5.6.6
6.5.0 6.4.9 6.4.8 6.4.7 6.4.6 6.4.5 6.4.4 6.4.3 6.4.2 6.4.1 6.4.0 6.3.9 6.3.8 6.3.7 6.3.6 6.3.5 6.3.4 6.3.3 5.6.0 5.6.1 5.6.2 5.6.3 5.6.4 5.6.5 5.6.6 All 153 releases
poll-maker / admin / partials / poll-maker-ays-admin-display.php

poll-maker-ays-admin-display.php in Poll Maker by AYS – Versus Polls, Anonymous Polls, Image Polls 5.6.6, at admin/partials/poll-maker-ays-admin-display.php

206 lines 12.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Provide a admin area view for the plugin
4 *
5 * This file is used to markup the admin-facing aspects of the plugin.
6 *
7 * @link https://ays-pro.com/
8 * @since 1.0.0
9 *
10 * @package Poll_Maker_Ays
11 * @subpackage Poll_Maker_Ays/admin/partials
12 */
13
14 $action = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : '';
15 $id = isset($_GET['poll']) ? absint($_GET['poll']) : null;
16 if ($action == 'duplicate' && $id != null) {
17 $this->polls_obj->duplicate_poll($id);
18 }
19 $poll_max_id = Poll_Maker_Ays_Admin::get_max_id('polls');
20
21 $plus_icon_svg = "<span class=''><img src='". POLL_MAKER_AYS_ADMIN_URL ."/images/icons/add-new.svg'></span>";
22
23 $quick_poll_plugin_nonce = wp_create_nonce( 'poll-maker-ajax-quick-poll-nonce' );
24 ?>
25
26 <div class="wrap ays-poll-list-table ays_polls_list_table">
27 <div class="ays-poll-heading-box">
28 <div class="ays-poll-wordpress-user-manual-box">
29 <a href="https://ays-pro.com/wordpress-poll-maker-user-manual" target="_blank" style="text-decoration: none;font-size: 13px;">
30 <i class="ays_poll_fas ays_fa_file_text"></i>
31 <span style="margin-left: 3px;text-decoration: underline;"><?php echo __("View Documentation", "poll-maker"); ?></span>
32 </a>
33 </div>
34 </div>
35 <h1 class="wp-heading-inline">
36 <?php
37 echo esc_html(get_admin_page_title());
38 ?>
39 </h1>
40 <div class='heading_buttons_container'>
41 <div class='ays-poll-add-new-button-box'>
42 <?php
43 echo sprintf('<a href="?page=%s&action=%s" class="page-title-action button-primary ays-poll-add-new-button ays-poll-add-new-button-new-design"> %s ' . __('Add New', "poll-maker") . '</a>', esc_attr($_REQUEST['page']), 'add', $plus_icon_svg);
44 ?>
45 </div>
46 <div class="create_quick_poll_container">
47 <button class="create_quick_poll" id="ays_create_quick_poll" title="<?php echo __( "Create Quick Poll", "poll-maker" ); ?>"><img src="<?php echo POLL_MAKER_AYS_ADMIN_URL . '/images/icons/icon-128x128.png' ?>" alt="Create Quick Poll"></button>
48 </div>
49 </div>
50 <div class="ays_poll_modal" id="ays-poll-quick-create" style='display:none'>
51 <!-- Modal content -->
52 <div class="ays_poll_modal_content ays-modal-content fadeInDown" id="ays-poll-quick-create-content">
53 <div class="ays-modal-header">
54 <h4><?php echo __('Build your poll in a few minutes', "poll-maker"); ?></h4>
55 <span class="ays-close-quick-create">&times;</span>
56 </div>
57 <div class="ays-modal-quick-poll-content">
58 <form method="POST" id="ays-quick-poll-form">
59 <!-- Title -->
60 <div class="ays-modal-poll-title-add">
61 <span><label for="ays-quick-poll-title"><?php echo __('Poll Title', "poll-maker"); ?></label></span>
62 <input type="text" name="ays-poll-title" id="ays-quick-poll-title" data-required="true">
63 </div>
64 <!-- Question -->
65 <div class="ays-modal-poll-question-add">
66 <span><label for="ays-quick-poll-question"><?php echo __('Question', "poll-maker"); ?></label></span>
67 <textarea name="ays_poll_question" id="ays-quick-poll-question" placeholder="<?php echo __('Ask a question*', "poll-maker"); ?>" rows="3"></textarea>
68 </div>
69 <!-- Answers -->
70 <div class="ays-modal-poll-answers-section">
71 <span><label for="quick_poll_answer-1"><?php echo __('Answers', "poll-maker"); ?></label></span>
72 <div class="quick_poll_answer_box">
73 <input class="quick_poll_answer" name="ays-poll-answers[]" data-id="1" placeholder="<?php echo __('Option*', "poll-maker"); ?>">
74 <button type="button" class="quick_poll_answer_remove"><img src="<?php echo (POLL_MAKER_AYS_ADMIN_URL . '/images/remove-normal.png')?>" alt="remove" width="20px"></button>
75 </div>
76 <div class="quick_poll_answer_box">
77 <input class="quick_poll_answer" name="ays-poll-answers[]" data-id="2" placeholder="<?php echo __('Option*', "poll-maker"); ?>">
78 <button type="button" class="quick_poll_answer_remove"><img src="<?php echo (POLL_MAKER_AYS_ADMIN_URL . '/images/remove-normal.png')?>" alt="remove" width="20px"></button>
79 </div>
80 <div class="quick_poll_answer_box">
81 <input class="quick_poll_answer" name="ays-poll-answers[]" data-id="3" placeholder="<?php echo __('Option*', "poll-maker"); ?>">
82 <button type="button" class="quick_poll_answer_remove"><img src="<?php echo (POLL_MAKER_AYS_ADMIN_URL . '/images/remove-normal.png')?>" alt="remove" width="20px"></button>
83 </div>
84 <button type="button" class="quick_poll_add_option"><div><span>+</span></div><?php echo __('Add an Option', "poll-maker"); ?></button>
85 </div>
86 <div class="quick_poll_divider"></div>
87 <!-- Settings -->
88 <div class="quick_poll_settings">
89 <h4><?php echo __('Settings', "poll-maker"); ?></h4>
90 <!-- Allow not to vote -->
91 <div>
92 <span><?php echo __('Allow not to vote', "poll-maker"); ?></span>
93 <input type="checkbox" id="allow_not_to_vote" name="allow-not-vote" >
94 <label for="allow_not_to_vote">Toggle</label>
95 </div>
96 <!-- Allow multivote -->
97 <div class='multivote-container'>
98 <div>
99 <span><?php echo __('Allow multivote', "poll-maker"); ?></span>
100 <input type="checkbox" id="allow_multivote_switch" name="allow_multivote_switch">
101 <label for="allow_multivote_switch">Toggle</label>
102 </div>
103 <!-- Multivote Settings -->
104 <div class="quick_poll_multivote_settings">
105 <input type="number" id="quick-poll-multivote-min-count" name="quick-poll-multivote-min-count" placeholder="<?php echo __('Min', "poll-maker"); ?>">
106 <input type="number" id="quick-poll-multivote-max-count" name="quick-poll-multivote-max-count" placeholder="<?php echo __('Max', "poll-maker"); ?>">
107 </div>
108 </div>
109 <!-- Show author -->
110 <div>
111 <span><?php echo __('Show author', "poll-maker"); ?></span>
112 <input type="checkbox" name="quick-poll-show_poll_author" id="quick-poll-show-poll-author" value="1">
113 <label for="quick-poll-show-poll-author">Toggle</label>
114 </div>
115 <!-- Show title -->
116 <div>
117 <span><?php echo __('Show title', "poll-maker"); ?></span>
118 <input type="checkbox" name="quick-poll-show-title" id="quick-poll-show-title" checked>
119 <label for="quick-poll-show-title">Toggle</label>
120 </div>
121 <!-- Show creation date -->
122 <div>
123 <span><?php echo __('Show creation date', "poll-maker"); ?></span>
124 <input type="checkbox" name="quick-poll-show-creation-date" id="quick-poll-show-creation-date">
125 <label for="quick-poll-show-creation-date">Toggle</label>
126 </div>
127 <!-- Hide results -->
128 <div>
129 <span><?php echo __('Hide results', "poll-maker"); ?></span>
130 <input type="checkbox" name="quick-poll-hide-results" id="quick-poll-hide-results" value="1">
131 <label for="quick-poll-hide-results">Toggle</label>
132 </div>
133 <!-- Randomize answers -->
134 <div>
135 <span><?php echo __('Randomize answers', "poll-maker"); ?></span>
136 <input type="checkbox" name="quick-poll-randomize-answers" id="quick-poll-randomize-answers">
137 <label for="quick-poll-randomize-answers">Toggle</label>
138 </div>
139 <!-- Enable restart button -->
140 <div>
141 <span><?php echo __('Enable restart button', "poll-maker"); ?></span>
142 <input type="checkbox" name="quick-poll-enable-restart-button" id="quick-poll-enable-restart-button">
143 <label for="quick-poll-enable-restart-button">Toggle</label>
144 </div>
145 <!-- Results bar in RGBA -->
146 <div>
147 <span><?php echo __('Results bar in RGBA', "poll-maker"); ?></span>
148 <input type="checkbox" name="quick-poll-res-rgba" id="quick-poll-res-rgba">
149 <label for="quick-poll-res-rgba">Toggle</label>
150 </div>
151 </div>
152 <!-- Save -->
153 <div class="quick_poll_save">
154 <input type="button" id="ays-save-quick-poll" value="<?php echo __('Save', "poll-maker"); ?>">
155 <input type="hidden" id="ays_poll_ajax_quick_poll_nonce" name="ays_poll_ajax_quick_poll_nonce" value="<?php echo $quick_poll_plugin_nonce; ?>">
156 </div>
157 </form>
158 </div>
159 </div>
160 </div>
161
162 <!-- /////////////// QUICK POLL END ////////////// -->
163 <div id="poststuff">
164 <div id="post-body" class="metabox-holder">
165 <div id="post-body-content">
166 <div class="meta-box-sortables ui-sortable">
167 <?php
168 $this->polls_obj->views();
169 ?>
170 <form method="post">
171 <?php
172 $this->polls_obj->prepare_items();
173 $search = __("Search" , "poll-maker");
174 $this->polls_obj->search_box($search, $this->plugin_name);
175 $this->polls_obj->display();
176 ?>
177 </form>
178 </div>
179 </div>
180 </div>
181 <br class="clear">
182 </div>
183 <div class="ays-poll-create-poll-youtube-video-button-box">
184 <?php echo sprintf( '<a href="?page=%s&action=%s" class="ays-poll-add-new-button-video ays-poll-add-new-button-new-design"> %s ' . __('Add New', "poll-maker") . '</a>', esc_attr( $_REQUEST['page'] ), 'add', $plus_icon_svg);?>
185 </div>
186 <?php if($poll_max_id <= 3): ?>
187 <div class="ays-poll-create-poll-video-box" style="margin: 10px auto 30px;">
188 <div class="ays-poll-create-poll-title">
189 <h4><?php echo __( "Create Your First Poll in Under One Minute", "poll-maker" ); ?></h4>
190 </div>
191 <div class="ays-poll-create-poll-youtube-video">
192 <iframe width="560" height="315" class="ays-poll-youtube-video-responsive" src="https://www.youtube.com/embed/0dfJQdAwdL4" loading="lazy" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
193 </div>
194 </div>
195 <?php else: ?>
196 <div class="ays-poll-create-poll-video-box" style="margin: auto;">
197 <div class="ays-poll-create-poll-youtube-video">
198 <a href="https://www.youtube.com/watch?v=0dfJQdAwdL4" target="_blank" title="YouTube video player" >
199 <img src="<?php echo POLL_MAKER_AYS_ADMIN_URL . '/images/icons/video_youtube_icon.svg' ?>" alt="How to create a Poll in Under One Minute">
200 <span>How to create a Poll in Under One Minute</span>
201 </a>
202 </div>
203 </div>
204 <?php endif ?>
205 </div>
206