if (request.msg) {
category_name = unescape(request["cat_"+request.Category]);
writeln("Edit "+category_name+"
");
if (request.msg == "name_in_use") {
writeln("Error: Type of work already exists
");
writeln("Someone else has just created or renamed a type of work ");
writeln("with that name.");
writeln("");
writeln("Please try again with a different name.");
}
else if (request.msg == "updated")
writeln("
"+category_name+" updated.
");
}
else
writeln("Edit "+category_name+"
");
writeln("
Change the name of this type of work:
writeln("");
if (!entriesExist("from hours where category_id="+request.Category))
writeln("");
else
writeln("This type of work cannot be deleted because hours have been "+
"entered using it.
");