| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) { |
| 3 |
die('Access denied.'); |
| 4 |
} |
| 5 |
?> |
| 6 |
<div class="wrap"> |
| 7 |
<h1><?php _e('Create PDF', 'e2pdf'); ?></h1> |
| 8 |
<hr class="wp-header-end"> |
| 9 |
<?php $this->render('blocks', 'notifications'); ?> |
| 10 |
<h3 class="nav-tab-wrapper wp-clearfix"> |
| 11 |
<a href="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf'))); ?>" class="nav-tab <?php if (!($this->get->get('action'))) { ?>nav-tab-active<?php } ?>"><?php _e('Create PDF', 'e2pdf'); ?></a> |
| 12 |
<a href="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf', 'action' => 'bulk'))); ?>" class="nav-tab <?php if ($this->get->get('action') == 'bulk') { ?>nav-tab-active<?php } ?>"><?php _e('Bulk Create PDFs', 'e2pdf'); ?></a> |
| 13 |
</h3> |
| 14 |
|
| 15 |
<?php if (!$this->get->get('action')) { ?> |
| 16 |
<div class="wrap e2pdf-view-area e2pdf-rel"> |
| 17 |
<form id="e2pdf-export-form" method="post" target="_blank" action="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf', 'action' => 'export'))); ?>" class="e2pdf-export-form"> |
| 18 |
<div class="e2pdf-grid"> |
| 19 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 20 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10 e2pdf-inline-radio e2pdf-align-right e2pdf-export-disposition"> |
| 21 |
<?php |
| 22 |
$this->render('field', 'radio', array( |
| 23 |
'field' => array( |
| 24 |
'name' => 'disposition', |
| 25 |
), |
| 26 |
'value' => 'inline', |
| 27 |
'options' => array( |
| 28 |
'attachment' => __('Download', 'e2pdf'), |
| 29 |
'inline' => __('View', 'e2pdf') |
| 30 |
) |
| 31 |
)); |
| 32 |
?> |
| 33 |
</div> |
| 34 |
</div> |
| 35 |
<div class="e2pdf-grid"> |
| 36 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 37 |
<?php _e('Template', 'e2pdf'); ?>: |
| 38 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 39 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-select2-wrapper"> |
| 40 |
<?php |
| 41 |
$this->render('field', 'select', array( |
| 42 |
'field' => array( |
| 43 |
'name' => 'id', |
| 44 |
'class' => 'e2pdf-export-template e2pdf-w100', |
| 45 |
'_wpnonce' => wp_create_nonce('e2pdf'), |
| 46 |
), |
| 47 |
'value' => '0', |
| 48 |
'options' => $this->controller->get_active_templates(), |
| 49 |
)); |
| 50 |
$this->render('field', 'text', array( |
| 51 |
'field' => array( |
| 52 |
'class' => 'e2pdf-w100 e2pdf-select2', |
| 53 |
'disabled' => 'disabled', |
| 54 |
'placeholder' => __('--- Select ---', 'e2pdf'), |
| 55 |
), |
| 56 |
)); |
| 57 |
?> |
| 58 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-align-right e2pdf-export-template-actions"></div> |
| 59 |
</div> |
| 60 |
</div> |
| 61 |
</div> |
| 62 |
<div class="e2pdf-grid e2pdf-export-item e2pdf-hide"> |
| 63 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 64 |
<?php _e('Dataset', 'e2pdf'); ?>: |
| 65 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 66 |
<div class="e2pdf-ib e2pdf-w100"> |
| 67 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-select2-wrapper e2pdf-dataset-wrapper"> |
| 68 |
<?php |
| 69 |
$this->render('field', 'select', array( |
| 70 |
'field' => array( |
| 71 |
'name' => 'dataset', |
| 72 |
'class' => 'e2pdf-export-dataset e2pdf-w100', |
| 73 |
'_wpnonce' => wp_create_nonce('e2pdf'), |
| 74 |
), |
| 75 |
'value' => '0', |
| 76 |
'options' => array( |
| 77 |
'' => __('--- Select ---', 'e2pdf') |
| 78 |
), |
| 79 |
)); |
| 80 |
?> |
| 81 |
<?php |
| 82 |
$this->render('field', 'text', array( |
| 83 |
'field' => array( |
| 84 |
'disabled' => 'disabled', |
| 85 |
'class' => 'e2pdf-w100 e2pdf-select2', |
| 86 |
'placeholder' => __('--- Select ---', 'e2pdf'), |
| 87 |
), |
| 88 |
)); |
| 89 |
?> |
| 90 |
<a href="javascript:void(0);" class="e2pdf-link e2pdf-datasets-refresh" _wpnonce="<?php echo wp_create_nonce('e2pdf'); ?>"><i class="dashicons dashicons-update"></i></a> |
| 91 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-export-dataset-actions"></div> |
| 92 |
</div> |
| 93 |
</div> |
| 94 |
</div> |
| 95 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-export-item-actions"></div> |
| 96 |
</div> |
| 97 |
<div class="e2pdf-grid e2pdf-export-item e2pdf-hide"> |
| 98 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 99 |
<?php _e('Dataset2', 'e2pdf'); ?>: |
| 100 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 101 |
<div class="e2pdf-ib e2pdf-w100"> |
| 102 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-select2-wrapper e2pdf-dataset-wrapper"> |
| 103 |
<?php |
| 104 |
$this->render('field', 'select', array( |
| 105 |
'field' => array( |
| 106 |
'name' => 'dataset2', |
| 107 |
'class' => 'e2pdf-export-dataset e2pdf-w100', |
| 108 |
'_wpnonce' => wp_create_nonce('e2pdf'), |
| 109 |
), |
| 110 |
'value' => '0', |
| 111 |
'options' => array( |
| 112 |
'' => __('--- Select ---', 'e2pdf') |
| 113 |
), |
| 114 |
)); |
| 115 |
$this->render('field', 'text', array( |
| 116 |
'field' => array( |
| 117 |
'disabled' => 'disabled', |
| 118 |
'class' => 'e2pdf-w100 e2pdf-select2', |
| 119 |
'placeholder' => __('--- Select ---', 'e2pdf'), |
| 120 |
), |
| 121 |
)); |
| 122 |
?> |
| 123 |
<a href="javascript:void(0);" class="e2pdf-link e2pdf-datasets-refresh" _wpnonce="<?php echo wp_create_nonce('e2pdf'); ?>"><i class="dashicons dashicons-update"></i></a> |
| 124 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-export-dataset-actions"></div> |
| 125 |
</div> |
| 126 |
</div> |
| 127 |
</div> |
| 128 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-export-item-actions"></div> |
| 129 |
</div> |
| 130 |
<div class="e2pdf-export-options e2pdf-grid e2pdf-hide"> |
| 131 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 132 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 133 |
<div class="e2pdf-grid"> |
| 134 |
<div class="e2pdf-grid e2pdf-export-shortcodes"> |
| 135 |
<div class='e2pdf-ib e2pdf-w100'> |
| 136 |
<h4 class="e2pdf-center"><?php _e('Shortcodes', 'e2pdf'); ?></h4> |
| 137 |
</div> |
| 138 |
<div class='e2pdf-ib e2pdf-w100'> |
| 139 |
<div class="e2pdf-w100 e2pdf-center"><?php _e("Shortcode for a Download Link with a Dynamic Dataset", 'e2pdf'); ?></div> |
| 140 |
<input readonly="readonly" class="e2pdf-template-shortcode e2pdf-center e2pdf-w100" type="text" value=''> |
| 141 |
</div> |
| 142 |
<div class='e2pdf-dataset-shortcode-wr e2pdf-ib e2pdf-w100 e2pdf-hide'> |
| 143 |
<div class="e2pdf-w100 e2pdf-center"><?php _e("Shortcode for a Download Link with the Current Dataset", 'e2pdf'); ?></div> |
| 144 |
<input readonly="readonly" name="e2pdf-dataset-shortcode" class="e2pdf-dataset-shortcode e2pdf-center e2pdf-w100" type="text" value=''> |
| 145 |
</div> |
| 146 |
</div> |
| 147 |
<div class="e2pdf-grid"> |
| 148 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 149 |
<?php _e('PDF Name', 'e2pdf'); ?>: |
| 150 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 151 |
<?php |
| 152 |
$this->render('field', 'text', array( |
| 153 |
'field' => array( |
| 154 |
'name' => 'options[name]', |
| 155 |
'placeholder' => __('PDF Name', 'e2pdf'), |
| 156 |
'class' => 'e2pdf-w100 e2pdf-export-option' |
| 157 |
), |
| 158 |
'value' => '', |
| 159 |
)); |
| 160 |
?> |
| 161 |
</div> |
| 162 |
</div> |
| 163 |
<div class="e2pdf-grid"> |
| 164 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 165 |
<?php _e('PDF Open Password', 'e2pdf'); ?>: |
| 166 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 167 |
<?php |
| 168 |
$this->render('field', 'text', array( |
| 169 |
'field' => array( |
| 170 |
'name' => 'options[password]', |
| 171 |
'placeholder' => __('Password', 'e2pdf'), |
| 172 |
'class' => 'e2pdf-w100 e2pdf-export-option' |
| 173 |
), |
| 174 |
'value' => '', |
| 175 |
)); |
| 176 |
?> |
| 177 |
</div> |
| 178 |
</div> |
| 179 |
<div class="e2pdf-grid"> |
| 180 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 181 |
<?php _e('User', 'e2pdf'); ?>: |
| 182 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 183 |
<?php |
| 184 |
$this->render('field', 'select', array( |
| 185 |
'field' => array( |
| 186 |
'name' => 'options[user_id]', |
| 187 |
'class' => 'e2pdf-w100 e2pdf-export-option' |
| 188 |
), |
| 189 |
'value' => '0', |
| 190 |
'options' => $this->view->users, |
| 191 |
)); |
| 192 |
?> |
| 193 |
</div> |
| 194 |
</div> |
| 195 |
<div class="e2pdf-grid"> |
| 196 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 197 |
<?php _e('Flatten', 'e2pdf'); ?>: |
| 198 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 199 |
<?php |
| 200 |
$this->render('field', 'select', array( |
| 201 |
'field' => array( |
| 202 |
'name' => 'options[flatten]', |
| 203 |
'class' => 'e2pdf-w100 e2pdf-export-option' |
| 204 |
), |
| 205 |
'value' => '0', |
| 206 |
'options' => array( |
| 207 |
'0' => __('No', 'e2pdf'), |
| 208 |
'1' => __('Yes', 'e2pdf'), |
| 209 |
'2' => __('Full', 'e2pdf'), |
| 210 |
), |
| 211 |
)); |
| 212 |
?> |
| 213 |
</div> |
| 214 |
</div> |
| 215 |
<div class="e2pdf-grid"> |
| 216 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 217 |
<?php _e('Format', 'e2pdf'); ?>: |
| 218 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 219 |
<?php |
| 220 |
$this->render('field', 'select', array( |
| 221 |
'field' => array( |
| 222 |
'name' => 'options[format]', |
| 223 |
'class' => 'e2pdf-w100 e2pdf-export-option' |
| 224 |
), |
| 225 |
'value' => '0', |
| 226 |
'options' => array( |
| 227 |
'pdf' => 'pdf', |
| 228 |
'jpg' => 'jpg', |
| 229 |
), |
| 230 |
)); |
| 231 |
?> |
| 232 |
</div> |
| 233 |
</div> |
| 234 |
<div class="e2pdf-grid"> |
| 235 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 236 |
<?php _e('Arguments', 'e2pdf'); ?>: |
| 237 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 238 |
<?php |
| 239 |
$this->render('field', 'text', array( |
| 240 |
'field' => array( |
| 241 |
'name' => 'options[args]', |
| 242 |
'class' => 'e2pdf-hide e2pdf-w100 e2pdf-export-option' |
| 243 |
), |
| 244 |
)); |
| 245 |
?> |
| 246 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-align-right e2pdf-mb10"> |
| 247 |
<a href="javascript:void(0);" class="e2pdf-link e2pdf-argument-add"><i class="dashicons dashicons-plus"></i></a> <a href="javascript:void(0);" class="e2pdf-link e2pdf-argument-delete"><i class="dashicons dashicons-minus"></i></a> |
| 248 |
</div> |
| 249 |
<div class="e2pdf-arguments"> |
| 250 |
<div class="e2pdf-mb10 e2pdf-argument"> |
| 251 |
<input type="text" class="e2pdf-w100" name="options[args][]" placeholder="arg1"> |
| 252 |
</div> |
| 253 |
</div> |
| 254 |
</div> |
| 255 |
</div> |
| 256 |
</div> |
| 257 |
|
| 258 |
</div> |
| 259 |
</div> |
| 260 |
<div class="e2pdf-center"> |
| 261 |
<input type="submit" form-id="e2pdf-export-form" disabled="disabled" class="e2pdf-export-form-submit button-primary button-large" value="<?php _e('Create PDF', 'e2pdf'); ?>"> |
| 262 |
</div> |
| 263 |
</form> |
| 264 |
</div> |
| 265 |
<?php } elseif ($this->get->get('action') == 'bulk') { ?> |
| 266 |
<div class="wrap e2pdf-view-area e2pdf-rel"> |
| 267 |
<form id="e2pdf-export-form" method="post" action="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf', 'action' => 'bulk'))); ?>" class="e2pdf-export-form"> |
| 268 |
<input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('e2pdf'); ?>"> |
| 269 |
<div class="e2pdf-grid"> |
| 270 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 271 |
<?php _e('Template', 'e2pdf'); ?>: |
| 272 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 273 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-select2-wrapper"> |
| 274 |
<?php |
| 275 |
$this->render('field', 'select', array( |
| 276 |
'field' => array( |
| 277 |
'name' => 'id', |
| 278 |
'class' => 'e2pdf-export-template e2pdf-w100', |
| 279 |
'_wpnonce' => wp_create_nonce('e2pdf'), |
| 280 |
), |
| 281 |
'value' => '0', |
| 282 |
'options' => $this->controller->get_active_templates(), |
| 283 |
)); |
| 284 |
$this->render('field', 'text', array( |
| 285 |
'field' => array( |
| 286 |
'class' => 'e2pdf-w100 e2pdf-select2', |
| 287 |
'disabled' => 'disabled', |
| 288 |
'placeholder' => __('--- Select ---', 'e2pdf'), |
| 289 |
), |
| 290 |
)); |
| 291 |
?> |
| 292 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-align-right e2pdf-export-template-actions"></div> |
| 293 |
</div> |
| 294 |
</div> |
| 295 |
</div> |
| 296 |
<div class="e2pdf-grid e2pdf-export-item e2pdf-hide"> |
| 297 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 298 |
<?php _e('Dataset', 'e2pdf'); ?>: |
| 299 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 300 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-mb20"> |
| 301 |
<div class="e2pdf-ib e2pdf-w70 e2pdf-pr5"></div><div class="e2pdf-ib e2pdf-w30 e2pdf-pl5"> |
| 302 |
<?php |
| 303 |
$this->render('field', 'text', array( |
| 304 |
'field' => array( |
| 305 |
'name' => 'search', |
| 306 |
'class' => 'e2pdf-w100 e2pdf-export-dataset-search', |
| 307 |
'field' => 'dataset', |
| 308 |
'placeholder' => __('Filter...', 'e2pdf'), |
| 309 |
), |
| 310 |
)); |
| 311 |
?> |
| 312 |
</div> |
| 313 |
</div> |
| 314 |
<div class="e2pdf-ib e2pdf-w100"> |
| 315 |
<div class="e2pdf-ib e2pdf-w100"> |
| 316 |
<?php |
| 317 |
$this->render('field', 'fieldset', array( |
| 318 |
'field' => array( |
| 319 |
'name' => 'dataset', |
| 320 |
'class' => 'e2pdf-export-dataset e2pdf-w100' |
| 321 |
), |
| 322 |
'value' => '0', |
| 323 |
'options' => array( |
| 324 |
'' => __('--- Select ---', 'e2pdf') |
| 325 |
), |
| 326 |
)); |
| 327 |
?> |
| 328 |
</div> |
| 329 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-export-dataset-actions"></div> |
| 330 |
</div> |
| 331 |
</div> |
| 332 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-export-item-actions"></div> |
| 333 |
</div> |
| 334 |
<div class="e2pdf-export-options e2pdf-grid e2pdf-hide"> |
| 335 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 336 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 337 |
<div class="e2pdf-grid"> |
| 338 |
<div class="e2pdf-grid"> |
| 339 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 340 |
<?php _e('PDF Name', 'e2pdf'); ?>: |
| 341 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 342 |
<?php |
| 343 |
$this->render('field', 'text', array( |
| 344 |
'field' => array( |
| 345 |
'name' => 'options[name]', |
| 346 |
'placeholder' => __('PDF Name', 'e2pdf'), |
| 347 |
'class' => 'e2pdf-w100 e2pdf-export-option' |
| 348 |
), |
| 349 |
'value' => '', |
| 350 |
)); |
| 351 |
?> |
| 352 |
</div> |
| 353 |
</div> |
| 354 |
<div class="e2pdf-grid"> |
| 355 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 356 |
<?php _e('PDF Name', 'e2pdf'); ?>: |
| 357 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 358 |
<?php |
| 359 |
$this->render('field', 'text', array( |
| 360 |
'field' => array( |
| 361 |
'name' => 'options[savename]', |
| 362 |
'placeholder' => __('PDF Name', 'e2pdf'), |
| 363 |
'class' => 'e2pdf-w100 e2pdf-export-option' |
| 364 |
), |
| 365 |
'value' => '', |
| 366 |
)); |
| 367 |
?> |
| 368 |
</div> |
| 369 |
</div> |
| 370 |
<div class="e2pdf-grid"> |
| 371 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 372 |
<?php _e('PDF Open Password', 'e2pdf'); ?>: |
| 373 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 374 |
<?php |
| 375 |
$this->render('field', 'text', array( |
| 376 |
'field' => array( |
| 377 |
'name' => 'options[password]', |
| 378 |
'placeholder' => __('Password', 'e2pdf'), |
| 379 |
'class' => 'e2pdf-w100 e2pdf-export-option' |
| 380 |
), |
| 381 |
'value' => '', |
| 382 |
)); |
| 383 |
?> |
| 384 |
</div> |
| 385 |
</div> |
| 386 |
<div class="e2pdf-grid"> |
| 387 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 388 |
<?php _e('User', 'e2pdf'); ?>: |
| 389 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 390 |
<?php |
| 391 |
$this->render('field', 'select', array( |
| 392 |
'field' => array( |
| 393 |
'name' => 'options[user_id]', |
| 394 |
'class' => 'e2pdf-w100 e2pdf-export-option' |
| 395 |
), |
| 396 |
'value' => '0', |
| 397 |
'options' => $this->view->users, |
| 398 |
)); |
| 399 |
?> |
| 400 |
</div> |
| 401 |
</div> |
| 402 |
|
| 403 |
<div class="e2pdf-grid"> |
| 404 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 405 |
<?php _e('Flatten', 'e2pdf'); ?>: |
| 406 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 407 |
<?php |
| 408 |
$this->render('field', 'select', array( |
| 409 |
'field' => array( |
| 410 |
'name' => 'options[flatten]', |
| 411 |
'class' => 'e2pdf-w100 e2pdf-export-option' |
| 412 |
), |
| 413 |
'value' => '0', |
| 414 |
'options' => array( |
| 415 |
'0' => __('No', 'e2pdf'), |
| 416 |
'1' => __('Yes', 'e2pdf'), |
| 417 |
'2' => __('Full', 'e2pdf'), |
| 418 |
), |
| 419 |
)); |
| 420 |
?> |
| 421 |
</div> |
| 422 |
</div> |
| 423 |
<div class="e2pdf-grid"> |
| 424 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 425 |
<?php _e('Format', 'e2pdf'); ?>: |
| 426 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 427 |
<?php |
| 428 |
$this->render('field', 'select', array( |
| 429 |
'field' => array( |
| 430 |
'name' => 'options[format]', |
| 431 |
'class' => 'e2pdf-w100 e2pdf-export-option' |
| 432 |
), |
| 433 |
'value' => '0', |
| 434 |
'options' => array( |
| 435 |
'pdf' => 'pdf', |
| 436 |
'jpg' => 'jpg', |
| 437 |
), |
| 438 |
)); |
| 439 |
?> |
| 440 |
</div> |
| 441 |
</div> |
| 442 |
<div class="e2pdf-grid"> |
| 443 |
<div class="e2pdf-ib e2pdf-w30 e2pdf-pr10"> |
| 444 |
<?php _e('Arguments', 'e2pdf'); ?>: |
| 445 |
</div><div class="e2pdf-ib e2pdf-w70 e2pdf-pl10"> |
| 446 |
<?php |
| 447 |
$this->render('field', 'text', array( |
| 448 |
'field' => array( |
| 449 |
'name' => 'options[args]', |
| 450 |
'class' => 'e2pdf-hide e2pdf-w100 e2pdf-export-option' |
| 451 |
), |
| 452 |
)); |
| 453 |
?> |
| 454 |
<div class="e2pdf-ib e2pdf-w100 e2pdf-align-right e2pdf-mb10"> |
| 455 |
<a href="javascript:void(0);" class="e2pdf-link e2pdf-argument-add"><i class="dashicons dashicons-plus"></i></a> <a href="javascript:void(0);" class="e2pdf-link e2pdf-argument-delete"><i class="dashicons dashicons-minus"></i></a> |
| 456 |
</div> |
| 457 |
<div class="e2pdf-arguments"> |
| 458 |
<div class="e2pdf-mb10 e2pdf-argument"> |
| 459 |
<input type="text" class="e2pdf-w100" name="options[args][]" placeholder="arg1"> |
| 460 |
</div> |
| 461 |
</div> |
| 462 |
</div> |
| 463 |
</div> |
| 464 |
</div> |
| 465 |
|
| 466 |
</div> |
| 467 |
</div> |
| 468 |
<div class="e2pdf-center"> |
| 469 |
<input type="button" form-id="e2pdf-export-form" action="e2pdf_bulk_create" disabled="disabled" class="e2pdf-submit-form e2pdf-export-form-submit button-primary button-large" value="<?php _e('Bulk Create PDFs', 'e2pdf'); ?>" _wpnonce="<?php echo wp_create_nonce('e2pdf'); ?>"> |
| 470 |
</div> |
| 471 |
</form> |
| 472 |
</div> |
| 473 |
<?php if ($this->controller->get_bulks_list()) { ?> |
| 474 |
<div class="e2pdf-ib wrap e2pdf-view-area e2pdf-rel e2pdf-bulks-list"> |
| 475 |
<div class="e2pdf-grid"> |
| 476 |
<div class="e2pdf-ib e2pdf-w10">ID |
| 477 |
</div><div class="e2pdf-ib e2pdf-w50"> |
| 478 |
<?php _e("Template", 'e2pdf'); ?></div><div class="e2pdf-ib e2pdf-w20"> |
| 479 |
<?php _e("Progress", 'e2pdf'); ?></div><div class="e2pdf-ib e2pdf-w10"> |
| 480 |
<?php _e("Actions", 'e2pdf'); ?></div><div class="e2pdf-ib e2pdf-w10"> |
| 481 |
<?php _e("Created", 'e2pdf'); ?></div> |
| 482 |
</div> |
| 483 |
<?php foreach ($this->controller->get_bulks_list() as $key => $bulk) { ?> |
| 484 |
<div class="e2pdf-grid e2pdf-mt10 e2pdf-bulk" bulk="<?php echo (int) $bulk->get('ID'); ?>" status="<?php echo esc_attr($bulk->get('status')); ?>"> |
| 485 |
<div class="e2pdf-ib e2pdf-w10"><?php echo (int) $bulk->get('ID'); ?> |
| 486 |
</div><div class="e2pdf-ib e2pdf-w50"> |
| 487 |
<?php if ($bulk->get('template')) { ?> |
| 488 |
<a target="_blank" href="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf-templates', 'action' => 'edit', 'id' => $bulk->get('template')->get('ID')))); ?>"><?php echo esc_html($bulk->get('template')->get('title')); ?></a></strong> |
| 489 |
<?php } else { ?> |
| 490 |
<?php echo (int) $bulk->get('template_id'); ?> |
| 491 |
<?php } ?> |
| 492 |
</div><div class="e2pdf-ib e2pdf-w20"> |
| 493 |
<span class="spinner is-active"></span><span class="e2pdf-bulk-count"><?php echo (int) $bulk->get('count'); ?></span>/<?php echo (int) $bulk->get('total'); ?></div><div class="e2pdf-ib e2pdf-w10"> |
| 494 |
<?php if ($bulk->get('status') == 'completed') { ?> |
| 495 |
<a class="e2pdf-link" href="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf', 'action' => 'bulk', 'uid' => $bulk->get('uid')))); ?>"><i class="dashicons dashicons-download"></i></a> |
| 496 |
<?php } ?> |
| 497 |
<?php if ($bulk->get('status') == 'stop') { ?> |
| 498 |
<a class="e2pdf-link e2pdf-bulk-action" action="start" bulk="<?php echo (int) $bulk->get('ID'); ?>" href="javascript:void(0)" _wpnonce="<?php echo wp_create_nonce('e2pdf'); ?>"><i class="dashicons dashicons-controls-play"></i></a> |
| 499 |
<?php } elseif ($bulk->get('status') != 'completed') { ?> |
| 500 |
<a class="e2pdf-link e2pdf-bulk-action" action="stop" bulk="<?php echo (int) $bulk->get('ID'); ?>" href="javascript:void(0)" _wpnonce="<?php echo wp_create_nonce('e2pdf'); ?>"><i class="dashicons dashicons-controls-pause"></i></a> |
| 501 |
<?php } ?> |
| 502 |
<a class="e2pdf-link e2pdf-bulk-action" action="delete" bulk="<?php echo (int) $bulk->get('ID'); ?>" href="javascript:void(0)" _wpnonce="<?php echo wp_create_nonce('e2pdf'); ?>"><i class="dashicons dashicons-no"></i></a> |
| 503 |
</div><div class="e2pdf-ib e2pdf-w10"> |
| 504 |
<?php echo esc_html(get_date_from_gmt($bulk->get('created_at'))); ?> |
| 505 |
</div> |
| 506 |
</div> |
| 507 |
<?php } ?> |
| 508 |
</div> |
| 509 |
<?php } ?> |
| 510 |
<?php } ?> |
| 511 |
</div> |
| 512 |
<?php $this->render('blocks', 'debug-panel'); ?> |