| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) { |
| 3 |
die('Access denied.'); |
| 4 |
} |
| 5 |
?> |
| 6 |
<div class="wrap"> |
| 7 |
<h1><?php _e('Integrations', 'e2pdf'); ?></h1> |
| 8 |
<hr class="wp-header-end"> |
| 9 |
<?php $this->render('blocks', 'notifications'); ?> |
| 10 |
<h3 class="nav-tab-wrapper wp-clearfix"> |
| 11 |
<?php foreach ($this->view->groups as $group_key => $group) { ?> |
| 12 |
<?php if (isset($group['action']) && isset($group['group'])) { ?> |
| 13 |
<a href="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf-integrations', 'action' => $group['action'], 'group' => $group['group']))); ?>" class="nav-tab <?php if ($this->get->get('action') === $group['action'] && $this->get->get('group') === $group['group']) { ?>nav-tab-active<?php } ?>"><?php echo esc_html($group['name']); ?></a> |
| 14 |
<?php } elseif (isset($group['action'])) { ?> |
| 15 |
<a href="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf-integrations', 'action' => $group['action']))); ?>" class="nav-tab <?php if ($this->get->get('action') === $group['action']) { ?>nav-tab-active<?php } ?>"><?php echo esc_html($group['name']); ?></a> |
| 16 |
<?php } else { ?> |
| 17 |
<a href="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf-integrations'))); ?>" class="nav-tab <?php if (!$this->get->get('action')) { ?>nav-tab-active<?php } ?>"><?php echo esc_html($group['name']); ?></a> |
| 18 |
<?php } ?> |
| 19 |
<?php } ?> |
| 20 |
</h3> |
| 21 |
<div class="wrap"> |
| 22 |
<div class="e2pdf-view-area"> |
| 23 |
<?php if (isset($group['action']) && isset($group['group'])) { ?> |
| 24 |
<form method="post" action="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf-integrations', 'action' => $this->get->get('action'), 'group' => $this->get->get('group')))); ?>"> |
| 25 |
<?php } elseif (isset($group['action'])) { ?> |
| 26 |
<form method="post" action="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf-integrations', 'action' => $this->get->get('action')))); ?>"> |
| 27 |
<?php } else { ?> |
| 28 |
<form method="post" action="<?php echo esc_url($this->helper->get_url(array('page' => 'e2pdf-integrations'))); ?>"> |
| 29 |
<?php } ?> |
| 30 |
<input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('e2pdf_integrations'); ?>"> |
| 31 |
<ul class="e2pdf-options-list"> |
| 32 |
<?php if (!$this->get->get('action')) { ?> |
| 33 |
<li> |
| 34 |
<div class="e2pdf-name">Zapier App:</div><div class="e2pdf-value"> |
| 35 |
<a target="_blank" href="https://zapier.com/developer/public-invite/214896/76ba60a93b9a47be4156be6bb77b6ce9/">https://zapier.com/developer/public-invite/214896/76ba60a93b9a47be4156be6bb77b6ce9/</a> |
| 36 |
</div> |
| 37 |
</li> |
| 38 |
<?php } ?> |
| 39 |
<?php |
| 40 |
$this->render('field', 'group', array( |
| 41 |
'groups' => $this->view->options |
| 42 |
)); |
| 43 |
?> |
| 44 |
</ul> |
| 45 |
<?php if ($this->get->get('action')) { ?> |
| 46 |
<?php submit_button(); ?> |
| 47 |
<?php } ?> |
| 48 |
</form> |
| 49 |
</div> |
| 50 |
</div> |
| 51 |
</div> |
| 52 |
<?php $this->render('blocks', 'debug-panel'); ?> |