Loader->CheckIfPDFAdmin(); $mediaIntegration = new MediaIntegration($this->Loader); $mediaIntegration->EnqueueMedia(); $libraryManager = new LibraryManager($this->Loader); $libraryManager->AddLit(); $libraryManager->AddCore(); $libraryManager->AddCoreUI(); $libraryManager->AddWPTable(); $libraryManager->AddDialog(); $libraryManager->AddPreMadeDialog(); $libraryManager->AddTabs(); $libraryManager->AddSpinner(); $libraryManager->AddAlertDialog(); $previewNonce = \wp_create_nonce('rednaoeasycalculationforms_FormList'); if (!isset($_GET['formid'])) { $libraryManager->AddInputs(); $libraryManager->AddTranslator(array('FormList')); $this->Loader->AddScript('Bootstrap', 'js/dist/RNMainFormList_bundle.js', $libraryManager->dependencies); $this->Loader->AddStyle('Bootstrap', 'js/dist/RNMainFormList_bundle.css'); $formList = new FormListAjax($this->Loader, true); $manager = new DBManager(); $count = $manager->GetVar('select count(*) from ' . $this->Loader->FORM_LIST_TABLE); if ($count == null) $count = 0; $this->Loader->LocalizeScript('RednaoFormListVar', 'Bootstrap', 'FormList', array( 'Records' => $formList->ListForm('form_name', 30, 0, 'asc', '')['Result'], 'IsPr' => $this->Loader->IsPR(), 'IAEnabled' => count((new SettingsRepository($this->Loader))->GetModelNames()) > 0 ? 1 : 0, 'SettingsURL' => IntegrationURL::PageURL('rednao_calculation_form_settings'), 'Count' => $count, 'Templates' => \json_decode(\file_get_contents($this->Loader->DIR . 'Templates/Locals/LocalTemplateList.json')), 'RemoteTemplates' => \json_decode(\file_get_contents($this->Loader->DIR . 'Templates/list.json')), 'URL' => $this->Loader->URL, 'TemplatePreviewURL' => 'https://allinoneforms.rednao.com/form-demo-2/?templateId=', 'ajaxurl' => IntegrationURL::AjaxURL(), 'PreviewURL' => IntegrationURL::PreviewURL() . '&_nonce=' . $previewNonce, 'PageURL' => IntegrationURL::PageURL('rednao_calculation_form') )); echo '
'; } else { $libraryManager->AddFormBuilderDesigner(); $formId = intval($_GET['formid']); $builderOptions = null; if ($formId != 0) { $formRepository = new FormRepository($this->Loader); $builderOptions = $formRepository->GetForm($formId, true)->Options; } $additionalFields = array(); $additionalFields = FilterManager::ApplyFilters('rednao-calculated-fields-get-additional-fields', $additionalFields); $dependencies = array(); /* foreach ($additionalFields as $field) { $dependencies[] = '@' . $field; $this->Loader->AddScript($field, 'js/dist/' . $field . '_bundle.js', array('@form-builder')); } if ($this->Loader->IsPR()) { $fieldsWidthStyle = ['FBDatePicker', 'FBSingleLabel', 'FBDateRange', 'FBFile', 'FBGroupPanel', 'FBFloatPanel', 'FBImagePicker', 'FBList', 'FBRepeater', 'FBSlider', 'FBButtonSelection', 'FBSignature', 'FBColorSwatcher', 'FBTermOfService', 'FBRadio', 'FBCheckBox', 'FBDivider', 'FBSurvey']; foreach ($fieldsWidthStyle as $currentDynamicField) { $this->Loader->AddStyle($currentDynamicField, 'js/dist/' . $currentDynamicField . '_bundle.css'); } } $dependencies = FilterManager::ApplyFilters('rednao-calculated-fields-load-designer', $dependencies); if ($this->Loader->IsPR()) { $this->Loader->AddScript('FormBuilderPr', 'js/dist/FormBuilderPr_bundle.js', array('@form-builder')); } $this->Loader->AddScript('products-builder', 'js/dist/ProductFieldBuilder_bundle.js', array('@form-builder')); $this->Loader->AddStyle('products-builder', 'js/dist/ProductFieldBuilder_bundle.css'); if ($this->Loader->IsPR()) { $this->Loader->AddScript('multiplesteps', 'js/dist/MultipleSteps_bundle.js', array('@form-builder')); $this->Loader->AddScript('multiplestepsdesigner', 'js/dist/MultipleStepsDesigner_bundle.js', array('@products-builder')); $dependencies[] = '@multiplesteps'; $dependencies[] = '@multiplestepsdesigner'; } $dependencies = \apply_filters('easycalculationforms_loading_form_designer', $dependencies); */ $dependencies = \apply_filters('allinoneforms_loading_form_designer', $dependencies); $this->Loader->AddStyle('material', 'styles/themes/Material.css'); $dependencies = \apply_filters('allinoneforms_loading_all_fields', $dependencies); $settingsRepository = new SettingsRepository($this->Loader); $nextNumber = 1; if ($formId != 0) { $options = new OptionsManager(); $formSequence = $this->Loader->Prefix . '_sequence_' . $formId; $nextNumber = $options->GetOption($formSequence, 0) + 1; } $userIntegration = new UserIntegration($this->Loader); $pageIntegration = new PageIntegration($this->Loader); $this->Loader->AddScript('products-builder-runnable', 'js/dist/RNMainRunnableFormBuilder_bundle.js', array_merge($dependencies, $libraryManager->dependencies)); $fieldTemplate = new FieldTemplateRepository($this->Loader); $fontManager = new FontManager(); $fonts = $fontManager->GetFonts(); $fontFaces = ''; foreach ($fonts as $key => $value) { $fontFaces .= $fontManager->GetFontFace($key); } $this->Loader->LocalizeScript('rednaoFormDesigner', 'FormBuilderDesigner', 'FormList', array( 'URL' => $this->Loader->URL, 'FormListURL' => IntegrationURL::PageURL('rednao_calculation_form'), 'IsDesign' => true, 'BuilderOptions' => $builderOptions, 'Pages' => $pageIntegration->GetPageList(), 'IsPr' => $this->Loader->IsPR(), 'SettingsURL' => IntegrationURL::PageURL('rednao_calculation_form_settings'), 'GoogleMapsApiKey' => $settingsRepository->GetGoogleMapsApiKey(), 'PurchaseURL' => 'http://google.com', 'ajaxurl' => IntegrationURL::AjaxURL(), 'PreviewURL' => IntegrationURL::PreviewURL(), 'Recaptcha' => $settingsRepository->GetRecaptchaPublicSettings(), 'Currency' => $settingsRepository->GetCurrency(), 'StatusList' => $settingsRepository->GetFormStatusList(), 'UserRoles' => array(), 'NextNumber' => $nextNumber, 'Roles' => $userIntegration->GetRoles(), 'Fonts' => $fonts, 'DontShowAgain' => get_option($this->Loader->Prefix . '_dont_show_again'), 'FieldTemplates' => $fieldTemplate->GetList(), 'AdditionalOptions' => [ 'FormDesignNonce' => wp_create_nonce('rndesign_form_' . $formId), "URL" => $this->Loader->URL, "GoogleMapsApiKey" => $settingsRepository->GetGoogleMapsApiKey(), 'TCal' => $libraryManager->GetCalendarTranslations() ] )); AIManager::LoadAIVars('FormBuilderDesigner'); echo '
' . __("Loading form builder...") . '
'; if (!Activator::LicenseIsActive() && count(AllInOneForms()->GetActiveAddOns()) > 0) { echo '

You have an AIO Forms plugin active but you haven\'t activated your license yet, please go to the plugin settings and activate your license there.

Important: To activate your license you need to have the essentials add-on active, if you haven\'t installed it yet you can download it directly from your account.

'; } } } }