Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dirty_submit.md « modules « new_fe_guide « development « doc - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6c03958b4636c430cb3fd23cdbf258b567e6d561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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/