diff options
author | Yorhel <git@yorhel.nl> | 2010-01-24 09:45:02 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-01-24 09:45:02 +0100 |
commit | d2dd07de4e0d9b8c00cd2db49aa2e7c0a5150bbc (patch) | |
tree | 4fc891330f8d7d513e1d22b1599880da304cdcd0 /lib/VNDB/Util/FormHTML.pm | |
parent | 0f35ebbfc2cb4f8da4975ded1331bb80f408ccad (diff) |
Versioned the deleting and locking of database entries
This is implemented by adding ihid (item hidden) and ilock (item
locked) columns to the changes table,
The (vn|release|producer).(hidden|locked) columns now work as a
cache, refering to the changes.(ihid|ilock) columns with
changes.id = (vn|release|producer).latest.
The cached columns are updated automatically each time a new revision is
inserted.
This is a pretty large change, bugs are quite likely.
Diffstat (limited to 'lib/VNDB/Util/FormHTML.pm')
-rw-r--r-- | lib/VNDB/Util/FormHTML.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/VNDB/Util/FormHTML.pm b/lib/VNDB/Util/FormHTML.pm index 2882b4c4..cfac77b9 100644 --- a/lib/VNDB/Util/FormHTML.pm +++ b/lib/VNDB/Util/FormHTML.pm @@ -209,11 +209,23 @@ sub htmlForm { end; } - # edit summary / submit button + # db mod / edit summary / submit button if(!$options->{nosubmit}) { div class => 'mainbox'; fieldset class => 'submit'; if($options->{editsum}) { + # hidden / locked checkbox + if($self->authCan('del')) { + input type => 'checkbox', name => 'ihid', id => 'ihid', value => 1, $options->{frm}{ihid} ? (checked => 'checked') : (); + label for => 'ihid', mt '_form_ihid'; + } + if($self->authCan('lock')) { + input type => 'checkbox', name => 'ilock', id => 'ilock', value => 1, $options->{frm}{ilock} ? (checked => 'checked') : (); + label for => 'ilock', mt '_form_ilock'; + } + txt "\n".mt('_form_hidlock_note')."\n" if $self->authCan('lock') || $self->authCan('del'); + + # edit summary (my $txt = $options->{frm}{editsum}||'') =~ s/&/&/; $txt =~ s/</</; $txt =~ s/>/>/; |