diff --git a/scm-ui-components/packages/ui-components/src/Help.js b/scm-ui-components/packages/ui-components/src/Help.js index 5c7a77a151..b0dca9cb56 100644 --- a/scm-ui-components/packages/ui-components/src/Help.js +++ b/scm-ui-components/packages/ui-components/src/Help.js @@ -8,7 +8,8 @@ const styles = { display: "block" }, q: { - float: "left" + float: "left", + paddingLeft: "3px" } }; diff --git a/scm-ui-components/packages/ui-components/src/forms/InputField.js b/scm-ui-components/packages/ui-components/src/forms/InputField.js index 6f87683939..e29d1051d7 100644 --- a/scm-ui-components/packages/ui-components/src/forms/InputField.js +++ b/scm-ui-components/packages/ui-components/src/forms/InputField.js @@ -1,6 +1,7 @@ //@flow import React from "react"; import classNames from "classnames"; +import {Help, Page} from "../index"; type Props = { label?: string, @@ -12,7 +13,8 @@ type Props = { onReturnPressed?: () => void, validationError: boolean, errorMessage: string, - disabled?: boolean + disabled?: boolean, + helpText?: string }; class InputField extends React.Component { @@ -41,6 +43,17 @@ class InputField extends React.Component { return ""; }; + renderHelp = () => { + const helpText = this.props.helpText; + if(helpText){ + return ( +
+ +
); + } + else + return null; + } handleKeyPress = (event: SyntheticKeyboardEvent) => { const onReturnPressed = this.props.onReturnPressed; @@ -71,19 +84,22 @@ class InputField extends React.Component { return (
{this.renderLabel()} -
- { - this.field = input; - }} - className={classNames("input", errorView)} - type={type} - placeholder={placeholder} - value={value} - onChange={this.handleInput} - onKeyPress={this.handleKeyPress} - disabled={disabled} - /> +
+
+ { + this.field = input; + }} + className={classNames("input", errorView)} + type={type} + placeholder={placeholder} + value={value} + onChange={this.handleInput} + onKeyPress={this.handleKeyPress} + disabled={disabled} + /> +
+ {this.renderHelp()}
{helper}
diff --git a/scm-ui/src/config/components/form/GeneralSettings.js b/scm-ui/src/config/components/form/GeneralSettings.js index 58455e16ab..1e0b4bc1cf 100644 --- a/scm-ui/src/config/components/form/GeneralSettings.js +++ b/scm-ui/src/config/components/form/GeneralSettings.js @@ -41,6 +41,7 @@ class GeneralSettings extends React.Component { onChange={this.handleRealmDescriptionChange} value={realmDescription} disabled={!hasUpdatePermission} + helpText={"hallo"} /> { return ( -