Remove shake animation from auth field errors
This commit is contained in:
parent
2f006939f2
commit
e3f3a94980
3 changed files with 0 additions and 36 deletions
|
@ -1,27 +0,0 @@
|
||||||
/*
|
|
||||||
Copyright 2016 OpenMarket Ltd
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Functions for applying common thematic effects to UI elements.
|
|
||||||
* Ideally this would be themeable.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import Velocity from 'velocity-vector';
|
|
||||||
import 'velocity-vector/velocity.ui';
|
|
||||||
|
|
||||||
export function fieldInputIncorrect(element) {
|
|
||||||
Velocity(element, "callout.shake", 300);
|
|
||||||
}
|
|
|
@ -20,7 +20,6 @@ import PropTypes from 'prop-types';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import sdk from '../../../index';
|
import sdk from '../../../index';
|
||||||
import { _t } from '../../../languageHandler';
|
import { _t } from '../../../languageHandler';
|
||||||
import {fieldInputIncorrect} from '../../../UiEffects';
|
|
||||||
import SdkConfig from '../../../SdkConfig';
|
import SdkConfig from '../../../SdkConfig';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,12 +70,6 @@ class PasswordLogin extends React.Component {
|
||||||
this._loginField = null;
|
this._loginField = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
if (!this.props.loginIncorrect && nextProps.loginIncorrect) {
|
|
||||||
fieldInputIncorrect(this.isLoginEmpty() ? this._loginField : this._passwordField);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onSubmitForm(ev) {
|
onSubmitForm(ev) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ limitations under the License.
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { fieldInputIncorrect } from '../../../UiEffects';
|
|
||||||
import sdk from '../../../index';
|
import sdk from '../../../index';
|
||||||
import Email from '../../../email';
|
import Email from '../../../email';
|
||||||
import { looksValid as phoneNumberLooksValid } from '../../../phonenumber';
|
import { looksValid as phoneNumberLooksValid } from '../../../phonenumber';
|
||||||
|
@ -211,7 +210,6 @@ module.exports = React.createClass({
|
||||||
fieldValid[fieldID] = val;
|
fieldValid[fieldID] = val;
|
||||||
this.setState({fieldValid: fieldValid});
|
this.setState({fieldValid: fieldValid});
|
||||||
if (!val) {
|
if (!val) {
|
||||||
fieldInputIncorrect(this.fieldElementById(fieldID));
|
|
||||||
this.props.onError(errorCode);
|
this.props.onError(errorCode);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue