Reverts changes to the renaming of 'helpInfoBelowLabel' to keep compatibility.

This commit is contained in:
mateuswetah 2021-11-16 14:57:24 -03:00
parent 76e71a6714
commit 3b227b15dc
8 changed files with 36 additions and 36 deletions

View File

@ -33,7 +33,7 @@
({{ itemMetadatum.metadatum.metadata_type_object.name }})
</span>
<help-button
v-if="!$parent.hideHelpButtons && !$parent.helpInfoBelowLabel && itemMetadatum.metadatum && itemMetadatum.metadatum.description"
v-if="!$parent.hideHelpButtons && !$parent.helpInfoBellowLabel && itemMetadatum.metadatum && itemMetadatum.metadatum.description"
:title="itemMetadatum.metadatum.name"
:message="itemMetadatum.metadatum.description"/>
</span>
@ -43,7 +43,7 @@
v-if="isTextInputComponent">
<p
class="metadatum-description-help-info"
v-if="!$parent.hideHelpButtons && $parent.helpInfoBelowLabel && itemMetadatum.metadatum && itemMetadatum.metadatum.description">
v-if="!$parent.hideHelpButtons && $parent.helpInfoBellowLabel && itemMetadatum.metadatum && itemMetadatum.metadatum.description">
{{ itemMetadatum.metadatum.description }}
</p>
<component
@ -99,7 +99,7 @@
v-if="!isTextInputComponent">
<p
class="metadatum-description-help-info"
v-if="!$parent.hideHelpButtons && $parent.helpInfoBelowLabel && itemMetadatum.metadatum && itemMetadatum.metadatum.description">
v-if="!$parent.hideHelpButtons && $parent.helpInfoBellowLabel && itemMetadatum.metadatum && itemMetadatum.metadatum.description">
{{ itemMetadatum.metadatum.description }}
</p>
<component

View File

