Skip to content

Commit ac4d2ec

Browse files
authored
fix: Rename form block to trial-form #15 (#16)
- milo now has its own `form` block - renaming the aem trials form block to avoid collisions
1 parent e347c65 commit ac4d2ec

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

blocks/form/form.css renamed to blocks/trial-form/trial-form.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ main .form .highlight {
6767
}
6868

6969
main .dark .form h3,
70-
main .dark .form-text-field-wrapper p,
71-
main .dark .form-submit-message {
70+
main .dark .form .form-text-field-wrapper p,
71+
main .dark .form .form-submit-message {
7272
color: var(--color-white);
7373
}
7474

blocks/form/form.js renamed to blocks/trial-form/trial-form.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,12 @@ async function createForm(formURL) {
115115
return form;
116116
}
117117

118-
const init = async (el) => {
119-
const anchor = el.querySelector('p > a[href$=".json"]');
118+
const decorate = async (block) => {
119+
block.classList.add('form');
120+
const anchor = block.querySelector('p > a[href$=".json"]');
120121
if (anchor) {
121122
anchor.parentElement.replaceWith(await createForm(anchor.href));
122123
}
123124
};
124125

125-
export default init;
126+
export default decorate;

scripts/scripts.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const CONFIG = {
1818
imsClientId: '',
1919
locales: { '': { ietf: 'en-US', tk: 'hah7vzn.css' } },
2020
geoRouting: 'off',
21-
productionDomain: 'aem-trials.adobe.com',
22-
prodDomains: ['aem-trials.adobe.com'],
21+
productionDomain: 'aem-trial.adobe.com',
22+
prodDomains: ['aem-trial.adobe.com'],
2323
useDotHtml: true,
2424
};
2525

@@ -58,7 +58,6 @@ const miloLibs = setLibs(LIBS);
5858

5959
(async function loadPage() {
6060
const { loadArea, setConfig } = await import(`${miloLibs}/utils/utils.js`);
61-
const config = setConfig({ ...CONFIG, miloLibs });
62-
console.log(config);
61+
setConfig({ ...CONFIG, miloLibs });
6362
await loadArea();
6463
}());

0 commit comments

Comments
 (0)