From 162631755c685d8d3fd2a9ef19438c58258dedb9 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 13 Sep 2019 20:23:16 -0400 Subject: [PATCH] Fix login error due to stale constant in afform_html_civicrm_check() --- ext/afform/html/afform_html.php | 6 +++++- ext/afform/html/ang/afMoncao.ang.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ext/afform/html/afform_html.php b/ext/afform/html/afform_html.php index fc81ca2ab4..f5fcfed3da 100644 --- a/ext/afform/html/afform_html.php +++ b/ext/afform/html/afform_html.php @@ -3,6 +3,10 @@ require_once 'afform_html.civix.php'; use CRM_AfformHtml_ExtensionUtil as E; +if (!defined('AFFORM_HTML_MONACO')) { + define('AFFORM_HTML_MONACO', 'node_modules/monaco-editor/min/vs'); +} + /** * Implements hook_civicrm_config(). * @@ -166,7 +170,7 @@ function afform_html_civicrm_navigationMenu(&$menu) { * Implements hook_civicrm_check(). */ function afform_html_civicrm_check(&$messages) { - $dir = E::path(CRM_AfformHtml_Page_HtmlEditor::MONACO_DIR); + $dir = E::path(AFFORM_HTML_MONACO); if (!file_exists($dir)) { $messages[] = new CRM_Utils_Check_Message( 'afform_html_monaco', diff --git a/ext/afform/html/ang/afMoncao.ang.php b/ext/afform/html/ang/afMoncao.ang.php index a1c6c88687..2f896db75d 100644 --- a/ext/afform/html/ang/afMoncao.ang.php +++ b/ext/afform/html/ang/afMoncao.ang.php @@ -5,7 +5,7 @@ return array( 'js' => [ - 'node_modules/monaco-editor/min/vs/loader.js', + AFFORM_HTML_MONACO . '/loader.js', 'ang/afMoncao.js', // 'ang/afMoncao/*.js', // 'ang/afMoncao/*/*.js', @@ -15,7 +15,7 @@ return array( 'requires' => ['crmUi', 'crmUtil'], 'settings' => [ 'paths' => [ - 'vs' => CRM_AfformHtml_ExtensionUtil::url('node_modules/monaco-editor/min/vs'), + 'vs' => CRM_AfformHtml_ExtensionUtil::url(AFFORM_HTML_MONACO), ], ], 'basePages' => [], -- 2.25.1