diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index b9d5048db74..74fed3416e2 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -275,7 +275,7 @@ class FormMail extends Form $out.= "\n\n"; if ($this->withform == 1) { - $out.= '
'."\n"; + $out.= ''."\n"; $out.= ''; $out.= ''; $out.= ''; @@ -703,6 +703,23 @@ class FormMail extends Form $out.= ''."\n"; if ($this->withform == 1) $out.= '
'."\n"; + + // Disable enter key if option MAIN_MAILFORM_DISABLE_ENTER is set + if (! empty($conf->global->MAIN_MAILFORM_DISABLE_ENTERKEY)) + { + $out.= ''; + } + $out.= "\n"; return $out; diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 8d87380b12c..500506b532e 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013 Laurent Destailleur + * Copyright (C) 2013-2015 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -227,7 +227,6 @@ llxHeader('',$langs->trans("CronAdd")); if ($action=='edit' || empty($action) || $action=='delete' || $action=='execute') { $head=cron_prepare_head($object); - print dol_get_fiche_head($head, 'card', $langs->trans("CronTask"), 0, 'cron'); } elseif ($action=='create') { @@ -292,6 +291,8 @@ if (($action=="create") || ($action=="edit")) print ''."\n"; } + dol_fiche_head(''); + print ''; print '
'; @@ -474,7 +475,9 @@ if (($action=="create") || ($action=="edit")) print '
'; - print '

'; + dol_fiche_end(); + + print '
'; print ''; print '     '; print ''; @@ -482,12 +485,15 @@ if (($action=="create") || ($action=="edit")) print "\n"; -}else { - +} +else +{ /* - * view Template + * view card */ + dol_fiche_head($head, 'card', $langs->trans("CronTask"), 0, 'cron'); + // box add_jobs_box print ''; @@ -572,6 +578,17 @@ if (($action=="create") || ($action=="edit")) print ""; print '"; + + print '
'; + print $langs->trans('Active').""; + print yn($object->status); + print "
'; + + print '
'; + + print ''; + + print '"; @@ -598,7 +615,6 @@ if (($action=="create") || ($action=="edit")) print '
'; print $langs->trans('CronDtLastLaunch').""; if(!empty($object->datelastrun)) {print dol_print_date($object->datelastrun,'dayhourtext');} else {print $langs->trans('CronNone');} print "
'; - dol_fiche_end(); @@ -633,7 +649,9 @@ if (($action=="create") || ($action=="edit")) else { print ''.$langs->trans("CronExecute").''; } - print '

'; + print '
'; + + print '
'; } diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 43a4a76e725..15f9234e7b2 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013 Laurent Destailleur + * Copyright (C) 2013-2015 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -165,6 +165,7 @@ print ''; print ''; print ''; $arg_url='&page='.$page.'&status='.$status.'&search_label='.$search_label; +print_liste_field_titre($langs->trans("ID"),$_SERVER["PHP_SELF"],"t.rowid","",$arg_url,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CronLabel"),$_SERVER["PHP_SELF"],"t.label","",$arg_url,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CronTask"),'','',"",$arg_url,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CronDtStart"),$_SERVER["PHP_SELF"],"t.datestart","",$arg_url,'',$sortfield,$sortorder); @@ -176,11 +177,11 @@ print_liste_field_titre($langs->trans("CronNbRun"),$_SERVER["PHP_SELF"],"t.nbrun print_liste_field_titre($langs->trans("CronLastResult"),$_SERVER["PHP_SELF"],"t.lastresult","",$arg_url,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CronLastOutput"),$_SERVER["PHP_SELF"],"t.lastoutput","",$arg_url,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Enabled"),$_SERVER["PHP_SELF"],"t.status","",$arg_url,'align="center"',$sortfield,$sortorder); -print ''; +print_liste_field_titre(''); print ''; print ''; - +print ''; print ''; @@ -201,7 +202,6 @@ print ''; print ''; - print ''; @@ -218,16 +218,26 @@ if (count($object->lines) > 0) print ''; print ''; + + print ''; print ''; + // Status print ''; print ''; @@ -301,7 +314,7 @@ if (count($object->lines) > 0) } else { - print ''; + print ''; } print '
 '; print ''; print '
'; - if(!empty($line->label)) { + print ''; + print img_picto('', 'object_cron').' '; + print $line->id; + print ''; + print ''; + if (! empty($line->label)) + { print ''.$line->label.''; } - else { + else + { print $langs->trans('CronNone'); } print ''; - if ($line->jobtype=='method') { + if ($line->jobtype=='method') + { print $langs->trans('CronModule').':'.$line->module_name.'
'; print $langs->trans('CronClass').':'. $line->classesname.'
'; print $langs->trans('CronObject').':'. $line->objectname.'
'; @@ -279,20 +289,23 @@ if (count($object->lines) > 0) if(!empty($line->lastoutput)) {print dol_trunc(nl2br($line->lastoutput),100);} else {print $langs->trans('CronNone');} print '
'; print yn($line->status); print ''; - if ($user->rights->cron->delete) { - print "id."&status=".$status."&action=delete\" title=\"".$langs->trans('CronDelete')."\">".img_delete()."  "; + if ($user->rights->cron->delete) + { + print "id."&status=".$status."&action=delete\" title=\"".dol_escape_htmltag($langs->trans('CronDelete'))."\">".img_picto($langs->trans('CronDelete'),'delete')."  "; } else { - print "trans('NotEnoughPermissions')."\">".img_delete()."   "; + print "trans('NotEnoughPermissions'))."\">".img_picto($langs->trans('NotEnoughPermissions'), 'delete')."   "; } - if ($user->rights->cron->execute) { - print "id."&status=".$status."&action=execute\" title=\"".$langs->trans('CronExecute')."\">".img_picto('',"play").""; + if ($user->rights->cron->execute) + { + print "id."&status=".$status."&action=execute\" title=\"".dol_escape_htmltag($langs->trans('CronExecute'))."\">".img_picto($langs->trans('CronExecute'),"play").""; } else { - print "trans('NotEnoughPermissions')."\">".img_picto('',"execute").""; + print "trans('NotEnoughPermissions'))."\">".img_picto($langs->trans('NotEnoughPermissions'),"execute").""; } print '
'.$langs->trans('CronNoJobs').'
'.$langs->trans('CronNoJobs').'
'; diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 5d7abf732ab..ff511f00d27 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -4,10 +4,10 @@ About = About CronAbout = About Cron CronAboutPage = Cron about page # Right -Permission23101 = Read Scheduled task -Permission23102 = Create/update Scheduled task -Permission23103 = Delete Scheduled task -Permission23104 = Execute Scheduled task +Permission23101 = Read Scheduled job +Permission23102 = Create/update Scheduled job +Permission23103 = Delete Scheduled job +Permission23104 = Execute Scheduled job # Admin CronSetup= Scheduled job management setup URLToLaunchCronJobs=URL to check and launch cron jobs if required @@ -55,9 +55,9 @@ CronEach=Every JobFinished=Job launched and finished #Page card CronAdd= Add jobs -CronHourStart= Start hour and date of task -CronEvery= And execute task each -CronObject= Instance/Object to create +CronHourStart= Start hour and date of job +CronEvery=Execute job each +CronObject=Instance/Object to create CronArgs=Parameters CronSaveSucess=Save succesfully CronNote=Comment