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:
|
||||
weeks: 2
|
||||
|
||||
strings:
|
||||
default_expiry: "Two weeks"
|
||||
|
||||
|
||||
# Languages supported by Pygments
|
||||
# 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 {
|
||||
my $id = shift; $id = lc $id;
|
||||
return undef unless $id =~ /^[a-f0-9]*$/;
|
||||
return schema->resultset('Paste')->single({ id => $id }) || undef;
|
||||
return schema->resultset('Paste')->single({ id => $id });
|
||||
}
|
||||
sub StorePaste {
|
||||
my $params = shift;
|
||||
|
|
|
@ -17,13 +17,14 @@
|
|||
<br />
|
||||
<div style='float: right'>
|
||||
<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="days:1" >Expire 1 day from now</option>
|
||||
<option value="weeks:1" >Expire 1 week 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="months:1">Expire 1 month from now</option>
|
||||
<option value="years:1" >Expire 1 year from now</option>
|
||||
<option value="never:1" selected>Never expire</option>
|
||||
<option value="years:1" >Expire 1 year from now</option>
|
||||
<option value="never:1" >Never expire</option>
|
||||
</select>
|
||||
<button type="submit">Save</button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue