-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from wasade/add_kit
Allow participants to add samples from another kit
- Loading branch information
Showing
5 changed files
with
76 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
function verify_kit_claim(form_name) { | ||
// Initialize form validation | ||
let form_selector = "form[name='" + form_name + "']"; | ||
return function() { | ||
$(form_selector).validate({ | ||
// Specify validation rules | ||
rules: { | ||
// The key name on the left side is the name attribute | ||
// of an input field. Validation rules are defined | ||
// on the right side | ||
kit_name: { | ||
required: true, | ||
remote: { | ||
url: "/check_acct_inputs", | ||
type: "post" | ||
} | ||
}, | ||
// Make sure the form is submitted to the destination defined | ||
// in the "action" attribute of the form when valid | ||
submitHandler: function (form) { | ||
form.submit(); | ||
} | ||
} | ||
}); | ||
}; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters