diff --git a/cypress/e2e/login/widgets.cy.js b/cypress/e2e/login/widgets.cy.js
index e71026e1..3978f86d 100644
--- a/cypress/e2e/login/widgets.cy.js
+++ b/cypress/e2e/login/widgets.cy.js
@@ -2,9 +2,9 @@
function checkValidation(widgetName) {
cy.contains(widgetName).click()
- cy.contains('Create Widget').click()
+ cy.contains('Create widget').click()
cy.get('.text-red-500').should('exist')
- cy.contains('Go Back').click()
+ cy.contains('Go back').click()
}
function createwidget(name) {
@@ -14,11 +14,11 @@ function createwidget(name) {
}
function throughme(name) {
- cy.contains('Create Widget').click()
+ cy.contains('Create widget').click()
cy.wait(1000)
cy.get('[href="/lilwat/dashboard/edit"]').click()
cy.wait(1000)
- cy.contains('Edit Widgets').click()
+ cy.contains('Edit widgets').click()
cy.contains(name)
.scrollIntoView()
@@ -30,7 +30,7 @@ function throughme(name) {
cy.get('#widgetName').should('contain.value', name)
cy.wait(1500)
- cy.contains('Delete Widget').click()
+ cy.contains('Delete widget').click()
cy.get('#RemoveWidgetModalContent').contains('Delete').click()
}
diff --git a/src/common/dataHooks/useSearchLoader.js b/src/common/dataHooks/useSearchLoader.js
index 11d16a26..1ba64d68 100644
--- a/src/common/dataHooks/useSearchLoader.js
+++ b/src/common/dataHooks/useSearchLoader.js
@@ -51,7 +51,7 @@ function useSearchLoader({ searchParams }) {
sitename: result?.entry?.site?.slug,
siteTitle: result?.entry?.site?.title,
visibility: result?.entry?.visibility,
- siteVisibility: result?.entry?.site.visibility,
+ siteVisibility: result?.entry?.site?.visibility,
}
switch (result?.type) {
case TYPE_WORD:
diff --git a/src/components/CategoryCrud/CategoryCrudPresentation.js b/src/components/CategoryCrud/CategoryCrudPresentation.js
index 8dcd357f..61e52b57 100644
--- a/src/components/CategoryCrud/CategoryCrudPresentation.js
+++ b/src/components/CategoryCrud/CategoryCrudPresentation.js
@@ -86,10 +86,10 @@ function CategoryCrudPresentation({
diff --git a/src/components/CharacterCrud/CharacterCrudPresentation.js b/src/components/CharacterCrud/CharacterCrudPresentation.js
index 4ce2ed16..4008df5c 100644
--- a/src/components/CharacterCrud/CharacterCrudPresentation.js
+++ b/src/components/CharacterCrud/CharacterCrudPresentation.js
@@ -41,7 +41,7 @@ function CharacterCrudPresentation({ backHandler, dataToEdit, submitHandler }) {
{activeStep < 1 ? 'Cancel' : 'Previous Step'}
+ {activeStep < 1 ? 'Cancel' : 'Previous step'}
@@ -403,11 +409,11 @@ function DictionaryCrudPresentation({
submitLabel={
isCreate
? `Add ${getFriendlyDocType({ docType: type })}`
- : 'Save Changes'
+ : 'Save changes'
}
submitIcon={isCreate ? 'Add' : 'Save'}
cancelIcon={isCreate ? 'BackArrow' : 'Close'}
- cancelLabel={isCreate ? 'Go Back' : 'Cancel'}
+ cancelLabel={isCreate ? 'Go back' : 'Cancel'}
onCancelClick={backHandler}
onSubmitClick={handleSubmit(submitHandler)}
/>
diff --git a/src/components/ErrorHandler/ErrorHandlerPresentation.js b/src/components/ErrorHandler/ErrorHandlerPresentation.js
index 02c2a480..02841aa8 100644
--- a/src/components/ErrorHandler/ErrorHandlerPresentation.js
+++ b/src/components/ErrorHandler/ErrorHandlerPresentation.js
@@ -30,7 +30,7 @@ function ErrorHandlerPresentation({ backHandler, status, heading, content }) {
'BackArrow',
'inline-flex pb-2 h-7 fill-current mr-2 h-10',
)}
- Go Back
+ Go back
- Report Problem
+ Report problem
diff --git a/src/components/Form/CategoryArrayField.js b/src/components/Form/CategoryArrayField.js
index 8f5277d9..0fa25bc8 100644
--- a/src/components/Form/CategoryArrayField.js
+++ b/src/components/Form/CategoryArrayField.js
@@ -7,7 +7,7 @@ import getIcon from 'common/utils/getIcon'
import { useModalSelector } from 'common/hooks/useModalController'
import Modal from 'components/Modal'
import CategoriesBrowser from 'components/CategoriesBrowser'
-
+import FieldButton from 'components/Form/FieldButton'
function CategoryArrayField({
label,
nameId,
@@ -56,16 +56,8 @@ function CategoryArrayField({
))}
-
{fields?.length < maxItems && (
-
+
)}
{helpText && (
diff --git a/src/components/Form/EntryArrayField.js b/src/components/Form/EntryArrayField.js
index d0383f77..f9095e16 100644
--- a/src/components/Form/EntryArrayField.js
+++ b/src/components/Form/EntryArrayField.js
@@ -8,6 +8,7 @@ import { useModalSelector } from 'common/hooks/useModalController'
import Modal from 'components/Modal'
import EntrySelector from 'components/EntrySelector'
import { TYPE_WORD, TYPE_PHRASE } from 'common/constants'
+import FieldButton from 'components/Form/FieldButton'
function EntryArrayField({
label,
@@ -56,16 +57,8 @@ function EntryArrayField({
))}
-
{fields?.length < maxItems && (
-
+
)}
{helpText && (
diff --git a/src/components/Form/FieldButton.js b/src/components/Form/FieldButton.js
new file mode 100644
index 00000000..3770948a
--- /dev/null
+++ b/src/components/Form/FieldButton.js
@@ -0,0 +1,30 @@
+import React from 'react'
+import PropTypes from 'prop-types'
+
+// FPCC
+import getIcon from 'common/utils/getIcon'
+
+function FieldButton({ label, openModal, append }) {
+ return (
+
+
+
+ )
+}
+
+// Proptypes
+const { func, string } = PropTypes
+FieldButton.propTypes = {
+ label: string,
+ openModal: func,
+ append: func,
+}
+
+export default FieldButton
diff --git a/src/components/Form/NextPrevious.js b/src/components/Form/NextPrevious.js
index 144bb175..9b7b5c72 100644
--- a/src/components/Form/NextPrevious.js
+++ b/src/components/Form/NextPrevious.js
@@ -1,11 +1,12 @@
import React from 'react'
import PropTypes from 'prop-types'
+import { Link } from 'react-router-dom'
// FPCC
import getIcon from 'common/utils/getIcon'
import useSearchParamsState from 'common/hooks/useSearchParamsState'
-function NextPrevious({ numberOfSteps, onClickCallback }) {
+function NextPrevious({ numberOfSteps, onClickCallback, sitename }) {
const [activeStep, setActiveStep] = useSearchParamsState({
searchParamName: 'step',
defaultValue: '0',
@@ -20,15 +21,15 @@ function NextPrevious({ numberOfSteps, onClickCallback }) {
}
return (
-
+
{activeStepNumber > 0 ? (
) : (
@@ -36,23 +37,31 @@ function NextPrevious({ numberOfSteps, onClickCallback }) {
{activeStepNumber !== numberOfSteps - 1 ? (
) : (
-
+
+
+ Finish
+
+
)}
)
}
// PROPTYPES
-const { number, func } = PropTypes
+const { number, func, string } = PropTypes
NextPrevious.propTypes = {
numberOfSteps: number,
onClickCallback: func,
+ sitename: string,
}
export default NextPrevious
diff --git a/src/components/Form/TextArrayField.js b/src/components/Form/TextArrayField.js
index a95cc515..a2fe899e 100644
--- a/src/components/Form/TextArrayField.js
+++ b/src/components/Form/TextArrayField.js
@@ -5,7 +5,7 @@ import { useFieldArray } from 'react-hook-form'
// FPCC
import getIcon from 'common/utils/getIcon'
import { convertJsonToReadableString } from 'common/utils/stringHelpers'
-
+import FieldButton from 'components/Form/FieldButton'
function TextArrayField({
label,
nameId,
@@ -67,14 +67,7 @@ function TextArrayField({
))}
{fields?.length < maxItems && (
-
+
)}
{helpText && (
diff --git a/src/components/Form/TextTranslationArrayField.js b/src/components/Form/TextTranslationArrayField.js
index cfac9794..d2a18fd7 100644
--- a/src/components/Form/TextTranslationArrayField.js
+++ b/src/components/Form/TextTranslationArrayField.js
@@ -21,7 +21,9 @@ function TextTranslationArrayField({
return (
-
+
{fields.map((item, index) => (
@@ -91,7 +93,7 @@ function TextTranslationArrayField({
className="bg-white border-2 border-primary text-primary hover:bg-gray-50 rounded-lg shadow-sm py-2 px-4 inline-flex justify-center text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-secondary-light"
>
{getIcon('Add', 'fill-current -ml-1 mr-2 h-5 w-5')}
- Add {label.slice(0, -1)}
+ Add {label.slice(0, -1).toLowerCase()}
)}
diff --git a/src/components/Form/index.js b/src/components/Form/index.js
index 81359ac2..ef7b693d 100644
--- a/src/components/Form/index.js
+++ b/src/components/Form/index.js
@@ -3,6 +3,7 @@ import Autocomplete from 'components/Form/Autocomplete'
import AutocompleteMultiple from 'components/Form/AutocompleteMultiple'
import CategoryArrayField from 'components/Form/CategoryArrayField'
import EntryArrayField from 'components/Form/EntryArrayField'
+import FieldButton from 'components/Form/FieldButton'
import FileUploadField from 'components/Form/FileUploadField'
import Header from 'components/Form/Header'
import MediaArrayField from 'components/Form/MediaArrayField'
@@ -26,6 +27,7 @@ export default {
AutocompleteMultiple,
CategoryArrayField,
EntryArrayField,
+ FieldButton,
FileUploadField,
Header,
MediaArrayField,
diff --git a/src/components/HomeCrud/HomeCrudPresentation.js b/src/components/HomeCrud/HomeCrudPresentation.js
index a87baf20..4bfeaec2 100644
--- a/src/components/HomeCrud/HomeCrudPresentation.js
+++ b/src/components/HomeCrud/HomeCrudPresentation.js
@@ -26,7 +26,7 @@ function HomeCrudPresentation({ site }) {
className="inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-lg shadow-sm text-white bg-primary hover:bg-primary-light"
>
{getIcon('Pencil', 'fill-current -ml-1 mr-2 h-5 w-5')}
- Edit Banner and Logo
+ Edit banner and logo
diff --git a/src/components/HomeCrud/HomeForm.js b/src/components/HomeCrud/HomeForm.js
index 5e60c47d..fcfa8055 100644
--- a/src/components/HomeCrud/HomeForm.js
+++ b/src/components/HomeCrud/HomeForm.js
@@ -30,12 +30,12 @@ function HomeForm({ cancelHandler, dataToEdit, submitHandler }) {
return (