Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable spellcheck for customHTML text box, #PG-4001 #928

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Template/Tag/CustomHtmlTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public function getParameters()
['<a rel="noreferrer noopener" target="_blank" href="' . Url::addCampaignParametersToMatomoLink('https://matomo.org/faq/tag-manager/faq_26815/', null, null, 'App.TagManager.getParameters') . '">', '</a>']
);
$field->validators[] = new NotEmpty();
$field->uiControlAttributes = ['spellcheck' => 'false'];
}),
$this->makeSetting('htmlPosition', 'bodyEnd', FieldConfig::TYPE_STRING, function (FieldConfig $field) {
$field->title = Piwik::translate('TagManager_CustomHtmlHtmlPositionTitle');
Expand Down
16 changes: 12 additions & 4 deletions tests/Integration/Model/TagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ public function testAddContainerTagSuccessMinimal()
'uiControl' => 'textarea',
'uiControlAttributes' =>
[
'spellcheck' => 'false'
],
'availableValues' => null,
'description' => 'This tag is ideal when you need to add for example custom styles or custom JavaScript or when you are looking for a specific tag which is not yet supported. With this tag you can append any HTML to the bottom of your page, add styles, or execute JavaScript. Note: You can replace content within the HTML with variables by putting a variable name in curly brackets like this {{PageUrl}}.',
Expand All @@ -293,7 +294,8 @@ public function testAddContainerTagSuccessMinimal()
'defaultValue' => 'bodyEnd',
'type' => 'string',
'uiControl' => 'select',
'uiControlAttributes' => [],
'uiControlAttributes' => [
],
'availableValues' => [
'headStart' => 'Head Start',
'headEnd' => 'Head End',
Expand Down Expand Up @@ -369,6 +371,7 @@ public function testAddContainerTagSuccessFull()
'uiControl' => 'textarea',
'uiControlAttributes' =>
[
'spellcheck' => 'false'
],
'availableValues' => null,
'description' => 'This tag is ideal when you need to add for example custom styles or custom JavaScript or when you are looking for a specific tag which is not yet supported. With this tag you can append any HTML to the bottom of your page, add styles, or execute JavaScript. Note: You can replace content within the HTML with variables by putting a variable name in curly brackets like this {{PageUrl}}.',
Expand All @@ -388,7 +391,8 @@ public function testAddContainerTagSuccessFull()
'defaultValue' => 'bodyEnd',
'type' => 'string',
'uiControl' => 'select',
'uiControlAttributes' => [],
'uiControlAttributes' => [
],
'availableValues' => [
'headStart' => 'Head Start',
'headEnd' => 'Head End',
Expand Down Expand Up @@ -560,6 +564,7 @@ public function testUpdateContainerTagSuccess()
'uiControl' => 'textarea',
'uiControlAttributes' =>
[
'spellcheck' => 'false'
],
'availableValues' => null,
'description' => 'This tag is ideal when you need to add for example custom styles or custom JavaScript or when you are looking for a specific tag which is not yet supported. With this tag you can append any HTML to the bottom of your page, add styles, or execute JavaScript. Note: You can replace content within the HTML with variables by putting a variable name in curly brackets like this {{PageUrl}}.',
Expand All @@ -579,7 +584,8 @@ public function testUpdateContainerTagSuccess()
'defaultValue' => 'bodyEnd',
'type' => 'string',
'uiControl' => 'select',
'uiControlAttributes' => [],
'uiControlAttributes' => [
],
'availableValues' => [
'headStart' => 'Head Start',
'headEnd' => 'Head End',
Expand Down Expand Up @@ -926,6 +932,7 @@ public function testUpdateParametersSuccess()
'uiControl' => 'textarea',
'uiControlAttributes' =>
[
'spellcheck' => 'false'
],
'availableValues' => null,
'description' => 'This tag is ideal when you need to add for example custom styles or custom JavaScript or when you are looking for a specific tag which is not yet supported. With this tag you can append any HTML to the bottom of your page, add styles, or execute JavaScript. Note: You can replace content within the HTML with variables by putting a variable name in curly brackets like this {{PageUrl}}.',
Expand All @@ -945,7 +952,8 @@ public function testUpdateParametersSuccess()
'defaultValue' => 'bodyEnd',
'type' => 'string',
'uiControl' => 'select',
'uiControlAttributes' => [],
'uiControlAttributes' => [
],
'availableValues' => [
'headStart' => 'Head Start',
'headEnd' => 'Head End',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<type>string</type>
<uiControl>textarea</uiControl>
<uiControlAttributes>
<spellcheck>false</spellcheck>
</uiControlAttributes>
<availableValues />
<description>This tag is ideal when you need to add for example custom styles or custom JavaScript or when you are looking for a specific tag which is not yet supported. With this tag you can append any HTML to the bottom of your page, add styles, or execute JavaScript. Note: You can replace content within the HTML with variables by putting a variable name in curly brackets like this {{PageUrl}}.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<type>string</type>
<uiControl>textarea</uiControl>
<uiControlAttributes>
<spellcheck>false</spellcheck>
</uiControlAttributes>
<availableValues />
<description>This tag is ideal when you need to add for example custom styles or custom JavaScript or when you are looking for a specific tag which is not yet supported. With this tag you can append any HTML to the bottom of your page, add styles, or execute JavaScript. Note: You can replace content within the HTML with variables by putting a variable name in curly brackets like this {{PageUrl}}.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,7 @@
<type>string</type>
<uiControl>textarea</uiControl>
<uiControlAttributes>
<spellcheck>false</spellcheck>
</uiControlAttributes>
<availableValues />
<description>This tag is ideal when you need to add for example custom styles or custom JavaScript or when you are looking for a specific tag which is not yet supported. With this tag you can append any HTML to the bottom of your page, add styles, or execute JavaScript. Note: You can replace content within the HTML with variables by putting a variable name in curly brackets like this {{PageUrl}}.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<type>string</type>
<uiControl>textarea</uiControl>
<uiControlAttributes>
<spellcheck>false</spellcheck>
</uiControlAttributes>
<availableValues />
<description>This tag is ideal when you need to add for example custom styles or custom JavaScript or when you are looking for a specific tag which is not yet supported. With this tag you can append any HTML to the bottom of your page, add styles, or execute JavaScript. Note: You can replace content within the HTML with variables by putting a variable name in curly brackets like this {{PageUrl}}.</description>
Expand Down Expand Up @@ -133,6 +134,7 @@
<type>string</type>
<uiControl>textarea</uiControl>
<uiControlAttributes>
<spellcheck>false</spellcheck>
</uiControlAttributes>
<availableValues />
<description>This tag is ideal when you need to add for example custom styles or custom JavaScript or when you are looking for a specific tag which is not yet supported. With this tag you can append any HTML to the bottom of your page, add styles, or execute JavaScript. Note: You can replace content within the HTML with variables by putting a variable name in curly brackets like this {{PageUrl}}.</description>
Expand Down
Loading