Total Complexity | 6 |
Complexity/F | 3 |
Lines of Code | 21 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | // register user |
||
2 | if ($("form#regist").length) { |
||
3 | $("form#regist").submit(function (e) { |
||
4 | e.preventDefault(); |
||
5 | $.post( |
||
6 | location.protocol + "//" + location.host + "/signup", |
||
7 | $(this).serialize(), |
||
8 | function (res) { |
||
9 | if (res) { |
||
10 | if (typeof res == "object") { |
||
11 | if (res.hasOwnProperty("success") && res.success) { |
||
12 | toastr.success( |
||
13 | "User created successfully".capitalize(), |
||
14 | "user management".toUpperCase() |
||
15 | ); |
||
16 | } |
||
17 | } |
||
18 | } |
||
19 | } |
||
20 | ); |
||
21 | }); |
||
22 | } |
||
23 |