Skip to content

Commit

Permalink
witness box should be visible when only 1 process available
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjpage authored and psd-apiary committed Mar 30, 2011
1 parent 1b507e8 commit c815bca
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/views/process_plates/new.html.haml
Expand Up @@ -46,15 +46,18 @@

$.post('#{processes_instruments_path}',{ instrument_barcode: $('#instrument_barcode')[0].value}, function(data) {
$("#instrument_process").html(data);
});

$.post('#{witness_instruments_path}',{ instrument_barcode: $('#instrument_barcode')[0].value, instrument_process_id: $('#instrument_process')[0].value }, function(data) {
if (data.match(/witness_required/)) {
$("#witness_barcode_input").removeClass('hidden');
}

$.post('#{witness_instruments_path}',{ instrument_barcode: $('#instrument_barcode')[0].value, instrument_process_id: $('#instrument_process')[0].value }, function(data) {
if (data.match(/witness_required/)) {
$("#witness_barcode_input").removeClass('hidden');
}

});

});



});

$("#instrument_process").change(function() {
Expand Down

0 comments on commit c815bca

Please sign in to comment.