|
@@ -109,15 +109,15 @@ llxHeader('',$langs->trans("PrintingSetup"));
|
|
|
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
|
|
print_fiche_titre($langs->trans("PrintingSetup"),$linkback,'setup');
|
|
|
|
|
|
-$head=printingadmin_prepare_head();
|
|
|
+$head=printingadmin_prepare_head($mode);
|
|
|
|
|
|
if ($mode == 'setup' && $user->admin)
|
|
|
{
|
|
|
- print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=setup&driver='.$driver.'">';
|
|
|
+ print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=setup&driver='.$driver.'" autocomplete="off">';
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
print '<input type="hidden" name="action" value="setconst">';
|
|
|
|
|
|
- dol_fiche_head($head, $mode, $langs->trans("ModuleDriverSetup"), 0, 'technic');
|
|
|
+ dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic');
|
|
|
|
|
|
print $langs->trans("PrintingDriverDesc".$driver)."<br><br>\n";
|
|
|
|
|
@@ -128,18 +128,22 @@ if ($mode == 'setup' && $user->admin)
|
|
|
print '<th>'.$langs->trans("Value").'</th>';
|
|
|
print "</tr>\n";
|
|
|
|
|
|
- if (! empty($driver)) {
|
|
|
+ if (! empty($driver))
|
|
|
+ {
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php';
|
|
|
$classname = 'printing_'.$driver;
|
|
|
$langs->load($driver);
|
|
|
$printer = new $classname($db);
|
|
|
//print '<pre>'.print_r($printer, true).'</pre>';
|
|
|
$i=0;
|
|
|
- foreach ($printer->conf as $key) {
|
|
|
+ foreach ($printer->conf as $key)
|
|
|
+ {
|
|
|
$var=!$var;
|
|
|
print '<tr '.$bc[$var].'>';
|
|
|
print '<td'.($key['required']?' class=required':'').'>'.$langs->trans($key['varname']).'</td><td>';
|
|
|
- print '<input size="32" type="'.(empty($key['type'])?'text':$key['type']).'" name="setupdriver['.$i.'][value]" value="'.$conf->global->{$key['varname']}.'">';
|
|
|
+ print '<input size="32" type="'.(empty($key['type'])?'text':$key['type']).'" name="setupdriver['.$i.'][value]" value="'.$conf->global->{$key['varname']}.'"';
|
|
|
+ print isset($key['moreattributes'])?$key['moreattributes']:'';
|
|
|
+ print '>';
|
|
|
print '<input type="hidden" name="setupdriver['.$i.'][varname]" value="'.$key['varname'].'">';
|
|
|
print ' '.($key['example']!=''?$langs->trans("Example").' : '.$key['example']:'');
|
|
|
print '</tr>';
|
|
@@ -150,7 +154,8 @@ if ($mode == 'setup' && $user->admin)
|
|
|
}
|
|
|
|
|
|
print '</table>';
|
|
|
- if (! empty($driver)) {
|
|
|
+ if (! empty($driver))
|
|
|
+ {
|
|
|
print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Modify")).'"></center>';
|
|
|
}
|
|
|
print '</form>';
|
|
@@ -162,7 +167,7 @@ if ($mode == 'config' && $user->admin)
|
|
|
dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic');
|
|
|
|
|
|
print $langs->trans("PrintingDesc")."<br><br>\n";
|
|
|
-
|
|
|
+
|
|
|
print '<table class="noborder" width="100%">'."\n";
|
|
|
|
|
|
$var=true;
|
|
@@ -170,7 +175,7 @@ if ($mode == 'config' && $user->admin)
|
|
|
print '<th>'.$langs->trans("Description").'</th>';
|
|
|
print '<th class="center">'.$langs->trans("Active").'</th>';
|
|
|
print '<th class="center">'.$langs->trans("Setup").'</th>';
|
|
|
- print '<th class="center">'.$langs->trans("Test").'</th>';
|
|
|
+ print '<th class="center">'.$langs->trans("TargetedPrinter").'</th>';
|
|
|
print "</tr>\n";
|
|
|
|
|
|
$object = new PrintingDriver($db);
|
|
@@ -212,12 +217,13 @@ if ($mode == 'config' && $user->admin)
|
|
|
|
|
|
if ($mode == 'test' && $user->admin)
|
|
|
{
|
|
|
- dol_fiche_head($head, $mode, $langs->trans("PrintingTest"), 0, 'technic');
|
|
|
+ dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic');
|
|
|
|
|
|
print $langs->trans('PrintTestDesc'.$driver)."<br><br>\n";
|
|
|
-
|
|
|
+
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
- if (! empty($driver)) {
|
|
|
+ if (! empty($driver))
|
|
|
+ {
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php';
|
|
|
$classname = 'printing_'.$driver;
|
|
|
$langs->load($driver);
|
|
@@ -235,7 +241,7 @@ if ($mode == 'test' && $user->admin)
|
|
|
|
|
|
if ($mode == 'userconf' && $user->admin)
|
|
|
{
|
|
|
- dol_fiche_head($head, $mode, $langs->trans("UserConf"), 0, 'technic');
|
|
|
+ dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic');
|
|
|
|
|
|
print $langs->trans('PrintUserConfDesc'.$driver)."<br><br>\n";
|
|
|
|