mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-09 05:54:34 +02:00
Use Form component in all forms
This commit is contained in:
16
resources/js/components/Form.js
vendored
16
resources/js/components/Form.js
vendored
@ -77,13 +77,13 @@ class Form {
|
||||
/**
|
||||
* Reset the form fields.
|
||||
*/
|
||||
// reset () {
|
||||
// Object.keys(this)
|
||||
// .filter(key => !Form.ignore.includes(key))
|
||||
// .forEach(key => {
|
||||
// this[key] = deepCopy(this.originalData[key])
|
||||
// })
|
||||
// }
|
||||
reset () {
|
||||
Object.keys(this)
|
||||
.filter(key => !Form.ignore.includes(key))
|
||||
.forEach(key => {
|
||||
this[key] = deepCopy(this.originalData[key])
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit the form via a GET request.
|
||||
@ -267,6 +267,6 @@ class Form {
|
||||
|
||||
Form.routes = {}
|
||||
Form.errorMessage = 'Something went wrong. Please try again.'
|
||||
Form.ignore = ['isBusy', /*'successful', 'errors',*/ 'originalData']
|
||||
Form.ignore = ['isBusy', /*'successful'*/, 'errors', 'originalData']
|
||||
|
||||
export default Form
|
||||
|
Reference in New Issue
Block a user