minor layout change to make the default expiry match the configured default
also remove redundant undef in getpaste
This commit is contained in:
parent
e059aba5cc
commit
491b43c5fb
|
@ -32,6 +32,9 @@ show_errors: 1
|
||||||
expiration:
|
expiration:
|
||||||
weeks: 2
|
weeks: 2
|
||||||
|
|
||||||
|
strings:
|
||||||
|
default_expiry: "Two weeks"
|
||||||
|
|
||||||
|
|
||||||
# Languages supported by Pygments
|
# Languages supported by Pygments
|
||||||
# TODO: perhaps swap this out with something in App::WerePaste::Util::PygmentsBridge so we can dynamically load supported languages
|
# TODO: perhaps swap this out with something in App::WerePaste::Util::PygmentsBridge so we can dynamically load supported languages
|
||||||
|
|
|
@ -51,7 +51,7 @@ sub ValidateParams {
|
||||||
sub GetPaste {
|
sub GetPaste {
|
||||||
my $id = shift; $id = lc $id;
|
my $id = shift; $id = lc $id;
|
||||||
return undef unless $id =~ /^[a-f0-9]*$/;
|
return undef unless $id =~ /^[a-f0-9]*$/;
|
||||||
return schema->resultset('Paste')->single({ id => $id }) || undef;
|
return schema->resultset('Paste')->single({ id => $id });
|
||||||
}
|
}
|
||||||
sub StorePaste {
|
sub StorePaste {
|
||||||
my $params = shift;
|
my $params = shift;
|
||||||
|
|
|
@ -17,13 +17,14 @@
|
||||||
<br />
|
<br />
|
||||||
<div style='float: right'>
|
<div style='float: right'>
|
||||||
<select class="expiration" name="expiration">
|
<select class="expiration" name="expiration">
|
||||||
<option value="hours:1" >Expire 1 hour from now</option>
|
<option value "" selected>[% strings.default_expiry %] (Default)</option>
|
||||||
|
<option value="hours:1" >Expire 1 hour from now</option>
|
||||||
<option value="hours:6" >Expire 6 hours from now</option>
|
<option value="hours:6" >Expire 6 hours from now</option>
|
||||||
<option value="days:1" >Expire 1 day from now</option>
|
<option value="days:1" >Expire 1 day from now</option>
|
||||||
<option value="weeks:1" >Expire 1 week from now</option>
|
<option value="weeks:1" >Expire 1 week from now</option>
|
||||||
<option value="months:1">Expire 1 month from now</option>
|
<option value="months:1">Expire 1 month from now</option>
|
||||||
<option value="years:1" >Expire 1 year from now</option>
|
<option value="years:1" >Expire 1 year from now</option>
|
||||||
<option value="never:1" selected>Never expire</option>
|
<option value="never:1" >Never expire</option>
|
||||||
</select>
|
</select>
|
||||||
<button type="submit">Save</button>
|
<button type="submit">Save</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue