Add UDB to list of editable fields.
[irspy-moved-to-github.git] / web / htdocs / details / edit.mc
index 4d926f6..375e3ef 100644 (file)
@@ -68,9 +68,9 @@ if (!defined $id) {
     } elsif (!defined $newid) {
        # Tried to create new record but data is insufficient
        print qq[<p class="error">
-               Please specify title, protocol, host, port and database name.</p>\n];
+               Please specify name, protocol, host, port and database name.</p>\n];
        undef $update;
-    } elsif ($host !~ /^\w+\.[\w.]*\w$/i) {
+    } elsif ($host !~ /^[\w-]+\.[\w.-]*\w$/i) {
        print qq[<p class="error">
                This host name is not valid.</p>\n];
        undef $update;
@@ -121,6 +121,7 @@ my @fields =
      [ port         => 0, "Port", "e:serverInfo/e:port" ],
      [ dbname       => 0, "Database Name", "e:serverInfo/e:database",
        qw(e:host e:port) ],
+     [ udb          => 0, "Access Name (Unique DB)", "e:databaseInfo/i:udb", qw(e:host e:port e:database) ],
      [ type         => $m->comp("libtype-list.mc"),
        "Type of Library", "i:status/i:libraryType" ],
      [ username     => 0, "Username (if needed)", "e:serverInfo/e:authentication/e:user",