From: Mike Taylor Date: Fri, 17 Nov 2006 22:39:17 +0000 (+0000) Subject: Towards orthogonalisation. X-Git-Tag: CPAN-v1.02~769 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=b19957eea1512557c2c130c51b59d5f9bbb4c5f0;p=irspy-moved-to-github.git Towards orthogonalisation. --- diff --git a/web/htdocs/details/edit.mc b/web/htdocs/details/edit.mc index 92b5fa2..1d789f0 100644 --- a/web/htdocs/details/edit.mc +++ b/web/htdocs/details/edit.mc @@ -1,5 +1,24 @@ -%# $Id: edit.mc,v 1.19 2006-11-16 17:52:06 mike Exp $ +%# $Id: edit.mc,v 1.20 2006-11-17 22:39:17 mike Exp $ +<%doc> +Since this form is used in many different situations, some care is +merited in considering the possibilities: + +New? Copy ID? Situation +-------------------------------------------------------------------------- +Y Blank form for adding a new target. +Y New target submitted successfully. +Y Partial new target submitted, requiring more + + Y Existing target to be edited. + Y Existing target has been updated. + + Y Y Existing target to be copied. + Y New or copied target rejected due to duplicate ID. +-------------------------------------------------------------------------- + <%args> +$new => undef +$copy => undef $id => undef <%perl> @@ -102,7 +121,7 @@ if ($update) {

<% xml_encode($xc->find("e:databaseInfo/e:title"), "[Untitled]") %>

% if ($nchanges) {

- The record has been <% $r->param("new") ? "created" : "updated" %>.
+ The record has been <% $new ? "created" : "updated" %>.
Changed <% $nchanges %> field<% $nchanges == 1 ? "" : "s" %>.

% } @@ -141,6 +160,9 @@ foreach my $ref (@fields) { % } else { % } +% if (defined $copy) { + +% }