From dec7e64355686c754d442ae7898596d5f2fee652 Mon Sep 17 00:00:00 2001 From: Ramkrishna Chakrabarty Date: Mon, 15 Nov 2010 15:38:44 -0500 Subject: [PATCH] Restored the function to stop the edit samples form from getting submitted when return key is pressed. This is needed in this form as the barcode scanner (when in keyboard emulation mode) may send a return key appended to the scanned barcode string. --- scripts/galaxy_messaging/server/amqp_consumer.py | 2 +- templates/requests/common/edit_samples.mako | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/galaxy_messaging/server/amqp_consumer.py b/scripts/galaxy_messaging/server/amqp_consumer.py index 27c54aed000..dcd5e45e984 100644 --- a/scripts/galaxy_messaging/server/amqp_consumer.py +++ b/scripts/galaxy_messaging/server/amqp_consumer.py @@ -68,7 +68,7 @@ def update_sample_state( message ): api_key = get_value(dom, 'api_key') log.debug('Barcode: ' + barcode) log.debug('State: ' + state) - log.debug('api_key: ' + api_key) + log.debug('API Key: ' + api_key) # validate if not barcode or not state or not api_key: log.debug( 'Incomplete sample_state_update message received. Sample barcode, desired state and user API key is required.' ) diff --git a/templates/requests/common/edit_samples.mako b/templates/requests/common/edit_samples.mako index a2c93734005..bb1ddcd1f6f 100644 --- a/templates/requests/common/edit_samples.mako +++ b/templates/requests/common/edit_samples.mako @@ -14,6 +14,18 @@ ${common_javascripts()} + + <% from galaxy.web.framework.helpers import time_ago