Commit graph

27 commits

Author SHA1 Message Date
Sacha Greif
26f28a98ce Rework required field validation to make it work for intl fields when creating new documents
1. make intl fields use [IntlValue] and [IntlValueInput] types
2. add isIntlData marker to fields storing intl data
3. only validate intl fields that are marked as required
4. remove all instance of `__typename` from documents in edit forms
2018-08-17 19:02:44 +09:00
SachaG
b2fc0d0c5b Use Utils.pluralize function 2018-07-04 11:11:46 +02:00
ochicf
4bbf5fc8c4 Merge remote-tracking branch 'upstream/devel' into run-callbacks-await-between-hooks 2018-05-14 20:34:40 +02:00
ochicf
b517896a22 add isPromise function 2018-05-10 13:11:21 +02: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
13609dd755 Various small improvements 2018-05-04 11:56:49 +09:00
SachaG
1af50c1247 Improve i18n and make locale switchable via setLocale on context 2018-04-21 17:58:25 +09:00
ochicf
d16e865f0d remove sanitizeHtml import from modules/utils 2018-03-10 11:08:57 +01:00
Luca Hagel
feb3914834 Remove/ignore undef/unused vars 2018-01-29 03:55:57 +01:00
SachaG
54ca5a5972 Fix missing registerSetting 2018-01-27 12:42:37 +09:00
SachaG
13a2453009 Merge branch 'vulcan-updates-jan-2018' of https://github.com/justinr1234/Vulcan into justinr1234-vulcan-updates-jan-2018
# Conflicts:
#	packages/vulcan-forms/lib/components/Form.jsx
#	packages/vulcan-lib/lib/modules/utils.js
2018-01-27 12:30:33 +09:00
Justin Reynolds
651e3e6866 Fix circular dependencies between schemas and collections 2018-01-26 16:41:30 -06:00
Justin Reynolds
75b6ece0a4 Fix linting 2018-01-25 15:03:03 -06:00
Justin Reynolds
6f8e355fbb Upgrade to Meteor 1.6.1 2018-01-25 12:12:31 -06:00
SachaG
c75cd475cb Add new addUserFunction event function; make sure site url always has trailing '/'; document charge callbacks 2017-12-26 11:17:44 +09:00
SachaG
16412207b9 Use full URL for logoUrl resolver 2017-12-20 13:46:03 +09:00
SachaG
67a18135d9 Avoid getRoutePath errors 2017-09-29 21:26:47 +09:00
SachaG
984021cd7f Clean up/refactor settings; add registerSetting and /settings route 2017-09-22 12:24:15 +02:00
SachaG
7ff597a658 Make it easier to change index route in forum example without breaking search/categories/etc. 2017-09-15 19:13:39 +02:00
SachaG
cf41794380 compactObject now removes empty arrays too 2017-08-16 15:08:22 +09:00
SachaG
6887c70fc0 Telescope -> Vulcan 2017-06-13 00:16:52 -07:00
SachaG
35a7904f92 performCheck fix 2017-06-07 05:04:05 -07:00
SachaG
3b651a6d2b Change Utils.unflatten to accept an object as second argument; make name of children property customizable 2017-05-06 16:12:44 +09:00
SachaG
ac2aa28e6c fix twitter login; throw different error when document is not found 2017-04-30 20:36:14 +09:00
SachaG
4f0c190dd8 Add permission checks to Posts resolvers 2017-04-07 16:06:33 +09:00
SachaG
b42a5af6ed small tweaks 2017-04-04 10:22:07 +09:00
SachaG
72be56a590 renaming nova-xyz directories to vulcan-xyz 2017-03-24 10:19:24 +09:00
Renamed from packages/nova-lib/lib/modules/utils.js (Browse further)