| | |
| | | // Add submenu pages for configured integrations |
| | | foreach ($this->getAvailableServices() as $service) { |
| | | $integration = $this->getService($service); |
| | | if ($integration->isSetUp() && method_exists($integration, 'getAllowedContent') && !empty($integration->getAllowedContent())) { |
| | | |
| | | if (!empty(Registrar::withIntegration($service)) && $integration->isSetUp() && method_exists($integration, 'getAllowedContent') && !empty($integration->getAllowedContent())) { |
| | | add_submenu_page( |
| | | 'jvb-integrations', |
| | | $integration->getTitle() . ' Defaults', |
| | |
| | | wp_enqueue_style( |
| | | 'jvb-dash', |
| | | ); |
| | | wp_enqueue_style( |
| | | 'jvb-forms' |
| | | ); |
| | | |
| | | wp_enqueue_script( |
| | | 'jvb-admin-scripts', |
| | |
| | | public function renderPage(): void |
| | | { |
| | | ?> |
| | | <style> |
| | | form.integration .actions.x-btw.x-btw { |
| | | justify-content: flex-start; |
| | | } |
| | | form.integration button { |
| | | display: flex; |
| | | gap: .5rem; |
| | | padding: .25rem .5rem; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | form.integration button svg { |
| | | width: 1.5em; |
| | | height: 1.5em; |
| | | } |
| | | </style> |
| | | <div class="wrap jvb-admin-wrap"> |
| | | <h1>Integrations</h1> |
| | | |
| | |
| | | <?php |
| | | foreach ($this->getAvailableServices() as $service) { |
| | | $integration = $this->getService($service); |
| | | if ($integration->isSetUp() && method_exists($integration, 'renderConnection')) { |
| | | if (method_exists($integration, 'renderConnection')) { |
| | | $integration->renderConnection(); |
| | | } |
| | | } |
| | |
| | | |
| | | .item-grid.integrations { |
| | | display: grid; |
| | | grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); |
| | | grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); |
| | | gap: 2rem; |
| | | margin-top: 2rem; |
| | | } |
| | |
| | | height: auto; |
| | | } |
| | | |
| | | #wpfooter#wpfooter { |
| | | position: relative; |
| | | } |
| | | </style> |
| | | <?php |
| | | } |