Skip to content

Commit

Permalink
revert to not accepting having both fields blank
Browse files Browse the repository at this point in the history
  • Loading branch information
afpowell committed Oct 24, 2024
1 parent e1be94a commit 1a9a955
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mason/breeders_toolbox/add_seedlot_dialogs.mas
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ $cross_uniquename => ''
<div class="form-group">
<label class="col-sm-3 control-label">Amount (number of seeds): </label>
<div class="col-sm-9" >
<input class="form-control" id="seedlot_amount" placeholder="Optional">
<input class="form-control" id="seedlot_amount" placeholder="Amount OR Weight(g) Required">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Weight (g): </label>
<div class="col-sm-9" >
<input class="form-control" id="seedlot_weight" placeholder="Optional">
<input class="form-control" id="seedlot_weight" placeholder="Amount OR Weight(g) Required">
</div>
</div>
<!--
Expand Down Expand Up @@ -207,6 +207,7 @@ jQuery(document).ready(function(){
if (name == '') { alert("Please provide a name"); return; }
else if (location == '') { alert("Please provide a location"); return; }
else if (box_name == '') { alert("Please provide a box name"); return; }
else if (amount == '' && weight == '') { alert("Please provide a seed count amount or a weight in grams!"); return; }
else if (isNaN(amount)) { alert("If inputting a seed count amount, it must be a numeric value."); return; }
else if (isNaN(weight)) { alert("If inputting a weight, it must be a numeric value."); return; }
else if (breeding_program_id == '') { alert("Please select a breeding program"); return; }
Expand Down

0 comments on commit 1a9a955

Please sign in to comment.