// var actTotal ="";
if (!(isNotNull(f.budget_code,1))) {
- _alertString += _("- Budget code cannot be blank\n");
+ _alertString += _("- Budget code cannot be blank") + "\n";
}
if (!(isNotNull(f.budget_name,1))) {
- _alertString += _("- Budget name cannot be blank\n");
+ _alertString += _("- Budget name cannot be blank") + "\n";
}
if (!(isNotNull(f.budget_amount,1))) {
- _alertString += _("- Budget amount cannot be blank\n");
+ _alertString += _("- Budget amount cannot be blank") + "\n";
}
var budgetId;
if (budgetId > 0) { ; //its a mod ...
// if parent eq curent-budget, fail...
if ( newBudgetParent == budgetId ) {
- _alertString += _("- Budget parent is current budget\n");
+ _alertString += _("- Budget parent is current budget") + "\n";
}
else if (newBudgetParent) {
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)");
+ alertString2 += "\n------------------------------------------------------------------------------------\n\n";
alertString2 += _alertString;
alert(alertString2);
}
// to check if the data are correctly entered.
function Check(ff) {
var ok=0;
- var _alertString=_("Form not submitted because of the following problem(s)\n");
- _alertString +="-------------------------------------------------------------------\n\n";
+ var _alertString=_("Form not submitted because of the following problem(s)");
+ _alertString +="\n-------------------------------------------------------------------\n\n";
if (!(isNotNull(ff.contractname,0))){
ok=1;
- _alertString += _("- Name missing\n");
+ _alertString += _("- Name missing") + "\n";
}
var startDate = Date_from_syspref($("#contractstartdate").val());
var endDate = Date_from_syspref($("#contractenddate").val());
if (!parseInt(startDate.getTime())) {
ok=1;
- _alertString += _("- Start date missing or invalid.\n");
+ _alertString += _("- Start date missing or invalid.") + "\n";
}
if (!parseInt(endDate.getTime())) {
ok=1;
- _alertString += _("- End date missing or invalid.\n");
+ _alertString += _("- End date missing or invalid.") + "\n";
}
if (startDate > endDate) {
ok=1;
- _alertString += _("Wrong date! start date cannot be after end date.\n");
+ _alertString += _("Wrong date! start date cannot be after end date.") + "\n";
}
if (endDate < (new Date)) {
ok=1;
- _alertString += _("End date before today, Invalid end date!\n");
+ _alertString += _("End date before today, Invalid end date!") + "\n";
}
if (ok) { // if there is a problem
alert(_alertString);
if(isempty){
flag = 1;
- StrAlert += "\t* Field " + arr[0] + " is mandatory, at least one of its subfields must be filled\n";
+ StrAlert += "\t* Field " + arr[0] + _(" is mandatory, at least one of its subfields must be filled") + "\n";
}
}
if(StrAlert){
- return _("Can't save this record because the following field aren't filled :\n\n") + StrAlert;
+ return _("Can't save this record because the following field aren't filled :") + "\n\n" + StrAlert;
}
return false;
}
}
if (count_reserv == "0"){
- msg += (_("- Please select an item to place a hold\n"));
+ msg += (_("- Please select an item to place a hold") + "\n");
}
if (count_reserv >= "2"){
- msg += (_("- You may only place a hold on one item at a time\n"));
+ msg += (_("- You may only place a hold on one item at a time") + "\n");
}
if (alreadyreserved > "0"){
- msg += (_("- This patron had already placed a hold on this item\n Please cancel the previous hold first \n"));
+ msg += (_("- This patron had already placed a hold on this item") + "\n" + _("Please cancel the previous hold first") + "\n");
}
if (msg == "") return(true);
var alertString2;
if(f.addshelf.value.length ==0){
- _alertString += _("- You must enter a List Name\n");
+ _alertString += _("- You must enter a List Name") + "\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)");
+ alertString2 += "\n------------------------------------------------------------------------------------\n\n";
alertString2 += _alertString;
alert(alertString2);
}