Fix: Bad selection of hour
This commit is contained in:
parent
10d051e2a2
commit
147d256a0f
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -767,7 +767,7 @@ elseif ($_GET["id"] > 0)
|
|||||||
$html->select_date($objp->date_intervention,'di',0,0,0,"date_intervention");
|
$html->select_date($objp->date_intervention,'di',0,0,0,"date_intervention");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Dur<EFBFBD>e
|
// Duration
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$html->select_duree('duration',$objp->duree);
|
$html->select_duree('duration',$objp->duree);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -2672,9 +2672,9 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Fonction servant a afficher une durée dans une liste déroulante
|
\brief Fonction servant a afficher une durée dans une liste déroulante
|
||||||
\param prefix prefix
|
\param prefix prefix
|
||||||
\param iSecond Nombre de secondes
|
\param iSecond Nombre de secondes
|
||||||
*/
|
*/
|
||||||
function select_duree($prefix,$iSecond='')
|
function select_duree($prefix,$iSecond='')
|
||||||
{
|
{
|
||||||
@ -2683,12 +2683,12 @@ class Form
|
|||||||
$hourSelected = ConvertSecondToTime($iSecond,'hour');
|
$hourSelected = ConvertSecondToTime($iSecond,'hour');
|
||||||
$minSelected = ConvertSecondToTime($iSecond,'min');
|
$minSelected = ConvertSecondToTime($iSecond,'min');
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<select class="flat" name="'.$prefix.'hour">';
|
print '<select class="flat" name="'.$prefix.'hour">';
|
||||||
print "<option value=\"0\">0</option>";
|
for ($hour = 0; $hour < 24; $hour++)
|
||||||
for ($hour = 1 ; $hour < 24 ; $hour++)
|
|
||||||
{
|
{
|
||||||
print '<option value="'.$hour.'"';
|
print '<option value="'.$hour.'"';
|
||||||
if ((!$hourSelected && $hour == 1) || ($hourSelected == $hour))
|
if ($hourSelected == $hour || ($iSecond == '' && $hour == 1))
|
||||||
{
|
{
|
||||||
print " selected=\"true\"";
|
print " selected=\"true\"";
|
||||||
}
|
}
|
||||||
@ -2697,7 +2697,7 @@ class Form
|
|||||||
print "</select>";
|
print "</select>";
|
||||||
print "H ";
|
print "H ";
|
||||||
print '<select class="flat" name="'.$prefix.'min">';
|
print '<select class="flat" name="'.$prefix.'min">';
|
||||||
for ($min = 0 ; $min <= 55 ; $min=$min+5)
|
for ($min = 0; $min <= 55; $min=$min+5)
|
||||||
{
|
{
|
||||||
print '<option value="'.$min.'"';
|
print '<option value="'.$min.'"';
|
||||||
if ($minSelected == $min) print ' selected="true"';
|
if ($minSelected == $min) print ' selected="true"';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user