From 79720bbb0f5033f0a5dcae5ff86d75ea41d5e71d Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Wed, 13 Feb 2013 11:15:22 -0500 Subject: [PATCH] Style barcode not found message, hide on empty The barcode not found message should stand out more, so make it a text alert. In addition, empty barcode isn't really "not found" but still invalid. Hide the "barcode not found" message and disable submit on empty barcode. Signed-off-by: Thomas Berezansky Signed-off-by: Michael Peters Signed-off-by: Ben Shum --- Open-ILS/src/templates/opac/css/style.css.tt2 | 4 ++++ Open-ILS/web/js/ui/default/opac/staff.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index 262028d1fe..f82551c160 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -1487,3 +1487,7 @@ a.preflib_change { padding: 0; vertical-align: middle; } + +#patron_usr_barcode_not_found { + font-weight: bold; color: [% css_colors.text_alert %]; +} diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js index ce26e03349..9bfc69e2da 100644 --- a/Open-ILS/web/js/ui/default/opac/staff.js +++ b/Open-ILS/web/js/ui/default/opac/staff.js @@ -42,6 +42,9 @@ function staff_hold_usr_barcode_changed(isload) { } if(barcode == undefined || barcode == '') { document.getElementById('patron_name').innerHTML = ''; + // No submitting on empty barcode, but empty barcode doesn't really count as "not found" either + document.getElementById('place_hold_submit').disabled = true; + document.getElementById("patron_usr_barcode_not_found").style.display = 'none'; cur_hold_barcode = null; return; } -- 2.43.2