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 e492651 commit 5d46ddc
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 @@ -6,7 +6,9 @@ import { Field } from 'react-final-form';
import { stripesConnect, withStripes } 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';

class NumberGeneratorOptions extends React.Component {
static propTypes = {
Expand Down Expand Up @@ -53,6 +55,15 @@ class NumberGeneratorOptions extends React.Component {
stripes={this.props.stripes}
formType="final-form"
>
<Row>
<Col xs={12}>
<div className={css.marginBottomGutter}>
<MessageBanner>
<FormattedMessage id="ui-users.settings.numberGeneratorOptions.info" />
</MessageBanner>
</div>
</Col>
</Row>
<Row>
<Col xs={12}>
<Field
Expand Down
1 change: 1 addition & 0 deletions translations/ui-users/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
"settings.manualBlockTemplates": "Templates",
"settings.manualBlockTemplates.paneTitle": "Patron block templates",
"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.useGeneratorForBarcode": "Number generator on, fixed: the barcode can be filled using the generator only.",
"settings.numberGeneratorOptions.useTextFieldForBarcode": "Number generator off: the barcode can be filled manually only.",
"settings.numberGeneratorOptions.useBothForBarcode": "Number generator on, editable: the barcode can be filled using the generator and be edited, or filled manually.",
Expand Down

0 comments on commit 5d46ddc

Please sign in to comment.