Commit graph

49 commits

Author SHA1 Message Date
SachaG
19ea8159b3 Merge branch 'devel' into apollo2 2019-01-30 10:34:27 +09:00
SachaG
02f0f9bb58 Use horizontal form layout; add FormElement component; pass itemProperties to FormItem 2019-01-27 09:48:45 +09:00
SachaG
f0fab18380 More work on bootstrap form items 2019-01-26 21:21:09 +09:00
SachaG
5f941d7d76 Remove Formsy dependency 2019-01-24 18:01:53 +09:00
SachaG
fb43311224 Few minor fixes 2019-01-05 15:44:40 +09:00
SachaG
111e00ecae Fix semicolons and other linting issues 2018-12-31 15:22:17 +09:00
SachaG
857b20867c Update to Bootstrap 4 2018-12-28 08:52:40 +09:00
SachaG
5d12dbef47 Add onClick props to ModalTrigger and Checkout button (useful for analytics tracking) 2018-12-04 15:57:19 +09:00
SachaG
84ea6d8789 Make static text work for empty values and numbers 2018-11-30 15:59:27 +09:00
SachaG
6864b572be Merge branch 'devel' into custom-form-components
# Conflicts:
#	packages/vulcan-forms/lib/components/FormNestedArray.jsx
2018-09-23 08:16:48 +09:00
SachaG
07427a2c96 Add formComponents prop to forms to enable customizing a specific form's components 2018-09-23 08:13:09 +09:00
Erik Dakoda
7e66908d21 Refactoring to remove react-bootstrap and to customize FormNestedArray for material-ui 2018-09-19 13:16:48 -04:00
SachaG
dfa4c77314 ESLint fixes 2018-09-16 11:48:38 +09:00
Sacha Greif
60c3f0d628 Remove console.logs 2018-08-18 10:07:28 +09:00
Sacha Greif
0b961aca2b Add Date2 form component (useful for date of birth for example) 2018-08-17 13:49:15 +09:00
Sacha Greif
fc65d66204 Make Select work with number fields too 2018-08-16 12:30:33 +09:00
SachaG
d9784ad0aa Improve StaticText form component with basic URL parsing 2018-08-07 15:37:51 +09:00
SachaG
a9d81cb747 Simplify getValue; do not merge in getValue anymore, instead get value from Form's getDocument() 2018-08-06 10:43:00 +09:00
SachaG
e27f5af9e1 Make Checkboxgroup and Select handle their own value formatting 2018-08-06 10:30:15 +09:00
SachaG
d94a024973 Refactor Checkboxgroup to full function syntax 2018-08-05 21:16:38 +09:00
SachaG
6045777ff7 Small modal refactor; footerContent -> footer 2018-07-30 14:59:36 +09:00
SachaG
2eeb5af8a8 Add static text component to display simple text data in forms 2018-07-10 10:08:42 +02:00
SachaG
7a10103590 Pass down disabled prop explicitely 2018-06-30 09:23:49 +02:00
SachaG
a01ca2ab6e Move FormIntl/FormNested switch from FromComponentInner to FormComponent 2018-06-28 18:36:57 +02:00
SachaG
f9d759b2a0 Handle empty options better 2018-06-25 08:39:00 +02:00
SachaG
fae6511965 Fix #1998 part 2 2018-06-25 08:16:22 +02:00
SachaG
7bf8056111 Fix #1998 2018-06-24 09:05:54 +02:00
SachaG
b4ac2d23af Revert formsy/formsy-react-component update 2018-06-21 10:28:34 +09:00
SachaG
a2e3ca01cc Convert Select option values to strings 2018-06-20 10:54:02 +09:00
SachaG
193da85887 Wrap checkboxgroup (fix #2004) 2018-06-20 07:45:04 +09:00
Matt Black
e991155585 fix duplicate noneOption on rerender 2018-06-18 16:58:00 -04:00
SachaG
587df75021 Give CheckboxGroup its own custom event handler (fix #1998) 2018-06-13 19:31:29 +09:00
SachaG
9865eb5f63 Use field.nestedInput instead of type="nested" 2018-05-23 22:04:32 +09:00
SachaG
2b05700e41 Pass "raw" component constructor down to FormComponentInner instead of passing function that instantiates it 2018-05-23 17:12:04 +09:00
SachaG
fc15a4df42 Small core/ui components improvements 2018-05-16 11:40:10 +09:00
SachaG
b10d8bdb5c Formatting 2018-05-11 09:52:04 +09:00
SachaG
ab674a1163 Merge branch 'devel' into i18n2
# Conflicts:
#	packages/vulcan-forms/lib/components/Form.jsx
#	packages/vulcan-forms/lib/components/FormComponent.jsx
2018-05-11 09:48:34 +09:00
Erik Dakoda
2fe3b2cd28
Merge branch 'devel' into erikdakoda5 2018-05-10 10:10:27 -04:00
Erik Schannen
150d9392e7 Changes to SmartForm behaviour - refactoring
- Added new `FormComponent.isCustomInput` method
 - Pulled `renderComponent` up from `FormComponentInner` to `FormComponent`
 - Pulled some input-type-specific logic up when it was universal, or pushed it down when it should be handled by each ui library
2018-05-10 10:03:59 -04:00
SachaG
5c43de929c Fix withEdit imports; fix dropdown bug 2018-05-10 17:48:22 +09:00
Erik Schannen
c3f33cb7e0 Changes to SmartForm behaviour
- Moved UI portions of FormComponent to FormComponentInner.jsx in vulcan-ui-bootstrap

 - Added user alert when the user navigates to another route while there are unsaved changed in the form (disabled by default)

 - Added setting forms.warnUnsavedChanges and SmartForm property warnUnsavedChanges to enable user alert

 - Added optional Revert button in FormSubmits to allow the user to discard any changes to the form; this is activated by passing a "revertCallback" property to SmartForm (which can be empty: () => {})

 - Added two functions that form components can access in the child context: refetchForm() to refetch the document from the database (in case it was updated by a background process), isChanged() to determine if there are any unsaved changes

 - For any phrases I have added to en_US.js I also added it to es_ES.js and fr_FR.js with the comment // TODO: translate

 - Updated Form.clearForm and Form.mutationSuccessCallback so that the user can continue working on the document after submitting it

 - The form now scrolls the flash message into view when a submit results in errors

 - Fixed bugs in FormComponent.shouldComponentUpdate() and Form.getDocument()

 - Fixed bug in FormComponent.handleChange() - number fields could not be cleared, only set to 0

 - Fixed a bug in FormComponent.getValue() - it returned the initial value of a checkbox even after it was set to false, and a number even after it was set to 0
2018-05-08 20:09:42 -04:00
SachaG
c811efaa47 Add support for nested dropdowns 2018-05-04 11:56:19 +09:00
Ruslan Kabalin
e78f307576 ui-bootstrap: Fix attributes spreading at TooltipTrigger. 2018-05-01 01:53:06 +01:00
Ruslan Kabalin
fc7a03e4e8 ui-bootstrap: Refactor ModalTrigger to use Modal component. 2018-05-01 01:53:06 +01:00
Ruslan Kabalin
290b3c7ed3 ui-bootstrap: Add Modal component. 2018-05-01 01:53:06 +01:00
SachaG
18bec2b2c0 Small fixes 2018-04-28 10:54:24 +09:00
SachaG
e89a4a828a Adding tooltip and dropdown components 2018-04-24 10:20:38 +09:00
SachaG
2e0f9184cc Fixing mistakes 2018-04-23 09:51:33 +09:00
SachaG
b4f960301b Isolate bootstrap dependencies in new vulcan-ui-bootstrap package 2018-04-23 09:47:04 +09:00