%doc> Backstage editor %doc> <%flags> inherit => 'none' %flags> <%args> $id $from => undef %args> <%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); %perl>