Skip to content

Commit

Permalink
chore: MessageBanner
Browse files Browse the repository at this point in the history
Added messageBanner to settings page explaining the number generator options
  • Loading branch information
EthanFreestone committed May 7, 2024
1 parent 5e4e4c2 commit bae809d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Settings/NumberGeneratorOptions.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import '@folio/stripes-components/lib/variables';

.marginBottomGutter {
margin-bottom: var(--gutter);
}
13 changes: 12 additions & 1 deletion src/Settings/NumberGeneratorOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import {
} from '@folio/stripes/core';
import { ConfigManager } from '@folio/stripes/smart-components';

import { Col, RadioButton, Row } from '@folio/stripes/components';
import { Col, MessageBanner, RadioButton, Row } from '@folio/stripes/components';

import css from './NumberGeneratorOptions.css';

const ConnectedConfigManager = stripesConnect(ConfigManager);

Expand Down Expand Up @@ -45,6 +47,15 @@ const NumberGeneratorOptions = (props) => {
onBeforeSave={beforeSave}
stripes={props.stripes}
>
<Row>
<Col xs={12}>
<div className={css.marginBottomGutter}>
<MessageBanner>
<FormattedMessage id="ui-organizations.settings.numberGeneratorOptions.info" />
</MessageBanner>
</div>
</Col>
</Row>
<Row>
<Col xs={12}>
<Field
Expand Down
1 change: 1 addition & 0 deletions translations/ui-organizations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@
"settings.typeStatus.Active": "Active",
"settings.typeStatus.Inactive": "Inactive",
"settings.numberGeneratorOptions": "Number generator options",
"settings.numberGeneratorOptions.info": "Fields which are usually filled using a numeric sequence can use the number generator. When the generator is switched on the field can either be fixed to prevent manual update, or made fully editable. When switched off, the field must be filled manually.",
"settings.numberGeneratorOptions.useGeneratorForVendor": "Number generator on, fixed: the vendor code can be filled using the generator only.",
"settings.numberGeneratorOptions.useTextFieldForVendor": "Number generator off: the vendor code can be filled manually only.",
"settings.numberGeneratorOptions.useBothForVendor": "Number generator on, editable: the vendor code can be filled using the generator and be edited, or filled manually.",
Expand Down

0 comments on commit bae809d

Please sign in to comment.