Skip to content

Commit

Permalink
Don't allow localization of wa templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ericnewcomer committed Jul 2, 2024
1 parent 59cdce9 commit 2b87e9a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/components/flow/actions/action/Action.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,8 @@
background: rgba(255, 255, 255, 0.9);
$color_1: rgba(0, 0, 0, 0.12);
$color_2: rgba(0, 0, 0, 0.1);
}

.message {
--textarea-height: 8em;
}
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export default class MsgLocalizationForm extends React.Component<
);
}

if (this.state.template) {
if (this.state.template && this.state.templateVariables.length > 0) {
tabs.push({
name: 'WhatsApp',
body: (
Expand Down Expand Up @@ -339,6 +339,7 @@ export default class MsgLocalizationForm extends React.Component<

<TextInputElement
name={i18n.t('forms.message', 'Message')}
__className={styles.message}
showLabel={false}
onChange={this.handleMessageUpdate}
entry={this.state.message}
Expand Down
2 changes: 2 additions & 0 deletions src/components/flow/actions/saymsg/SayMsgForm.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { react as bindCallbacks } from 'auto-bind';
import styles from 'components/flow/actions/action/Action.module.scss';
import Dialog, { ButtonSet } from 'components/dialog/Dialog';
import { ActionFormProps } from 'components/flow/props';
import TextInputElement from 'components/form/textinput/TextInputElement';
Expand Down Expand Up @@ -82,6 +83,7 @@ export default class SayMsgForm extends React.Component<ActionFormProps, SayMsgF
<Dialog title={typeConfig.name} headerClass={typeConfig.type} buttons={this.getButtons()}>
<TypeList __className="" initialType={typeConfig} onChange={this.props.onTypeChange} />
<TextInputElement
__className={styles.message}
name={i18n.t('forms.message', 'Message')}
showLabel={false}
onChange={this.handleMessageUpdate}
Expand Down

0 comments on commit 2b87e9a

Please sign in to comment.