Add Markdown checkbox to thread->create; use defined-or to catch false
This commit is contained in:
parent
df870f682f
commit
ce7ea8c755
@ -36,6 +36,8 @@ sub create($self) {
|
|||||||
|
|
||||||
$self->session(author => $thread_author);
|
$self->session(author => $thread_author);
|
||||||
|
|
||||||
|
print $self->dumper($v);
|
||||||
|
|
||||||
unless ($preview) {
|
unless ($preview) {
|
||||||
my $new_thread_id = $self->thread->create(
|
my $new_thread_id = $self->thread->create(
|
||||||
$thread_author,
|
$thread_author,
|
||||||
|
@ -13,7 +13,7 @@ sub create(
|
|||||||
$author,
|
$author,
|
||||||
$title,
|
$title,
|
||||||
$body,
|
$body,
|
||||||
$markdown = 0,
|
$markdown //= 0,
|
||||||
$hidden = 0,
|
$hidden = 0,
|
||||||
$flagged = 0
|
$flagged = 0
|
||||||
)
|
)
|
||||||
|
@ -57,6 +57,10 @@
|
|||||||
rows => 6
|
rows => 6
|
||||||
) %>
|
) %>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-checkbox">
|
||||||
|
<%= check_box markdown => 1, id => 'markdown' %>
|
||||||
|
<%= label_for markdown => 'Markdown' %>
|
||||||
|
</div>
|
||||||
<div class="form-checkbox">
|
<div class="form-checkbox">
|
||||||
<%= check_box preview => 1, id => 'preview' %>
|
<%= check_box preview => 1, id => 'preview' %>
|
||||||
<%= label_for preview => 'Preview' %>
|
<%= label_for preview => 'Preview' %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user