New
authorMike Taylor <mike@indexdata.com>
Wed, 20 Sep 2006 16:49:26 +0000 (16:49 +0000)
committerMike Taylor <mike@indexdata.com>
Wed, 20 Sep 2006 16:49:26 +0000 (16:49 +0000)
web/htdocs/add.html [new file with mode: 0644]
web/htdocs/details/add.mc [new file with mode: 0644]

diff --git a/web/htdocs/add.html b/web/htdocs/add.html
new file mode 100644 (file)
index 0000000..847e840
--- /dev/null
@@ -0,0 +1,3 @@
+%# $Id: add.html,v 1.1 2006-09-20 16:49:26 mike Exp $
+<& /chrome/layout.mc, %ARGS, title => "Add a new target",
+    component => "/details/add.mc" &>
diff --git a/web/htdocs/details/add.mc b/web/htdocs/details/add.mc
new file mode 100644 (file)
index 0000000..07bb609
--- /dev/null
@@ -0,0 +1,37 @@
+%# $Id: add.mc,v 1.1 2006-09-20 16:49:46 mike Exp $
+<%perl>
+if ($r->param("_add")) {
+    my $host = $r->param("net.host");
+    my $port = $r->param("net.port");
+    my $db = $r->param("net.path");
+    my $id = "$host:$port/$db";
+    $r->param(id => $id);
+    $m->comp("check.mc");
+} else {
+</%perl>
+     <p>
+      Enter the connection details of the target you wish to add,
+      then press the <b>Add</b> button.
+     </p>
+     <form>
+      <table class="searchform">
+       <tr>
+        <th>Host</th>
+       <td><input type="text" name="net.host" size="40"/></td>
+       </tr>
+       <tr>
+        <th>Port</th>
+       <td><input type="text" name="net.port" size="5"/></td>
+       </tr>
+       <tr>
+        <th>Database</th>
+       <td><input type="text" name="net.path" size="20"/></td>
+       </tr>
+       <tr><td colspan="2">&nbsp;</td></tr>
+       <tr>
+        <th/>
+        <th><input type="submit" name="_add" value="Add"/></th>
+       </tr>
+      </table>
+     </form>
+% }