<%doc> Backstage editor <%flags> inherit => 'none' <%args> $id $from => undef <%perl> if ($ARGS{'save'}) { # save new text ## todo: use some BS class for this. Tty::ING::DB::Dbh()->do('update html_content set data=? where id=?', undef, $ARGS{'data'}, $id) if not $ARGS{'cancel.x'}; ## redirect to where we were $m->clear_buffer; $r->content_type('text/html'); if ($ARGS{'absfrom'}) { $r->header_out('Location' => "$ARGS{absfrom}"); } else { $r->header_out('Location' => "/admin/bs/$ARGS{from}"); } $m->abort(302); } my $data = Tty::ING::DB::Dbh()->selectrow_array('select data from html_content where id=?', undef, $id);
IHV Logo

% # special fancyedit for IE % if ($r->header_in("User-Agent") =~ /MSIE/i) { <% Tty::ING::BS::Fancyedit("edit", "data", "myform", $data, width=>"100%", height=>"300") %> % } else { % }
<& /comp/html/buttonsubmit, img => "opslaan" &> <& /comp/html/buttonsubmit, img => "annuleren", name => 'cancel', value => "Annuleer" &>