Pull request: 4962 trim client upstream field whitespace
Updates #4962
Squashed commit of the following:
commit d1382e197455987cf1539b28a09da7b5377dd784
Merge: 510d80bd 0ddd8e3d
Author: Ildar Kamalov <ik@adguard.com>
Date: Wed Dec 21 12:26:05 2022 +0300
Merge branch 'master' into 4962-trim-whitespace
commit 510d80bde01fb027f72b2371bda35c62c6b02ca6
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Dec 20 13:57:13 2022 +0300
4962 trim client upstream field whitespace
This commit is contained in:
parent
0ddd8e3dcc
commit
0c03063c8a
|
@ -11,12 +11,13 @@ import Select from 'react-select';
|
|||
import i18n from '../../../i18n';
|
||||
import Tabs from '../../ui/Tabs';
|
||||
import Examples from '../Dns/Upstream/Examples';
|
||||
import { toggleAllServices } from '../../../helpers/helpers';
|
||||
import { toggleAllServices, trimLinesAndRemoveEmpty } from '../../../helpers/helpers';
|
||||
import {
|
||||
renderInputField,
|
||||
renderGroupField,
|
||||
CheckboxField,
|
||||
renderServiceField,
|
||||
renderTextareaField,
|
||||
} from '../../../helpers/form';
|
||||
import { validateClientId, validateRequiredValue } from '../../../helpers/validators';
|
||||
import { CLIENT_ID_LINK, FORM_NAME } from '../../../helpers/constants';
|
||||
|
@ -230,10 +231,11 @@ let Form = (props) => {
|
|||
<Field
|
||||
id="upstreams"
|
||||
name="upstreams"
|
||||
component="textarea"
|
||||
component={renderTextareaField}
|
||||
type="text"
|
||||
className="form-control form-control--textarea mb-5"
|
||||
placeholder={t('upstream_dns')}
|
||||
normalizeOnBlur={trimLinesAndRemoveEmpty}
|
||||
/>
|
||||
<Examples />
|
||||
</div>,
|
||||
|
|
Loading…
Reference in New Issue