aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait.coffee26
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait.js8
2 files changed, 29 insertions, 5 deletions
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.coffee b/wqflask/wqflask/static/new/javascript/show_trait.coffee
index 5e47dedc..9498a1bb 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait.coffee
+++ b/wqflask/wqflask/static/new/javascript/show_trait.coffee
@@ -237,14 +237,34 @@ $ ->
else if $('#block_group').val() == "other"
$('#Other_'+index.toString()).find('.trait_value_input').val("x")
- $('#remove_samples_field').validate(
+ $('#block_by_index').click(block_by_index)
+
+ #validate_block_index = ->
+ # $('#remove_samples_field').valid(
+ # rules:
+ # field:
+ # required: true
+ # number: true
+ # messages:
+ # field:
+ # "Please check that your input is valid."
+ # )
+
+ $('#trait_data_form').validate()
+
+ $('#remove_samples_field').valid(
rules:
field:
required: true
number: true
- )
+ messages:
+ field:
+ "Please check that your input is valid."
+ )
+
+ #$('#remove_samples_field').change(validate_block_index)
+
- $('#block_by_index').click(block_by_index)
##End Block Samples By Index Code
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index 7af60fae..5704e183 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -280,15 +280,19 @@
}
return _results;
};
- $('#remove_samples_field').validate({
+ $('#block_by_index').click(block_by_index);
+ $('#trait_data_form').validate();
+ $('#remove_samples_field').valid({
rules: {
field: {
required: true,
number: true
}
+ },
+ messages: {
+ field: "Please check that your input is valid."
}
});
- $('#block_by_index').click(block_by_index);
hide_no_value = function() {
var _this = this;
return $('.value_se').each(function(index, element) {