summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util/FormHTML.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-02-08 16:06:17 +0100
committerYorhel <git@yorhel.nl>2018-02-08 16:12:07 +0100
commit93b79ef9ebafcfccd0d239ffd06e2b547e209e3d (patch)
tree98d96f024d00bf318b16243518e53c2977136202 /lib/VNDB/Util/FormHTML.pm
parent3f3a4d9810bb2483a89442b85d438639f26ecb7e (diff)
Store d+ pages in the DB as versioned entries + use markdown
This touches a bunch of things: - Adds a new first-class database entry type - Removes the d+.+.+ BBCode link syntax, adds a new d+#+ and d+#+.+ link syntax (references have been updated where possible) - Adds a new dependency on Text::MultiMarkdown
Diffstat (limited to 'lib/VNDB/Util/FormHTML.pm')
-rw-r--r--lib/VNDB/Util/FormHTML.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VNDB/Util/FormHTML.pm b/lib/VNDB/Util/FormHTML.pm
index a522599e..11de460b 100644
--- a/lib/VNDB/Util/FormHTML.pm
+++ b/lib/VNDB/Util/FormHTML.pm
@@ -54,7 +54,7 @@ sub htmlFormError {
li "$field: Malformed data or invalid input" if $rule eq 'json';
li 'Invalid release date' if $rule eq 'rdate';
if($rule eq 'editsum') {
- li; lit 'Please read <a href="/d5.4">the guidelines</a> on how to use the edit summary.'; end;
+ li; lit 'Please read <a href="/d5#4">the guidelines</a> on how to use the edit summary.'; end;
}
}
}
@@ -187,6 +187,7 @@ sub htmlFormPart {
# nosubmit => 1/0, hides the submit button
# editsum => 1/0, adds an edit summary field before the submit button
# continue => 2/1/0, replace submit button with continue buttons
+# preview => 1/0, add preview button
# noformcode=> 1/0, remove the formcode field
# The other arguments are a list of subforms in the form
# of (subform-name => [form parts]). Each subform is shown as a
@@ -265,6 +266,7 @@ sub htmlForm {
input type => 'submit', name => 'continue_ign', value => 'Continue and ignore duplicates',
class => 'submit', style => 'width: auto', tabindex => 10 if $options->{continue} == 2;
}
+ input type => 'submit', value => 'Preview', id => 'preview', name => 'preview', class => 'submit', tabindex => 10 if $options->{preview};
end;
end 'div';
}