From 073c680114418f4461d1cfcf1986f2146119c90a Mon Sep 17 00:00:00 2001 From: pines Date: Wed, 7 Feb 2007 20:22:46 +0000 Subject: [PATCH] sanity check input git-svn-id: svn://svn.open-ils.org/ILS/trunk@6915 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/server/cat/volume_copy_creator.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js index d86ab15a2d..64c1707c38 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js +++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js @@ -133,6 +133,9 @@ g.render_volume_count_entry = function(row,ou_id) { function render_copy_count_entry(ev) { if (ev.target.disabled) return; if (! isNaN( Number( ev.target.value) ) ) { + if ( Number( ev.target.value ) > 100 ) { + if (!window.confirm('Are you sure you would like to create ' + ev.target.value + ' volumes?')) return; + } if (node) { row.removeChild(node); node = null; } //ev.target.disabled = true; node = g.render_callnumber_copy_count_entry(row,ou_id,ev.target.value); @@ -175,10 +178,15 @@ g.render_callnumber_copy_count_entry = function(row,ou_id,count) { x.setAttribute('value','Call Numbers'); x.setAttribute('style','font-weight: bold'); x = document.createElement('label'); r.appendChild(x); x.setAttribute('value','# of Copies'); x.setAttribute('style','font-weight: bold'); + x.setAttribute('size','3'); x.setAttribute('cols','3'); + function handle_change(tb1,tb2,hb3) { if (tb1.value == '') return; if (isNaN( Number( tb2.value ) )) return; + if ( Number( tb2.value ) > 100 ) { + if (!window.confirm('Are you sure you would like to create ' + tb2.value + ' copies?')) return; + } //if (tb1.disabled || tb2.disabled) return; -- 2.43.2