diff --git a/lib/ui/client/edit/client_edit_billing_address.dart b/lib/ui/client/edit/client_edit_billing_address.dart index 5e8bfd22a..8f93d852f 100644 --- a/lib/ui/client/edit/client_edit_billing_address.dart +++ b/lib/ui/client/edit/client_edit_billing_address.dart @@ -119,7 +119,7 @@ class ClientEditBillingAddressState extends State { controller: _address2Controller, label: localization.address2, onSavePressed: viewModel.onSavePressed, - keyboardType: TextInputType.streetAddress, + keyboardType: TextInputType.text, ), DecoratedFormField( autocorrect: false, diff --git a/lib/ui/client/edit/client_edit_shipping_address.dart b/lib/ui/client/edit/client_edit_shipping_address.dart index 5ca488006..4e5c16ebd 100644 --- a/lib/ui/client/edit/client_edit_shipping_address.dart +++ b/lib/ui/client/edit/client_edit_shipping_address.dart @@ -118,7 +118,7 @@ class ClientEditShippingAddressState extends State { controller: _shippingAddress2Controller, label: localization.address2, onSavePressed: viewModel.onSavePressed, - keyboardType: TextInputType.streetAddress, + keyboardType: TextInputType.text, ), DecoratedFormField( controller: _shippingCityController, diff --git a/lib/ui/settings/client_portal.dart b/lib/ui/settings/client_portal.dart index d6a95dbd6..cbc367d51 100644 --- a/lib/ui/settings/client_portal.dart +++ b/lib/ui/settings/client_portal.dart @@ -307,6 +307,7 @@ class _ClientPortalState extends State label: localization.subdomain, autovalidate: _autoValidate, controller: _subdomainController, + keyboardType: TextInputType.text, hint: localization.subdomainHelp, validator: (value) { if (value.isEmpty) { @@ -445,11 +446,13 @@ class _ClientPortalState extends State controller: _termsController, label: localization.termsOfService, maxLines: 6, + keyboardType: TextInputType.multiline, ), DecoratedFormField( controller: _privacyController, label: localization.privacyPolicy, maxLines: 6, + keyboardType: TextInputType.multiline, ), ], ) @@ -582,21 +585,25 @@ class _ClientPortalState extends State controller: _customMessageDashboard, label: localization.dashboard, maxLines: 6, + keyboardType: TextInputType.multiline, ), DecoratedFormField( controller: _customMessageUnpaidInvoice, label: localization.unpaidInvoice, maxLines: 6, + keyboardType: TextInputType.multiline, ), DecoratedFormField( controller: _customMessagePaidInvoice, label: localization.paidInvoice, maxLines: 6, + keyboardType: TextInputType.multiline, ), DecoratedFormField( controller: _customMessageUnapprovedQuote, label: localization.unapprovedQuote, maxLines: 6, + keyboardType: TextInputType.multiline, ), ], ), @@ -611,22 +618,26 @@ class _ClientPortalState extends State label: localization.header, controller: _customHeaderController, maxLines: 6, + keyboardType: TextInputType.multiline, ), DecoratedFormField( label: localization.footer, controller: _customFooterController, maxLines: 6, + keyboardType: TextInputType.multiline, ), DecoratedFormField( label: localization.customCss, controller: _customCssController, maxLines: 6, + keyboardType: TextInputType.multiline, ), if (isSelfHosted(context)) DecoratedFormField( label: localization.customJavascript, controller: _customJavaScriptController, maxLines: 6, + keyboardType: TextInputType.multiline, ), ], ) diff --git a/lib/ui/settings/company_details.dart b/lib/ui/settings/company_details.dart index 26236a3d5..23935e923 100644 --- a/lib/ui/settings/company_details.dart +++ b/lib/ui/settings/company_details.dart @@ -256,21 +256,25 @@ class _CompanyDetailsState extends State : null, autovalidate: autoValidate, onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.name, ), DecoratedFormField( label: localization.idNumber, controller: _idNumberController, onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.text, ), DecoratedFormField( label: localization.vatNumber, controller: _vatNumberController, onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.text, ), DecoratedFormField( label: localization.website, controller: _websiteController, onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.url, ), DecoratedFormField( label: localization.email, @@ -356,30 +360,35 @@ class _CompanyDetailsState extends State controller: _address1Controller, autofillHints: [AutofillHints.streetAddressLine1], onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.streetAddress, ), DecoratedFormField( label: localization.address2, controller: _address2Controller, autofillHints: [AutofillHints.streetAddressLine2], onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.text, ), DecoratedFormField( label: localization.city, controller: _cityController, onSavePressed: viewModel.onSavePressed, autofillHints: [AutofillHints.addressCity], + keyboardType: TextInputType.text, ), DecoratedFormField( label: localization.state, controller: _stateController, onSavePressed: viewModel.onSavePressed, autofillHints: [AutofillHints.addressState], + keyboardType: TextInputType.text, ), DecoratedFormField( label: localization.postalCode, controller: _postalCodeController, onSavePressed: viewModel.onSavePressed, autofillHints: [AutofillHints.postalCode], + keyboardType: TextInputType.text, ), EntityDropdown( entityType: EntityType.country, @@ -597,11 +606,13 @@ class _CompanyDetailsState extends State label: localization.invoiceTerms, controller: _invoiceTermsController, maxLines: 4, + keyboardType: TextInputType.multiline, ), DecoratedFormField( label: localization.invoiceFooter, controller: _invoiceFooterController, maxLines: 4, + keyboardType: TextInputType.multiline, ), ], if (company.isModuleEnabled(EntityType.quote)) ...[ @@ -609,11 +620,13 @@ class _CompanyDetailsState extends State label: localization.quoteTerms, controller: _quoteTermsController, maxLines: 4, + keyboardType: TextInputType.multiline, ), DecoratedFormField( label: localization.quoteFooter, controller: _quoteFooterController, maxLines: 4, + keyboardType: TextInputType.multiline, ), ], if (company.isModuleEnabled(EntityType.credit)) ...[ @@ -621,11 +634,13 @@ class _CompanyDetailsState extends State label: localization.creditTerms, controller: _creditTermsController, maxLines: 4, + keyboardType: TextInputType.multiline, ), DecoratedFormField( label: localization.creditFooter, controller: _creditFooterController, maxLines: 4, + keyboardType: TextInputType.multiline, ), ], ], diff --git a/lib/ui/settings/custom_fields.dart b/lib/ui/settings/custom_fields.dart index 522c7be23..964f54183 100644 --- a/lib/ui/settings/custom_fields.dart +++ b/lib/ui/settings/custom_fields.dart @@ -405,6 +405,7 @@ class _CustomFormFieldState extends State { child: DecoratedFormField( label: widget.label, controller: _customFieldController, + keyboardType: TextInputType.name, ), ), if (widget.showTaxes) ...[ @@ -473,6 +474,7 @@ class _CustomFormFieldState extends State { label: localization.options, controller: _optionsController, hint: localization.commaSeparatedList, + keyboardType: TextInputType.text, ), ), SizedBox(height: 16), diff --git a/lib/ui/settings/email_settings.dart b/lib/ui/settings/email_settings.dart index 4d33cff0a..38a5a272c 100644 --- a/lib/ui/settings/email_settings.dart +++ b/lib/ui/settings/email_settings.dart @@ -214,11 +214,13 @@ class _EmailSettingsState extends State { label: localization.fromName, controller: _fromNameController, onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.name, ), DecoratedFormField( label: localization.replyToName, controller: _replyToNameController, onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.name, ), DecoratedFormField( label: localization.replyToEmail, diff --git a/lib/ui/settings/generated_numbers.dart b/lib/ui/settings/generated_numbers.dart index 293741f53..d90bc47d1 100644 --- a/lib/ui/settings/generated_numbers.dart +++ b/lib/ui/settings/generated_numbers.dart @@ -284,6 +284,7 @@ class _GeneratedNumbersState extends State DecoratedFormField( label: localization.recurringPrefix, controller: _recurringPrefixController, + keyboardType: TextInputType.text, ), if (company.isModuleEnabled(EntityType.quote)) BoolDropdownButton( @@ -527,10 +528,12 @@ class _EntityNumberSettingsState extends State { DecoratedFormField( label: localization.numberPattern, controller: _patternController, + keyboardType: TextInputType.text, ), DecoratedFormField( label: localization.numberCounter, controller: _counterController, + keyboardType: TextInputType.number, ), ], ), diff --git a/lib/ui/settings/import_export.dart b/lib/ui/settings/import_export.dart index a7b32fbbb..e89b55f9b 100644 --- a/lib/ui/settings/import_export.dart +++ b/lib/ui/settings/import_export.dart @@ -295,6 +295,7 @@ class _FileImportState extends State<_FileImport> { final field = DecoratedFormField( enabled: false, + keyboardType: TextInputType.text, key: ValueKey(uploadPart.key + (multipartFile != null ? multipartFile.filename : '')), label: localization.lookup(uploadPart.value), diff --git a/lib/ui/settings/online_payments.dart b/lib/ui/settings/online_payments.dart index a426fdff5..f55b6d8db 100644 --- a/lib/ui/settings/online_payments.dart +++ b/lib/ui/settings/online_payments.dart @@ -149,6 +149,8 @@ class _OnlinePaymentsState extends State { label: localization.minimumUnderPaymentAmount, controller: _minimumAmountController, isMoney: true, + keyboardType: TextInputType.numberWithOptions( + decimal: true, signed: true), ), ), ]), diff --git a/lib/ui/settings/settings_wizard.dart b/lib/ui/settings/settings_wizard.dart index 1ff49370f..aa58d894b 100644 --- a/lib/ui/settings/settings_wizard.dart +++ b/lib/ui/settings/settings_wizard.dart @@ -3,6 +3,7 @@ import 'dart:async'; import 'dart:convert'; // Flutter imports: +import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -229,12 +230,15 @@ class _SettingsWizardState extends State { controller: _nameController, validator: (value) => value.isEmpty ? localization.pleaseEnterAValue : null, + keyboardType: TextInputType.name, ); final firstName = DecoratedFormField( label: localization.firstName, autovalidate: _autoValidate, controller: _firstNameController, + keyboardType: TextInputType.text, + autofillHints: [AutofillHints.givenName], validator: (value) => value.isEmpty ? localization.pleaseEnterAValue : null, ); @@ -243,6 +247,8 @@ class _SettingsWizardState extends State { label: localization.lastName, autovalidate: _autoValidate, controller: _lastNameController, + keyboardType: TextInputType.text, + autofillHints: [AutofillHints.familyName], validator: (value) => value.isEmpty ? localization.pleaseEnterAValue : null, ); @@ -304,6 +310,7 @@ class _SettingsWizardState extends State { label: localization.subdomain, autovalidate: _autoValidate, controller: _subdomainController, + keyboardType: TextInputType.text, validator: (value) { if (value.isEmpty) { return localization.pleaseEnterAValue; diff --git a/lib/ui/settings/task_settings.dart b/lib/ui/settings/task_settings.dart index 19d4094fd..ae9be6016 100644 --- a/lib/ui/settings/task_settings.dart +++ b/lib/ui/settings/task_settings.dart @@ -100,6 +100,8 @@ class _TaskSettingsState extends State { label: localization.defaultTaskRate, onSavePressed: viewModel.onSavePressed, isMoney: true, + keyboardType: + TextInputType.numberWithOptions(decimal: true, signed: true), ), if (!viewModel.state.settingsUIState.isFiltered) ...[ SizedBox(height: 32), diff --git a/lib/ui/settings/templates_and_reminders.dart b/lib/ui/settings/templates_and_reminders.dart index cf3f9ce60..63c733d6f 100644 --- a/lib/ui/settings/templates_and_reminders.dart +++ b/lib/ui/settings/templates_and_reminders.dart @@ -309,12 +309,13 @@ class _TemplatesAndRemindersState extends State label: localization.subject, controller: _subjectController, hint: _defaultSubject, + keyboardType: TextInputType.text, ), DecoratedFormField( - keyboardType: TextInputType.multiline, label: localization.body, controller: _bodyController, maxLines: 8, + keyboardType: TextInputType.multiline, hint: _defaultBody, ), ]), @@ -554,11 +555,15 @@ class _ReminderSettingsState extends State { label: localization.lateFeeAmount, controller: _feeAmountController, isMoney: true, + keyboardType: + TextInputType.numberWithOptions(decimal: true, signed: true), ), DecoratedFormField( label: localization.lateFeePercent, controller: _feePercentController, isPercent: true, + keyboardType: + TextInputType.numberWithOptions(decimal: true, signed: true), ), ], ), diff --git a/lib/ui/settings/user_details.dart b/lib/ui/settings/user_details.dart index 4839b0ff0..7a93ffe51 100644 --- a/lib/ui/settings/user_details.dart +++ b/lib/ui/settings/user_details.dart @@ -183,6 +183,7 @@ class _UserDetailsState extends State : null, autovalidate: autoValidate, onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.name, ), DecoratedFormField( label: localization.lastName, @@ -192,6 +193,7 @@ class _UserDetailsState extends State : null, autovalidate: autoValidate, onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.name, ), DecoratedFormField( label: localization.email, @@ -201,11 +203,13 @@ class _UserDetailsState extends State : null, autovalidate: autoValidate, onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.emailAddress, ), DecoratedFormField( label: localization.phone, controller: _phoneController, onSavePressed: viewModel.onSavePressed, + keyboardType: TextInputType.phone, ), PasswordFormField( controller: _passwordController, @@ -500,6 +504,7 @@ class _EnableTwoFactorState extends State<_EnableTwoFactor> { validator: (value) => value.isEmpty ? AppLocalization.of(context).pleaseEnterAValue : null, + keyboardType: TextInputType.number, onSavePressed: (context) => _onSavePressed(), ), ),