Commit 41abd109 authored by b_b's avatar b_b Committed by Luc Didry
Browse files

Fix #63 : ajout d'une option de conf pour personnaliser les délais proposés

Pas certain que les modifications dans lib/ soient nécessaires, dans le doute, je les envoie.
parent 91d2be63
......@@ -35,6 +35,7 @@ sub startup {
tweet_card_via => '@framasky',
max_file_size => 10*1024*1024,
https => 0,
proposed_delays => '0,1,7,30,365',
default_delay => 0,
max_delay => 0,
token_length => 24,
......
......@@ -30,6 +30,7 @@ sub startup {
tweet_card_via => '@framasky',
max_file_size => 10*1024*1024,
https => 0,
proposed_delays => '0,1,7,30,365',
default_delay => 0,
max_delay => 0,
token_length => 24,
......
......@@ -89,6 +89,10 @@
# optional, default is 0 (no limit)
#default_delay => 0,
# values proposed for delays
# optional, default is '0,1,7,30,365'
#proposed_delays => '0,1,7,30,365',
# number of days after which the images will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay)
# a warning message will be displayed on homepage
# optional, default is 0 (no limit)
......
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
% for my $delay (qw/0 1 7 30 365/) {
% my @delays = split(',', $self->config('proposed_delays'));
% for my $delay (@delays) {
% my $text = ($delay == 7 || $delay == 30) ? l('%1 days', $delay) : $d->{'delay_'.$delay};
% if (config('max_delay')) {
% if ($delay) {
......
......@@ -134,7 +134,8 @@ function buildMessage(success, msg) {
'<form class="form col-sm-11 col-sm-offset-1" role="form" method="POST" action="', link(msg.real_short, '', msg.token, true), '">',
'<div class="form-group form-inline">',
'<select id="day-', msg.real_short, '" name="delete-day" class="form-control">',
% for my $delay (qw/0 1 7 30 365/) {
% my @delays = split(',', $self->config('proposed_delays'));
% for my $delay (@delays) {
% my $text = ($delay == 7 || $delay == 30) ? l('%1 days', $delay) : $d->{'delay_'.$delay};
% if (config('max_delay')) {
% if ($delay) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment