added confirm dialog, some translations
This commit is contained in:
1 parent
b4085e5340
commit
d832949746
78 files changed
+753
-948
No files matched your search
@@ -307,7 +307,7 @@ export function BranchForm({ mode, initialData, branchId }: BranchFormProps) {
|
||||
markVisited(currentStep)
|
||||
const errs = STEPS[currentStep].validate(form, mode)
|
||||
if (Object.keys(errs).length > 0) {
|
||||
toast.error('Dogry maglumat girizmegiňizi haýyş edýäris.')
|
||||
toast.error(t('common.errors.fillRequiredCorrectly', 'Dogry maglumat girizmegiňizi haýyş edýäris.'))
|
||||
return
|
||||
}
|
||||
if (currentStep < STEPS.length - 1) {
|
||||
@@ -337,7 +337,7 @@ export function BranchForm({ mode, initialData, branchId }: BranchFormProps) {
|
||||
for (const step of STEPS) Object.assign(allErrors, step.validate(form, mode))
|
||||
|
||||
if (Object.keys(allErrors).length > 0) {
|
||||
toast.error('Käbir hökmany meýdanlar doldurylan däldir.')
|
||||
toast.error(t('common.errors.requiredFieldsMissing', 'Käbir hökmany meýdanlar doldurylan däldir.'))
|
||||
for (let i = 0; i < STEPS.length; i++) {
|
||||
if (Object.keys(STEPS[i].validate(form, mode)).length > 0) {
|
||||
setCurrentStep(i); break
|
||||
|
||||
Reference in new issue
Block a user