mirror of
https://framagit.org/fiat-tux/hat-softwares/lutim.git
synced 2026-05-15 13:56:07 +02:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
% # 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) {
|
||||
|
||||
Reference in New Issue
Block a user