[strip interpolate=1] [if session arg] [seti page_title][msg arg.0="[field key='[data session arg]' name=description]"]Edit Service %s[/msg][/seti] [else] [set page_title][L]Add Service[/L][/set] [/else] [/if] [tmpn page_submenu]Billing[/tmpn] [set table_perm]products[/set] [/strip] __STD_PREFIX__ __STD_HEAD__

[scratchd page_title]

[perl tables="access products metadata"] my @fields = qw(sku description full_description); my (%label, %widget, %options, $profile); if ($Session->{arg}) { $cref = $Db{products}->row_hash($Session->{arg}); } else { $cref = {}; } $profile = <{arg}) { $widget{sku} = 'hidden'; } else { $profile .= "\nsku=required"; } $label{description} = 'Description'; $label{full_description} = 'Full Description'; $widget{full_description} = 'textarea_6_70'; $tehashref = {table => 'products', key => $Session->{arg}, fields => join(',', @fields), label => \%label, widget => \%widget, options => \%options, mv_nextpage => 'services', ui_profile => $profile, auto_secure => 1, no_meta => 1, }; $tehashref->{row_template} = <<'EOP'; {LABEL}{WIDGET} EOP $tehashref->{body} = << 'EOQ'; {TOP_OF_FORM} {HIDDEN_FIELDS} {:REST}
  {BOTTOM_BUTTONS}
{BOTTOM_OF_FORM} EOQ my $out = ''; if ($Tag->error({all => 1, keep => 1})) { $out .= '

' . $Tag->error({all => 1, show_error => 1, keep => 1}) . '

'; } $out .= $Tag->table_editor($tehashref); [/perl] __STD_FOOTER__