diff --git a/api/menu/uploadHeader.cfm b/api/menu/uploadHeader.cfm index 24331a0..de9d96d 100644 --- a/api/menu/uploadHeader.cfm +++ b/api/menu/uploadHeader.cfm @@ -64,8 +64,17 @@ if (bizId LTE 0) { + + + + + + + + + - + diff --git a/portal/portal.js b/portal/portal.js index fb24814..665a09e 100644 --- a/portal/portal.js +++ b/portal/portal.js @@ -758,12 +758,12 @@ const Portal = { document.getElementById('settingState').value = biz.ADDRESSSTATE || ''; document.getElementById('settingZip').value = biz.ADDRESSZIP || ''; - // Load brand color if set + // Load brand color if set (DB stores without #, CSS needs it) const brandColor = biz.BRANDCOLOR || ''; if (brandColor) { - this.brandColor = brandColor; + this.brandColor = brandColor.charAt(0) === '#' ? brandColor : '#' + brandColor; const swatch = document.getElementById('brandColorSwatch'); - if (swatch) swatch.style.backgroundColor = brandColor; + if (swatch) swatch.style.backgroundColor = this.brandColor; } // Load header preview @@ -774,7 +774,7 @@ const Portal = { headerPreview.onload = function() { if (headerWrapper) headerWrapper.style.display = 'block'; }; - headerPreview.src = `${headerUrl}?t=${Date.now()}`; + headerPreview.src = `${BASE_PATH}${headerUrl}?t=${Date.now()}`; } // Render hours editor