From e9257aea787bc34739be72ac19831d5724cde1ad Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 10 Mar 2011 19:33:27 +0000 Subject: [PATCH] Complain when trying to register an empty Workstation ID Client-side only, no server side validation. Signed-off-by: Jason Etheridge git-svn-id: svn://svn.open-ils.org/ILS/trunk@19692 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../server/locale/en-US/common.properties | 1 + Open-ILS/xul/staff_client/server/main/ws_info.xul | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties index 08c18a0..d5b1ff5 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties @@ -188,6 +188,7 @@ staff.main.gen_offline_widgets.workstation_registration_denied=You do not have p staff.main.gen_offline_widgets.registration.override=Override Registration Failure? staff.main.gen_offline_widgets.registration.error=Workstation Registration error (%1$s) staff.main.gen_offline_widgets.registration.success=Registration successful +staff.main.gen_offline_widgets.registration.empty=Please specify a workstation name staff.util.timestamp_dialog.future_date_disallowed=Future dates disallowed. staff.util.timestamp_dialog.past_date_disallowed=Past dates disallowed. staff.util.timestamp_dialog.today_disallowed=Today disallowed. diff --git a/Open-ILS/xul/staff_client/server/main/ws_info.xul b/Open-ILS/xul/staff_client/server/main/ws_info.xul index 27f5cb4..1bd51bf 100644 --- a/Open-ILS/xul/staff_client/server/main/ws_info.xul +++ b/Open-ILS/xul/staff_client/server/main/ws_info.xul @@ -155,6 +155,10 @@ } function register() { + if(g.tb.value.length == 0) { + alert(document.getElementById('commonStrings').getString('staff.main.gen_offline_widgets.registration.empty')); + return; + } try { var robj = g.network.simple_request( 'AUTH_WORKSTATION', -- 1.7.2.5