mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Move registerSetting to index
This commit is contained in:
parent
d60b16ea0d
commit
f320b3363b
2 changed files with 6 additions and 6 deletions
|
@ -24,7 +24,7 @@ This component expects:
|
|||
|
||||
import {
|
||||
registerComponent, Components, runCallbacks, getCollection,
|
||||
getErrors, registerSetting, getSetting, Utils
|
||||
getErrors, getSetting, Utils
|
||||
} from 'meteor/vulcan:core';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
@ -42,9 +42,6 @@ import isEqualWith from 'lodash/isEqualWith';
|
|||
|
||||
import { convertSchema, formProperties } from '../modules/schema_utils';
|
||||
|
||||
registerSetting('forms.warnUnsavedChanges', false,
|
||||
'Warn user about unsaved changes before leaving route', true);
|
||||
|
||||
// unsetCompact
|
||||
const unsetCompact = (object, path) => {
|
||||
const parentPath = path.slice(0, path.lastIndexOf('.'));
|
||||
|
@ -621,6 +618,7 @@ class Form extends Component {
|
|||
// run error callback if it exists
|
||||
if (this.props.errorCallback) this.props.errorCallback(document, error);
|
||||
|
||||
// scroll back up to show error messages
|
||||
Utils.scrollIntoView('.flash-message');
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { registerComponent } from 'meteor/vulcan:core';
|
||||
import { registerComponent, registerSetting } from 'meteor/vulcan:core';
|
||||
|
||||
registerSetting('forms.warnUnsavedChanges', false, 'Warn user about unsaved changes before leaving route', true);
|
||||
|
||||
import './components.js';
|
||||
|
||||
export {default as FormWrapper} from '../components/FormWrapper.jsx';
|
||||
export { default as FormWrapper } from '../components/FormWrapper.jsx';
|
||||
|
|
Loading…
Add table
Reference in a new issue