Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { capitalize, isEmpty, isNil } from 'lodash'
import { isEmpty, isNil, upperFirst } from 'lodash'

import useModal from 'rdmo/core/assets/js/hooks/useModal'

Expand Down Expand Up @@ -122,7 +122,7 @@ const PageHead = ({ templates, page, sets, values, disabled, currentSet,
!disabled && (
<li>
<a href="" title={labels.add} className="add-set" onClick={handleOpenCreateModal}>
<i className="fa fa-plus fa-btn" aria-hidden="true"></i> {capitalize(page.verbose_name)}
<i className="fa fa-plus fa-btn" aria-hidden="true"></i> {upperFirst(page.verbose_name)}
</a>
</li>
)
Expand Down Expand Up @@ -153,7 +153,7 @@ const PageHead = ({ templates, page, sets, values, disabled, currentSet,
) : (
!disabled && (
<button role="button" className="btn btn-success" title={labels.add} onClick={createModal.open}>
<i className="fa fa-plus fa-btn" aria-hidden="true"></i> {capitalize(page.verbose_name)}
<i className="fa fa-plus fa-btn" aria-hidden="true"></i> {upperFirst(page.verbose_name)}
</button>
)
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { capitalize, maxBy } from 'lodash'
import { maxBy, upperFirst } from 'lodash'

const AddValue = ({ question, values, currentSet, disabled, createValue }) => {
const handleClick = () => {
Expand All @@ -19,7 +19,7 @@ const AddValue = ({ question, values, currentSet, disabled, createValue }) => {
return !disabled && question.is_collection && (
<button type="button" className="btn btn-success btn-xs add-value-button" onClick={handleClick}
title={gettext('Add answer')} aria-label={gettext('Add answer')}>
<i className="fa fa-plus fa-btn" aria-hidden="true"></i> {capitalize(question.verbose_name)}
<i className="fa fa-plus fa-btn" aria-hidden="true"></i> {upperFirst(question.verbose_name)}
</button>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { capitalize, maxBy } from 'lodash'
import { maxBy, upperFirst } from 'lodash'

const QuestionSetAddSet = ({ questionset, sets, setPrefix, disabled, createSet }) => {
const handleClick = () => {
Expand All @@ -18,7 +18,7 @@ const QuestionSetAddSet = ({ questionset, sets, setPrefix, disabled, createSet }
<button type="button" className="btn btn-success btn-add-set"
title={'Add block'} aria-label={'Add block'}
onClick={handleClick}>
<i className="fa fa-plus fa-btn" aria-hidden="true"></i> {capitalize(questionset.verbose_name)}
<i className="fa fa-plus fa-btn" aria-hidden="true"></i> {upperFirst(questionset.verbose_name)}
</button>
)
}
Expand Down