Lines 117-129
$(function() {
Link Here
|
117 |
function Check(f) { |
117 |
function Check(f) { |
118 |
var _alertString=""; |
118 |
var _alertString=""; |
119 |
var alertString2; |
119 |
var alertString2; |
|
|
120 |
var addshelf = f.addshelf.value; |
121 |
|
122 |
if ( !(/^\S.*\S$/.test(addshelf)) && !( /^\S$/.test(addshelf)) ) { |
123 |
_alertString += _("The List Name is not valid."); |
124 |
} |
120 |
|
125 |
|
121 |
if(f.addshelf.value.length ==0){ |
126 |
if(addshelf.length ==0){ |
122 |
_alertString += _("- You must enter a List Name") + "\n"; |
127 |
_alertString += _("- You must enter a List Name") + "\n"; |
123 |
} |
128 |
} |
124 |
else if(f.addshelf.value == "0"){ |
129 |
|
125 |
alert("The number '0' is not a valid name for a list, please enter another name."); |
|
|
126 |
} |
127 |
if (_alertString.length==0) { |
130 |
if (_alertString.length==0) { |
128 |
f.submit(); |
131 |
f.submit(); |
129 |
} else { |
132 |
} else { |
Lines 148-154
$(function() {
Link Here
|
148 |
[% FOREACH paramsloo IN paramsloop %] |
151 |
[% FOREACH paramsloo IN paramsloop %] |
149 |
<div class="yui-ge"> |
152 |
<div class="yui-ge"> |
150 |
<div class="yui-u first"> |
153 |
<div class="yui-u first"> |
151 |
[% IF ( paramsloo.already ) %]<div class="dialog alert">A List named <b>[% paramsloo.already %]</b> already exists!</div>[% END %] |
154 |
[% IF ( paramsloo.already || paramsloo.already == 0 ) %]<div class="dialog alert">A List named <b>[% paramsloo.already %]</b> already exists!</div>[% END %] |
152 |
[% IF ( paramsloo.status ) %]<div class="dialog alert">[% paramsloo.string %]</div>[% END %] |
155 |
[% IF ( paramsloo.status ) %]<div class="dialog alert">[% paramsloo.string %]</div>[% END %] |
153 |
[% IF ( paramsloo.nobarcode ) %]<div class="dialog alert">ERROR: No barcode given.</div>[% END %] |
156 |
[% IF ( paramsloo.nobarcode ) %]<div class="dialog alert">ERROR: No barcode given.</div>[% END %] |
154 |
[% IF ( paramsloo.noshelfnumber ) %]<div class="dialog alert">ERROR: No shelfnumber given.</div>[% END %] |
157 |
[% IF ( paramsloo.noshelfnumber ) %]<div class="dialog alert">ERROR: No shelfnumber given.</div>[% END %] |
155 |
- |
|
|