diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 2d34f0bdb92..3d062b2a758 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -65,7 +65,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') { create_exdir($conf->societe->dir_logos); } - if (dol_move_uploaded_file($_FILES["logo"]["tmp_name"],$conf->societe->dir_logos.'/'.$original_file,1)) + if (dol_move_uploaded_file($_FILES["logo"]["tmp_name"],$conf->societe->dir_logos.'/'.$original_file,1) > 0) { dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file); @@ -660,7 +660,7 @@ else $s.='   '; if ($conf->use_javascript_ajax) { - $s.=''.$langs->trans("VATIntraCheck").''; + $s.=''.$langs->trans("VATIntraCheck").''; print $form->textwithhelp($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); } else diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 1ea40e93dae..9e7db4266c0 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -20,11 +20,11 @@ */ /** - \file htdocs/comm/action/fiche.php - \ingroup agenda - \brief Page for action card - \version $Id$ -*/ + * \file htdocs/comm/action/fiche.php + * \ingroup agenda + * \brief Page for action card + * \version $Id$ + */ require_once("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); @@ -110,6 +110,13 @@ if ($_POST["action"] == 'add_action') $_POST["a2day"], $_POST["a2year"]); + if (! $datep2 && $_POST["percentage"] == 100) + { + $error=1; + $_GET["action"] = 'create'; + $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->trans("DateEnd")).'
'; + } + // Initialisation objet cactioncomm if (! $_POST["actioncode"]) { @@ -395,6 +402,10 @@ if ($_POST["action"] == 'update') +/* + * View + */ + llxHeader(); $html = new Form($db); @@ -413,7 +424,7 @@ if ($_GET["action"] == 'create') $result=$contact->fetch($_GET["contactid"]); } - print '
'; + print ''; print ''; if (! empty($_REQUEST["backtopage"])) print ''; @@ -440,14 +451,10 @@ if ($_GET["action"] == 'create') print ''; // Title - print ''.$langs->trans("Title").''; + print ''.$langs->trans("Title").''; // Location - print ''.$langs->trans("Location").''; - - print ''; - print '
'; - print ''; + print ''; // Societe, contact print ''; } + print '
'.$langs->trans("Location").'
'.$langs->trans("ActionOnCompany").''; @@ -472,8 +479,18 @@ if ($_GET["action"] == 'create') print '
'; + print '
'; + print ''; + + // Created by + /*print ''; + */ + // Affecte a - print ''; @@ -520,20 +537,25 @@ if ($_GET["action"] == 'create') */ // Avancement - if ($_REQUEST["afaire"] == 1) + print ''; + print ''; + $percent=$_POST['percentage']; } - elseif ($_REQUEST["afaire"] == 2) + else { - print ''; - print ''; - } else - { - print ''; + if ($_REQUEST["afaire"] == 1) $percent=0; + if ($_REQUEST["afaire"] == 2) $percent=100; } + print $html->form_select_status_action('formaction',$percent,1); + print ''; + + // Priority + print ''; add_row_for_calendar_link(); @@ -548,7 +570,7 @@ if ($_GET["action"] == 'create') } else { - print ''; + print ''; } print ''; @@ -633,7 +655,7 @@ if ($_GET["id"]) if ($_REQUEST["action"] == 'edit') { // Fiche action en mode edition - print ''; + print ''; print ''; print ''; if (! empty($_REQUEST["backtopage"])) print ''; @@ -696,15 +718,18 @@ if ($_GET["id"]) if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < (time() - $conf->global->MAIN_DELAY_ACTIONS_TODO)) print img_warning($langs->trans("Late")); print ''; - // Priorite + // Status + print ''; + + // Priority print ''; - // Status - print ''; - - // Object linked + // Object linked if ($act->objet_url) { print ''; @@ -722,7 +747,7 @@ if ($_GET["id"]) } else { - print ''; + print ''; } print ''; @@ -797,17 +822,17 @@ if ($_GET["id"]) if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < (time() - $conf->global->MAIN_DELAY_ACTIONS_TODO)) print img_warning($langs->trans("Late")); print ''; - // Priorite - print ''; - // Statut print ''; - // Objet lie + // Priority + print ''; + + // Objet lie if ($act->objet_url) { print ''; diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 50acef6bebe..6ae829bbcf4 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -26,18 +26,17 @@ */ /** - \file htdocs/html.form.class.php - \brief Fichier de la classe des fonctions prédéfinie de composants html - \version $Id$ + * \file htdocs/html.form.class.php + * \brief Fichier de la classe des fonctions prédéfinie de composants html + * \version $Id$ */ /** - \class Form - \brief Classe permettant la génération de composants html - \remarks Only common components must be here. + * \class Form + * \brief Classe permettant la génération de composants html + * \remarks Only common components must be here. */ - class Form { var $db; @@ -1585,6 +1584,44 @@ class Form + /** + * \brief Show list of action status + */ + function form_select_status_action($formname,$selected,$canedit=1) + { + global $langs,$conf; + + $listofstatus=array('0'=>$langs->trans("ActionRunningNotStarted"),'50'=>$langs->trans("ActionRunningShort"),'100'=>$langs->trans("ActionDoneShort")); + + if ($conf->use_javascript_ajax) + { + print "\n"; + print ''."\n"; + print ''; + if ($selected == 0 || $selected == 100) $canedit=0; + print ' %'; + print ' '; + } + else + { + print ' %'; + } + } + + /** * \brief Retourne la liste des types de paiements possibles * \param selected Id du type de paiement pré-sélectionné @@ -2699,7 +2736,7 @@ class Form { // Zone de saisie manuelle de la date print ''; // Icone calendrier @@ -2716,11 +2753,11 @@ class Form // Calendrier popup version defaut if ($langs->defaultlang != "") { - print ''; } - print ''; + print ''; print ' '; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index ffdc8d228d2..7c6eb886d9d 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -147,7 +147,7 @@ ActiveOn=Activated on SourceFile=Source file AutomaticIfJavascriptDisabled=Automatic if Javascript is disabled AvailableOnlyIfJavascriptNotDisabled=Available only if JavaScript is not disabled -AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript and Ajax are not disabled +AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required Security=Security Passwords=Passwords diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index d3c8e3111d7..de420a98b91 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -256,7 +256,11 @@ Comments=Comments ActionsToDo=Actions to do ActionsDone=Actions done ActionsToDoShort=To do +ActionsRunningshort=Started ActionsDoneShort=Done +ActionRunningNotStarted=Not started +ActionRunningShort=Started +ActionDoneShort=Finished CompanyFundation=Company/Fundation ContactsForCompany=Contacts for this third party ActionsOnCompany=Actions about this third party diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 41cac097b7b..7cbc60fc0f3 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -147,7 +147,7 @@ ActiveOn=Active sur SourceFile=Fichier source AutomaticIfJavascriptDisabled=Automatique si Javascript désactivé AvailableOnlyIfJavascriptNotDisabled=Disponible uniquement si Javascript non désactivé -AvailableOnlyIfJavascriptAndAjaxNotDisabled=Disponible uniquement si Javascript et Ajax non désactivé +AvailableOnlyIfJavascriptAndAjaxNotDisabled=Disponible uniquement si Javascript non désactivé Required=Requis Security=Sécurité Passwords=Mots de passe diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index b471039f838..7b266a3e00b 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -258,6 +258,9 @@ ActionsToDo=Actions ActionsDone=Actions effectuées ActionsToDoShort=À faire ActionsDoneShort=Effectuées +ActionRunningNotStarted=Non commencé +ActionRunningShort=En cours +ActionDoneShort=Terminé CompanyFundation=Société ou institution ContactsForCompany=Contacts de ce tiers ActionsOnCompany=Actions vis à vis de ce tiers diff --git a/htdocs/lib/datepicker.php b/htdocs/lib/datepicker.php index 2c9a454e23b..cf7b0c75623 100644 --- a/htdocs/lib/datepicker.php +++ b/htdocs/lib/datepicker.php @@ -45,7 +45,7 @@ print ''; if (isset($_GET["mode"]) && $_GET["mode"] == 'test') { - print ''."\n"; + print ''."\n"; } else { @@ -65,7 +65,7 @@ $tradTemp=array($langs->trans("January"), $langs->trans("November"), $langs->trans("December") ); -print ''."\n"; print ''."\n"; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 2958f1ff305..1bbb8efe897 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -644,7 +644,7 @@ function dol_loginfunction($langs,$conf,$mysoc) print '}'."\n"; print '-->'."\n"; print ''."\n"; - print ''."\n"; + print ''."\n"; } if (! $disablejs && $conf->use_javascript_ajax) { require_once DOL_DOCUMENT_ROOT.'/lib/ajax.lib.php'; // This one is required for all Ajax features - print ''."\n"; + print ''."\n"; // This one is required fox boxes - print ''."\n"; + print ''."\n"; // Those ones are required only with option "confirm by ajax popup" if ($conf->global->MAIN_CONFIRM_AJAX) @@ -862,17 +862,17 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs // PWC css print ''."\n"; // Scriptaculous used by PWC - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; // PWC js - print ''."\n"; + print ''."\n"; } } if (is_array($arrayofjs)) { foreach($arrayofjs as $jsfile) { - print ''."\n"; + print ''."\n"; } } @@ -1147,7 +1147,7 @@ function llxFooter($foot='',$limitIEbug=1) if (! empty($_SERVER['DOL_TUNING'])) { $micro_end_time=dol_microtime_float(true); - print ''; + print ''; } // Juste pour eviter bug IE qui reorganise mal div precedents si celui-ci absent diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 3d94deee8a7..434162757ca 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -181,7 +181,7 @@ print ' font-size: 12px;'; print '}'."\n"; print '-->'."\n"; print ''."\n"; -print '
'.$langs->trans("ActionUserAsk").''; + print $user->getNomUrl(); + print '
'.$langs->trans("ActionAffectedTo").''; + print '
'.$langs->trans("ActionAffectedTo").''; $html->select_users($_REQUEST["affectedto"]?$_REQUEST["affectedto"]:$actioncomm->usertodo,'affectedto',1); print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; + $percent=0; + if (isset($_POST['percentage'])) { - print ''; - print ''; - print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''.$langs->trans("StatusActionToDo").' / 0%
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''.$langs->trans("StatusActionDone").' / 100%
'.$langs->trans("Status").' / '.$langs->trans("Percentage").'%
'.$langs->trans("Priority").''; + print ''; + print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; + $percent=isset($_REQUEST["percentage"])?$_REQUEST["percentage"]:$act->percentage; + print $html->form_select_status_action('formaction',$percent,1); + print '
'.$langs->trans("Priority").''; print ''; print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").'percentage).'" size="4">%
'.$langs->trans("LinkedObject").'
'.$langs->trans("Priority").''; - print $act->priority; - print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; print $act->getLibStatut(4); print '
'.$langs->trans("Priority").''; + print $act->priority; + print '
'.$langs->trans("LinkedObject").'