removing warn and reindenting
+ \\n fixes (for error message better display)
This commit is contained in:
parent
a4662fd614
commit
ad1e018667
2 changed files with 153 additions and 151 deletions
|
@ -47,7 +47,6 @@ use C4::Output;
|
|||
|
||||
sub StringSearch {
|
||||
my $query = "SELECT * FROM currency WHERE (currency LIKE ?) ORDER BY currency";
|
||||
warn "$query :: @_[0]";
|
||||
my $sth = C4::Context->dbh->prepare($query);
|
||||
$sth->execute((shift || '') . '%');
|
||||
return $sth->fetchall_arrayref({});
|
||||
|
|
|
@ -17,16 +17,19 @@
|
|||
var _alertString="";
|
||||
var alertString2;
|
||||
if (f.currency.value.length==0) {
|
||||
_alertString += "- Currency name missing\\n";
|
||||
_alertString += "- Currency name missing\n";
|
||||
}
|
||||
if (f.rate.value.length==0) {
|
||||
_alertString += "- Rate missing\\n";
|
||||
_alertString += "- Rate missing\n";
|
||||
}
|
||||
if (f.symbol.value.length==0) {
|
||||
_alertString += "- Symbol missing\n";
|
||||
}
|
||||
if (_alertString.length==0) {
|
||||
document.Aform.submit();
|
||||
} else {
|
||||
alertString2 = "Form not submitted because of the following problem(s)\\n";
|
||||
alertString2 += "------------------------------------------------------------------------------------\\n\\n";
|
||||
alertString2 = "Form not submitted because of the following problem(s)\n";
|
||||
alertString2 += "------------------------------------------------------------------------------------\n";
|
||||
alertString2 += _alertString;
|
||||
alert(alertString2);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue