[tmp page_title]
[either]
[cgi page_title]
[or]
Select for table edit: [cgi mv_data_table]
[/either]
[/tmp]
[tmp page_banner]
[either]
[cgi page_banner]
[or]
[cgi page_title]
[or]
[loop list="[cgi mv_data_table]"]
Select for table edit:
[page href="__UI_BASE__/flex_editor"
form='
mv_data_table=__UI_META_TABLE__
ui_meta_view=dbconfig
ui_data_fields=code name height field help help_url
ui_break_before=height
page_title=Change display information: [loop-code]
ui_return_to=__UI_BASE__/gentable
item_id=[loop-code]
'][loop-code]
[/loop]
[/either]
[/tmp]
[tmp help_name][either][cgi help_name][or]flex.select[/either][/tmp]
[tmp icon_name][either][cgi icon_name][or]admin/icon_config.gif[/either][/tmp]
[if-mm function="!tables" table="[cgi mv_data_table]"]
[bounce page="__UI_BASE__/error"]
[/if-mm]
[perl tables="[cgi mv_data_table] __UI_META_TABLE__"]
delete $Scratch->{ui_location};
if($CGI->{ui_sequence_edit}) {
my $doit;
if($CGI->{item_id_left} =~ s/^(.*?),//) {
$CGI->{item_id} = $1;
$doit = 1;
}
elsif ($CGI->{item_id_left}) {
$CGI->{item_id} = delete $CGI->{item_id_left};
delete $CGI->{ui_sequence_edit};
$doit = 1;
}
else {
delete $CGI->{item_id};
delete $CGI->{ui_sequence_edit};
}
return unless $doit;
$Scratch->{ui_location}
= $Tag->area( {
href => '__UI_BASE__/flex_editor',
form => qq{
mv_data_table=$CGI->{mv_data_table}
item_id=$CGI->{item_id}
item_id_left=$CGI->{item_id_left}
ui_sequence_edit=$CGI->{ui_sequence_edit}
ui_return_to=__UI_BASE__/flex_select
ui_return_to=mv_data_table=$CGI->{mv_data_table}
ui_return_to=ui_sequence_edit=$CGI->{ui_sequence_edit}
ui_page_banner=Edit next key $CGI->{item_id}
},
});
return;
}
return unless $CGI->{item_id};
return unless delete $CGI->{deleterecords};
return unless $Tag->if_mm('tables', '=d');
delete $Scratch->{ui_location};
$Config->{NoSearch} = '';
my $tab = $CGI->{mv_data_table} or return;
my $db = $Db{$tab};
if(! $db) {
$Scratch->{error_message} = "Error: no $tab database.
";
$Scratch->{ui_location} = "__UI_BASE__/error";
return;
}
for(grep $_, @{$CGI_array->{item_id}}) {
$db->delete_record($_)
or push @errors, $@;
}
if(@errors) {
my $plural = @errors > 1 ? 's' : '';
return "Error$plural:
";
}
return;
[/perl]
[comment]
[calc]
### Why was I doing this?
my $out = '';
my $page;
delete $Scratch->{ui_location};
return unless $CGI->{ui_return_to};
($page, @env) = split /\0/, $CGI->{ui_return_to};
$Scratch->{ui_location} = $Tag->area({
href => $page,
form => join "\n", @env,
});
return;
[/calc]
[/comment]
[if scratch ui_location]
[bounce href=`delete $Scratch->{ui_location}`]
[elsif !cgi mv_data_table]
[bounce page="__UI_BASE__/gentable"]
[/elsif]
[/if]
@_UI_STD_HEAD_@
[update values]