debian-mirror-gitlab/doc/development/new_fe_guide/modules/dirty_submit.md

23 lines
589 B
Markdown
Raw Normal View History

2018-12-13 13:39:08 +05:30
# Dirty Submit
> [Introduced][ce-21115] in GitLab 11.3.
> [dirty_submit][dirty-submit]
## Summary
Prevent submitting forms with no changes.
Currently handles `input`, `textarea` and `select` elements.
## Usage
```js
import dirtySubmitFactory from './dirty_submit/dirty_submit_form';
new DirtySubmitForm(document.querySelector('form'));
// or
new DirtySubmitForm(document.querySelectorAll('form'));
```
[ce-21115]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21115
[dirty-submit]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/dirty_submit/