Fix dol_banner

This commit is contained in:
Laurent Destailleur 2017-06-12 10:25:28 +02:00
parent b80ee49032
commit 277dde5d61
4 changed files with 110 additions and 105 deletions

View File

@ -353,7 +353,7 @@ if (($action=="create") || ($action=="edit"))
print '<tr class="blockmethod"><td>';
print $langs->trans('CronClassFile')."</td><td>";
print "<input type=\"text\" size=\"20\" name=\"classesname\" value=\"".$object->classesname."\" /> ";
print '<input type="text" class="minwidth300" name="classesname" value="'.$object->classesname.'" /> ';
print "</td>";
print "<td>";
print $form->textwithpicto('',$langs->trans("CronClassFileHelp"),1,'help');
@ -371,7 +371,7 @@ if (($action=="create") || ($action=="edit"))
print '<tr class="blockmethod"><td>';
print $langs->trans('CronMethod')."</td><td>";
print "<input type=\"text\" size=\"20\" name=\"methodename\" value=\"".$object->methodename."\" /> ";
print '<input type="text" class="minwidth300" name="methodename" value="'.$object->methodename.'" /> ';
print "</td>";
print "<td>";
print $form->textwithpicto('',$langs->trans("CronMethodHelp"),1,'help');
@ -559,7 +559,10 @@ else
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2">' . $langs->trans("BackToList") . '</a>';
// TODO Use dol_banner
$morehtmlref='<div class="refidno">';
$morehtmlref.='</div>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);
// box add_jobs_box
print '<div class="fichecenter">';
@ -567,11 +570,6 @@ else
print '<table class="border" width="100%">';
print '<tr><td class="titlefield">';
print $langs->trans('CronId')."</td>";
print "<td>".$form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'id', '', '', 0);
print "</td></tr>\n";
print '<tr><td>';
print $langs->trans('CronLabel')."</td>";
print "<td>".$langs->trans($object->label);
print "</td></tr>";
@ -616,11 +614,6 @@ else
print $langs->trans($object->note);
print "</td></tr>";
print '<tr><td>';
print $langs->trans('Active')."</td><td>";
print $object->getLibStatut(4);
print "</td></tr>";
print '</table>';
print '</div>';

View File

@ -30,36 +30,37 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
*/
class Cronjob extends CommonObject
{
var $element='cronjob'; //!< Id that identify managed objects
var $table_element='cronjob'; //!< Name of table without prefix where object is stored
public $element='cronjob'; //!< Id that identify managed objects
public $table_element='cronjob'; //!< Name of table without prefix where object is stored
public $picto = 'cron';
var $jobtype;
var $tms='';
var $datec='';
var $label;
var $command;
var $classesname;
var $objectname;
var $methodename;
var $params;
var $md5params;
var $module_name;
var $priority;
var $datelastrun='';
var $datenextrun='';
var $dateend='';
var $datestart='';
var $datelastresult='';
var $lastresult;
var $lastoutput;
var $unitfrequency;
var $frequency;
var $status;
var $processing;
var $fk_user_author;
var $fk_user_mod;
var $nbrun;
var $libname;
public $jobtype;
public $tms='';
public $datec='';
public $label;
public $command;
public $classesname;
public $objectname;
public $methodename;
public $params;
public $md5params;
public $module_name;
public $priority;
public $datelastrun='';
public $datenextrun='';
public $dateend='';
public $datestart='';
public $datelastresult='';
public $lastresult;
public $lastoutput;
public $unitfrequency;
public $frequency;
public $status;
public $processing;
public $fk_user_author;
public $fk_user_mod;
public $nbrun;
public $libname;
/**
@ -1265,35 +1266,35 @@ class Cronjob extends CommonObject
class Cronjobline
{
var $id;
var $ref;
public $id;
public $ref;
var $tms='';
var $datec='';
var $label;
var $jobtype;
var $command;
var $classesname;
var $objectname;
var $methodename;
var $params;
var $md5params;
var $module_name;
var $priority;
var $datelastrun='';
var $datenextrun='';
var $dateend='';
var $datestart='';
var $lastresult='';
var $lastoutput;
var $unitfrequency;
var $frequency;
var $status;
var $fk_user_author;
var $fk_user_mod;
var $note;
var $nbrun;
var $libname;
public $tms='';
public $datec='';
public $label;
public $jobtype;
public $command;
public $classesname;
public $objectname;
public $methodename;
public $params;
public $md5params;
public $module_name;
public $priority;
public $datelastrun='';
public $datenextrun='';
public $dateend='';
public $datestart='';
public $lastresult='';
public $lastoutput;
public $unitfrequency;
public $frequency;
public $status;
public $fk_user_author;
public $fk_user_mod;
public $note;
public $nbrun;
public $libname;
/**
* Constructor

View File

@ -50,6 +50,17 @@ $head = cron_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans("CronTask"), -1, 'cron');
$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2">' . $langs->trans("BackToList") . '</a>';
$morehtmlref='<div class="refidno">';
$morehtmlref.='</div>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);
print '<div class="underbanner clearboth"></div>';
print '<br>';
print '<table width="100%"><tr><td>';
dol_print_object_info($object);
print '</td></tr></table>';

View File

@ -57,9 +57,9 @@ CronStatusActiveBtn=Enable
CronStatusInactiveBtn=Disable
CronTaskInactive=This job is disabled
CronId=Id
CronClassFile=Classes (filename.class.php)
CronClassFile=Filename with class
CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For exemple to call the fetch method of Dolibarr Product object /htdocs/<u>product</u>/class/product.class.php, the value for module is <i>product</i>
CronClassFileHelp=The file name to load. <BR> For exemple to call the fetch method of Dolibarr Product object /htdocs/product/class/<u>product.class.php</u>, the value for class file name is <i>product.class.php</i>
CronClassFileHelp=The relative path and file name to load (path is relative to web server root directory). <BR> For exemple to call the fetch method of Dolibarr Product object htdocs/product/class/<u>product.class.php</u>, the value for class file name is <i>product/class/product.class.php</i>
CronObjectHelp=The object name to load. <BR> For exemple to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for class file name is <i>Product</i>
CronMethodHelp=The object method to launch. <BR> For exemple to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for method is <i>fecth</i>
CronArgsHelp=The method arguments. <BR> For exemple to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for paramters can be <i>0, ProductRef</i>