Skip to content

Commit

Permalink
Merge pull request #56 from meck93/50-fixes-template-id-database-conf…
Browse files Browse the repository at this point in the history
…lict-pr-feedback

fix: sourceCodeTemplateID input type + field width
  • Loading branch information
alexzaganelli authored Aug 17, 2021
2 parents ec59986 + 040bd6b commit 87962a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions admin/src/containers/Designer/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect, memo, useRef } from 'react';
import { Button, Textarea } from '@buffetjs/core';
import { Prompt, useHistory, useParams } from 'react-router-dom';
import { BackHeader, InputText, useGlobalContext, request, auth } from 'strapi-helper-plugin';
import { BackHeader, InputText, InputNumber, useGlobalContext, request, auth } from 'strapi-helper-plugin';
import { isEmpty, merge } from 'lodash';
import PropTypes from 'prop-types';
import striptags from 'striptags';
Expand Down Expand Up @@ -280,7 +280,7 @@ const EmailDesigner = ({ isCore = false }) => {
<Prompt message={formatMessage({ id: getTrad('prompt.unsaved') })} when={enablePrompt} />
<>
<Bar>
<InputText
<InputNumber
name="sourceCodeToTemplateId"
disabled={isCore}
onChange={({ target: { value } }) =>
Expand All @@ -289,9 +289,8 @@ const EmailDesigner = ({ isCore = false }) => {
placeholder={
isCore ? getTrad(coreMessageType) : getTrad('designer.sourceCodeToTemplateIdInputFieldPlaceholder')
}
type="number"
value={templateData?.sourceCodeToTemplateId}
style={{ marginTop: 0, width: '5%', marginRight: 10 }}
style={{ marginTop: 0, width: '15%', marginRight: 10 }}
/>
<InputText
name="name"
Expand All @@ -300,7 +299,6 @@ const EmailDesigner = ({ isCore = false }) => {
setTemplateData((state) => ({ ...state, name: value }));
}}
placeholder={isCore ? getTrad(coreMessageType) : getTrad('designer.templateNameInputFieldPlaceholder')}
type="text"
value={templateData?.name || ''}
style={{ marginTop: 0, width: '40%', marginRight: 10 }}
/>
Expand All @@ -310,7 +308,6 @@ const EmailDesigner = ({ isCore = false }) => {
setTemplateData((state) => ({ ...state, subject: value }));
}}
placeholder={getTrad('designer.templateSubjectInputFieldPlaceholder')}
type="text"
value={templateData?.subject || ''}
style={{ marginTop: 0, width: '60%', marginRight: 10 }}
/>
Expand Down
2 changes: 1 addition & 1 deletion admin/src/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"designer.action.saveTemplate": "Design speichern",
"designer.exportTemplates": "Vorlagen exportieren",
"designer.importTemplates": "Vorlagen importieren",
"designer.sourceCodeToTemplateIdInputFieldPlaceholder": "ID, welche im Sourcecode verwendet wird.",
"designer.sourceCodeToTemplateIdInputFieldPlaceholder": "Source Code ID",
"designer.templateNameInputFieldPlaceholder": "Identifikationsname",
"designer.templateSubjectInputFieldPlaceholder": "Email Betreff",
"designer.version.html": "HTML-Version",
Expand Down
2 changes: 1 addition & 1 deletion admin/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"designer.action.saveTemplate": "Save design",
"designer.exportTemplates": "Export Templates",
"designer.importTemplates": "Import Templates",
"designer.sourceCodeToTemplateIdInputFieldPlaceholder": "ID of the template to use in the code",
"designer.sourceCodeToTemplateIdInputFieldPlaceholder": "Source code ID",
"designer.templateNameInputFieldPlaceholder": "Identification name",
"designer.templateSubjectInputFieldPlaceholder": "Email subject",
"designer.version.html": "HTML version",
Expand Down

0 comments on commit 87962a7

Please sign in to comment.