@ -135,7 +135,7 @@
"type": "String",
"default": "Go to the item page"
},
"helpInfoBelowLabel": {
"helpInfoBellowLabel": {
"type": "Boolean",
"default": false
},

View File

@ -128,7 +128,7 @@ export default [
"type": "String",
"default": "Go to the item page"
},
"helpInfoBelowLabel": {
"helpInfoBellowLabel": {
"type": "Boolean",
"default": false
}
@ -168,7 +168,7 @@ export default [
sentFormMessage,
showItemLinkButton,
itemLinkButtonLabel,
helpInfoBelowLabel
helpInfoBellowLabel
} = attributes;
return <div
@ -207,7 +207,7 @@ export default [
metadata-section-label={ metadataSectionLabel }
show-item-link-button={ showItemLinkButton ? showItemLinkButton.toString() : 'false' }
item-link-button-label={ itemLinkButtonLabel ? itemLinkButtonLabel : __( 'Go to the item page', 'tainacan' ) }
help-info-bellow-label={ helpInfoBelowLabel ? helpInfoBelowLabel.toString() : 'false' } >
help-info-bellow-label={ helpInfoBellowLabel ? helpInfoBellowLabel.toString() : 'false' } >
</div>
</div>
}
@ -339,7 +339,7 @@ export default [
type: String,
default: __( 'Go to the item page', 'tainacan' )
},
helpInfoBelowLabel: {
helpInfoBellowLabel: {
type: Boolean,
default: false
},
@ -379,7 +379,7 @@ export default [
sentFormMessage,
showItemLinkButton,
itemLinkButtonLabel,
helpInfoBelowLabel
helpInfoBellowLabel
} = attributes;
return <div
@ -417,12 +417,12 @@ export default [
metadata-section-label={ metadataSectionLabel }
show-item-link-button={ showItemLinkButton ? showItemLinkButton.toString() : 'false' }
item-link-button-label={ itemLinkButtonLabel ? itemLinkButtonLabel : __( 'Go to the item page', 'tainacan' ) }
help-info-bellow-label={ helpInfoBelowLabel ? helpInfoBelowLabel.toString() : 'false' } >
help-info-bellow-label={ helpInfoBellowLabel ? helpInfoBellowLabel.toString() : 'false' } >
</div>
</div>
}
},
/* Depecrated on Tainacan 0.18.3, due to the introduction of helpInfoBelowLabel */
/* Depecrated on Tainacan 0.18.3, due to the introduction of helpInfoBellowLabel */
{
attributes: {
collectionId: {

View File

@ -54,7 +54,7 @@ export default function ({ attributes, setAttributes, className, isSelected, cli
metadataSectionLabel,
showItemLinkButton,
itemLinkButtonLabel,
helpInfoBelowLabel,
helpInfoBellowLabel,
showTermsAgreementCheckbox,
termsAgreementMessage
} = attributes;
@ -356,11 +356,11 @@ export default function ({ attributes, setAttributes, className, isSelected, cli
<ToggleControl
label={__('Help info below label', 'tainacan')}
help={ helpInfoBelowLabel ? __('Show the help info below the label instead of hidden in the "?" icon on the help tooltip.', 'tainacan') : __('Do not show the help info below the label, keep it on the "?" icon toolip.', 'tainacan')}
checked={ helpInfoBelowLabel }
help={ helpInfoBellowLabel ? __('Show the help info below the label instead of hidden in the "?" icon on the help tooltip.', 'tainacan') : __('Do not show the help info below the label, keep it on the "?" icon toolip.', 'tainacan')}
checked={ helpInfoBellowLabel }
onChange={ ( isChecked ) => {
helpInfoBelowLabel = isChecked;
setAttributes({ helpInfoBelowLabel: isChecked });
helpInfoBellowLabel = isChecked;
setAttributes({ helpInfoBellowLabel: isChecked });
}
}
/>
@ -570,8 +570,8 @@ export default function ({ attributes, setAttributes, className, isSelected, cli
<div>
{ documentSectionLabel ?
<span>
<span style={{ display: 'flex', alignItems: 'baseline', marginBottom: '5px' }}><span class="fake-text section-label"></span>{ !hideHelpButtons && !helpInfoBelowLabel ? <span class="fake-text fake-help-button"></span> : null }</span>
{ (!hideHelpButtons && helpInfoBelowLabel) ? <div><span class="fake-text fake-text-help-description"></span></div> : null }
<span style={{ display: 'flex', alignItems: 'baseline', marginBottom: '5px' }}><span class="fake-text section-label"></span>{ !hideHelpButtons && !helpInfoBellowLabel ? <span class="fake-text fake-help-button"></span> : null }</span>
{ (!hideHelpButtons && helpInfoBellowLabel) ? <div><span class="fake-text fake-text-help-description"></span></div> : null }
</span>
: null }
{ [ hideFileModalButton, hideTextModalButton, hideLinkModalButton ].filter((option) => { return option == false }).length > 1 ?
@ -601,8 +601,8 @@ export default function ({ attributes, setAttributes, className, isSelected, cli
<div style={{ display: 'flex', flexDirection: 'column' }}>
{ !thumbnailSectionLabel ?
<span>
<span style={{ display: 'flex', alignItems: 'baseline' }}><span class="fake-text section-label"></span>{ !hideHelpButtons && !helpInfoBelowLabel ? <span class="fake-text fake-help-button"></span> : null }</span>
{ (!hideHelpButtons && helpInfoBelowLabel) ? <div><span class="fake-text fake-text-help-description"></span></div> : null }
<span style={{ display: 'flex', alignItems: 'baseline' }}><span class="fake-text section-label"></span>{ !hideHelpButtons && !helpInfoBellowLabel ? <span class="fake-text fake-help-button"></span> : null }</span>
{ (!hideHelpButtons && helpInfoBellowLabel) ? <div><span class="fake-text fake-text-help-description"></span></div> : null }
</span>
: null }
<div class="fake-switch"><span class="fake-icon"></span><span class="fake-text"></span></div>
@ -629,8 +629,8 @@ export default function ({ attributes, setAttributes, className, isSelected, cli
showAllowCommentsSection ?
(
<div>
<span style={{ display: 'flex', alignItems: 'baseline' }}><span class="fake-text section-label"></span>{ !hideHelpButtons && !helpInfoBelowLabel ? <span class="fake-text fake-help-button"></span> : null }</span>
{ (!hideHelpButtons && helpInfoBelowLabel) ? <div><span class="fake-text fake-text-help-description"></span></div> : null }
<span style={{ display: 'flex', alignItems: 'baseline' }}><span class="fake-text section-label"></span>{ !hideHelpButtons && !helpInfoBellowLabel ? <span class="fake-text fake-help-button"></span> : null }</span>
{ (!hideHelpButtons && helpInfoBellowLabel) ? <div><span class="fake-text fake-text-help-description"></span></div> : null }
<div class="fake-switch"><span class="fake-icon"></span><span class="fake-text"></span></div>
</div>
) : null }
@ -647,8 +647,8 @@ export default function ({ attributes, setAttributes, className, isSelected, cli
<div class={ 'fake-metadata' + (!hideCollapses ? ' has-collapse' : '') }>
{ !hideCollapses ? <span class="fake-collapse-arrow"></span> : null }
<span style={{ lineHeight: '0em' }}>
<span class="fake-text"></span>{ !hideMetadataTypes ? <span class="fake-text fake-text-info"></span> : null }{ !hideHelpButtons && !helpInfoBelowLabel ? <span class="fake-text fake-help-button"></span> : null }
{ (!hideHelpButtons && helpInfoBelowLabel) ? <div><span class="fake-text fake-text-help-description"></span></div> : null }
<span class="fake-text"></span>{ !hideMetadataTypes ? <span class="fake-text fake-text-info"></span> : null }{ !hideHelpButtons && !helpInfoBellowLabel ? <span class="fake-text fake-help-button"></span> : null }
{ (!hideHelpButtons && helpInfoBellowLabel) ? <div><span class="fake-text fake-text-help-description"></span></div> : null }
</span>
<span class="fake-input"></span>
</div>

View File

@ -29,12 +29,12 @@
class="section-label">
<label>{{ documentSectionLabel }}</label>
<help-button
v-if="!hideHelpButtons && !helpInfoBelowLabel && $i18n.getHelperMessage('items', 'document')"
v-if="!hideHelpButtons && !helpInfoBellowLabel && $i18n.getHelperMessage('items', 'document')"
:title="$i18n.getHelperTitle('items', 'document')"
:message="$i18n.getHelperMessage('items', 'document')"/>
<p
class="metadatum-description-help-info"
v-if="!hideHelpButtons && helpInfoBelowLabel && $i18n.getHelperMessage('items', 'document')">
v-if="!hideHelpButtons && helpInfoBellowLabel && $i18n.getHelperMessage('items', 'document')">
{{ $i18n.getHelperMessage('items', 'document') }}
</p>
</div>
@ -195,12 +195,12 @@
class="section-label">
<label>{{ thumbnailSectionLabel }}</label>
<help-button
v-if="!hideHelpButtons && !helpInfoBelowLabel && $i18n.getHelperMessage('items', '_thumbnail_id')"
v-if="!hideHelpButtons && !helpInfoBellowLabel && $i18n.getHelperMessage('items', '_thumbnail_id')"
:title="$i18n.getHelperTitle('items', '_thumbnail_id')"
:message="$i18n.getHelperMessage('items', '_thumbnail_id')"/>
<p
class="metadatum-description-help-info"
v-if="!hideHelpButtons && helpInfoBelowLabel && $i18n.getHelperMessage('items', '_thumbnail_id')">
v-if="!hideHelpButtons && helpInfoBellowLabel && $i18n.getHelperMessage('items', '_thumbnail_id')">
{{ $i18n.getHelperMessage('items', '_thumbnail_id') }}
</p>
</div>
@ -338,12 +338,12 @@
<div class="section-label">
<label>{{ $i18n.get('label_comments') }}</label>
<help-button
v-if="!hideHelpButtons && !helpInfoBelowLabel && $i18n.getHelperMessage('items', 'comment_status')"
v-if="!hideHelpButtons && !helpInfoBellowLabel && $i18n.getHelperMessage('items', 'comment_status')"
:title="$i18n.getHelperTitle('items', 'comment_status')"
:message="$i18n.getHelperMessage('items', 'comment_status')"/>
<p
class="metadatum-description-help-info"
v-if="!hideHelpButtons && helpInfoBelowLabel && $i18n.getHelperMessage('items', 'comment_status')">
v-if="!hideHelpButtons && helpInfoBellowLabel && $i18n.getHelperMessage('items', 'comment_status')">
{{ $i18n.getHelperMessage('items', 'comment_status') }}
</p>
</div>
@ -543,7 +543,7 @@ export default {
metadataSectionLabel: String,
showItemLinkButton: Boolean,
itemLinkButtonLabel: String,
helpInfoBelowLabel: Boolean,
helpInfoBellowLabel: Boolean,
showTermsAgreementCheckbox: Boolean,
termsAgreementMessage: String
},

View File

@ -30,7 +30,7 @@ export default function({ attributes, className }) {
sentFormMessage,
showItemLinkButton,
itemLinkButtonLabel,
helpInfoBelowLabel,
helpInfoBellowLabel,
showTermsAgreementCheckbox,
termsAgreementMessage
} = attributes;
@ -77,7 +77,7 @@ export default function({ attributes, className }) {
show-terms-agreement-checkbox={ showTermsAgreementCheckbox ? showTermsAgreementCheckbox.toString() : 'false' }
terms-agreement-message={ termsAgreementMessageHTML }
item-link-button-label={ itemLinkButtonLabel ? itemLinkButtonLabel : __( 'Go to the item page', 'tainacan' ) }
help-info-bellow-label={ helpInfoBelowLabel ? helpInfoBelowLabel.toString() : 'false' } >
help-info-bellow-label={ helpInfoBellowLabel ? helpInfoBellowLabel.toString() : 'false' } >
</div>
</div>
};

View File

@ -111,7 +111,7 @@ export default (element) => {
metadataSectionLabel: '',
showItemLinkButton: false,
itemLinkButtonLabel: '',
helpInfoBelowLabel: false,
helpInfoBellowLabel: false,
showItemLinkButton: false,
termsAgreementMessage: ''
},
@ -140,7 +140,7 @@ export default (element) => {
if (this.$el.attributes['hide-metadata-types'] != undefined)
this.hideMetadataTypes = this.isParameterTrue('hide-metadata-types');
if (this.$el.attributes['help-info-bellow-label'] != undefined)
this.helpInfoBelowLabel = this.isParameterTrue('help-info-bellow-label');
this.helpInfoBellowLabel = this.isParameterTrue('help-info-bellow-label');
// Form sections labels
if (this.$el.attributes['document-section-label'] != undefined)

View File

@ -20,7 +20,7 @@
:metadata-section-label="$root.metadataSectionLabel"
:show-item-link-button="$root.showItemLinkButton"
:item-link-button-label="$root.itemLinkButtonLabel"
:help-info-bellow-label="$root.helpInfoBelowLabel ? $root.helpInfoBelowLabel : false"
:help-info-bellow-label="$root.helpInfoBellowLabel ? $root.helpInfoBellowLabel : false"
:show-terms-agreement-checkbox="$root.showTermsAgreementCheckbox ? $root.showTermsAgreementCheckbox : false"
:terms-agreement-message="$root.termsAgreementMessage"
/>