Enhance website CMS toolbar

This commit is contained in:
Laurent Destailleur 2022-10-09 17:49:44 +02:00
parent 496973996d
commit fa651f7566
7 changed files with 94 additions and 55 deletions

View File

@ -231,6 +231,8 @@ class FormWebsite
*/ */
public function selectContainer($website, $htmlname = 'pageid', $pageid = 0, $showempty = 0, $action = '', $morecss = 'minwidth200', $excludeids = null) public function selectContainer($website, $htmlname = 'pageid', $pageid = 0, $showempty = 0, $action = '', $morecss = 'minwidth200', $excludeids = null)
{ {
global $conf, $langs;
$this->num = 0; $this->num = 0;
$atleastonepage = (is_array($website->lines) && count($website->lines) > 0); $atleastonepage = (is_array($website->lines) && count($website->lines) > 0);
@ -239,13 +241,18 @@ class FormWebsite
if ($atleastonepage && $action != 'editsource') { if ($atleastonepage && $action != 'editsource') {
$out .= '<select name="'.$htmlname.'" id="'.$htmlname.'" class="maxwidth300'.($morecss ? ' '.$morecss : '').'">'; $out .= '<select name="'.$htmlname.'" id="'.$htmlname.'" class="maxwidth300'.($morecss ? ' '.$morecss : '').'">';
} else { } else {
$out .= '<select name="pageidbis" id="pageid" class="maxwidth300'.($morecss ? ' '.$morecss : '').'" disabled="disabled">'; $out .= '<select name="pageidbis" id="pageid" class="maxwidth300'.($morecss ? ' '.$morecss : '').'"'.($action == 'editsource' ? ' disabled="disabled"' : '').'>';
} }
if ($showempty || !$atleastonepage) { if ($showempty || !$atleastonepage) {
$out .= '<option value="-1">&nbsp;</option>'; $out .= '<option class="optiongrey" value="-1">'.(is_numeric($showempty) ? '&nbsp;' : $showempty).'</option>';
} }
/*if (!empty($conf->use_javascript_ajax)) {
$valueoption = '<span class="classlink">'.img_picto('', 'add', 'class="paddingrightonly"').$langs->trans("AddPage").'</span>';
$out .= '<option value="-2" data-html="'.dol_escape_htmltag($valueoption).'">'.$valueoption.'</option>';
}*/
if ($atleastonepage) { if ($atleastonepage) {
if (empty($pageid) && $action != 'createcontainer') { // Page id is not defined, we try to take one if (empty($pageid) && $action != 'createcontainer') { // Page id is not defined, we try to take one
$firstpageid = 0; $firstpageid = 0;

View File

@ -150,4 +150,5 @@ ErrorFaviconSize=Favicon must be sized 16x16, 32x32 or 64x64
FaviconTooltip=Upload an image which needs to be a png (16x16, 32x32 or 64x64) FaviconTooltip=Upload an image which needs to be a png (16x16, 32x32 or 64x64)
NextContainer=Next page/container NextContainer=Next page/container
PreviousContainer=Previous page/container PreviousContainer=Previous page/container
WebsiteMustBeDisabled=The website must have the status "Disabled" WebsiteMustBeDisabled=The website must have the status "%s"
WebpageMustBeDisabled=The web page must have the status "%s"

View File

@ -285,7 +285,7 @@ section.setupsection {
div.tabBar textarea:focus { div.tabBar textarea:focus {
border: 1px solid #aaa !important; border: 1px solid #aaa !important;
} }
input:focus:not(.button):not(.select2-search__field):not(#top-bookmark-search-input):not(.search_component_input):not(.input-search-takepos), input:focus:not(.button):not(.buttonwebsite):not(.select2-search__field):not(#top-bookmark-search-input):not(.search_component_input):not(.input-search-takepos),
select:focus, .select2-container--open [aria-expanded="false"].select2-selection--single { select:focus, .select2-container--open [aria-expanded="false"].select2-selection--single {
/* div.tabBar input:focus, div.tabBar select:focus { */ /* div.tabBar input:focus, div.tabBar select:focus { */
border-bottom: 1px solid #666 !important; border-bottom: 1px solid #666 !important;
@ -620,11 +620,12 @@ table.tableforfield .buttonDelete:not(.bordertransp):not(.buttonpayment) {
-webkit-box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 0px 0px rgba(60,60,60,0.1); -webkit-box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 0px 0px rgba(60,60,60,0.1);
box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 0px 0px rgba(60,60,60,0.1); box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 0px 0px rgba(60,60,60,0.1);
} }
.button:disabled, .buttonDelete:disabled, .button.disabled { .button:disabled, .buttonDelete:disabled, .button.disabled, .buttonDelete.disabled {
opacity: 0.4; opacity: 0.4;
box-shadow: none; box-shadow: none;
-webkit-box-shadow: none; -webkit-box-shadow: none;
cursor: auto; cursor: auto;
text-decoration: none;
} }
.buttonRefused { .buttonRefused {
pointer-events: none; pointer-events: none;
@ -5141,7 +5142,7 @@ tr.visible {
.websiteformtoolbar { .websiteformtoolbar {
position: sticky; position: sticky;
top: <?php echo empty($dol_hide_topmenu) ? ($disableimages ? '32px' : '52px') : '0'; ?>; top: <?php echo empty($dol_hide_topmenu) ? ($disableimages ? '32px' : '52px') : '0'; ?>;
z-index: 1000; z-index: 1002; /* Dolibarr menu is 1001, Website menu is 1002 */
} }
.exampleapachesetup { .exampleapachesetup {

View File

@ -4996,7 +4996,7 @@ tr.visible {
.websiteformtoolbar { .websiteformtoolbar {
position: sticky; position: sticky;
top: <?php echo empty($dol_hide_topmenu) ? ($disableimages ? '36px' : '50px') : '0'; ?>; top: <?php echo empty($dol_hide_topmenu) ? ($disableimages ? '36px' : '50px') : '0'; ?>;
z-index: 1000; z-index: 1002; /* Dolibarr menu is 1001, Website menu is 1002 */
} }
.exampleapachesetup { .exampleapachesetup {

View File

@ -875,10 +875,10 @@ class Website extends CommonObject
if (empty($this->labelStatus) || empty($this->labelStatusShort)) { if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
global $langs; global $langs;
//$langs->load("mymodule"); //$langs->load("mymodule");
$this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Disabled'); $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Offline');
$this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Online');
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Disabled'); $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Offline');
$this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Online');
} }
$statusType = 'status5'; $statusType = 'status5';

View File

@ -838,10 +838,10 @@ class WebsitePage extends CommonObject
if (empty($this->labelStatus) || empty($this->labelStatusShort)) { if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
global $langs; global $langs;
//$langs->load("mymodule"); //$langs->load("mymodule");
$this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Disabled'); $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Offline');
$this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Online');
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Disabled'); $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Offline');
$this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Online');
} }
$statusType = 'status5'; $statusType = 'status5';

View File

@ -2760,28 +2760,32 @@ if (!GETPOST('hide_websitemenu')) {
print '<!-- Bar for website -->'; print '<!-- Bar for website -->';
if ($action != 'file_manager') { if ($action != 'file_manager') {
print '<span class="websiteselection hideonsmartphoneimp minwidth100 tdoverflowmax100">'; print '<div class="websiteselection hideonsmartphoneimp minwidth75 tdoverflowmax100 inline-block">';
print $langs->trans("Website").': '; print $langs->trans("Website").': ';
print '</span>'; print '</div>';
$urltocreatenewwebsite = $_SERVER["PHP_SELF"].'?action=createsite'; $urltocreatenewwebsite = $_SERVER["PHP_SELF"].'?action=createsite';
if (empty($conf->use_javascript_ajax)) { //if (empty($conf->use_javascript_ajax)) {
print '<span class="websiteselection hideonsmartphoneimp">'; print '<span class="websiteselection paddingrightonly">';
print '<a href="'.$urltocreatenewwebsite.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddWebsite")).'"><span class="fa fa-plus-circle valignmiddle btnTitle-icon"><span></a>'; print '<a href="'.$urltocreatenewwebsite.'" class=""'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddWebsite")).'"><span class="fa fa-plus-circle valignmiddle btnTitle-icon"><span></a>';
print '</span>'; print '</span>';
} //}
// List of website // List of website
print '<span class="websiteselection">'; print '<span class="websiteselection">';
$out = ''; $out = '';
$out .= '<select name="website" class="minwidth100 width200 maxwidth150onsmartphone" id="website">'; $out .= '<select name="website" class="minwidth100 width200 maxwidth150onsmartphone" id="website">';
if (empty($object->records)) { if (empty($object->records)) {
$out .= '<option value="-1">&nbsp;</option>'; $out .= '<option value="-1">&nbsp;</option>';
} }
/*
if (!empty($conf->use_javascript_ajax)) { if (!empty($conf->use_javascript_ajax)) {
$valueoption = '<span class="classlink">'.img_picto('', 'add', 'class="paddingrightonly"').$langs->trans("AddWebsite").'</span>'; $valueoption = '<span class="classlink">'.img_picto('', 'add', 'class="paddingrightonly"').$langs->trans("AddWebsite").'</span>';
$out .= '<option value="-2" data-html="'.dol_escape_htmltag($valueoption).'">'.$valueoption.'</option>'; $out .= '<option value="-2" data-html="'.dol_escape_htmltag($valueoption).'">'.$valueoption.'</option>';
} }*/
// Loop on each sites // Loop on each sites
$i = 0; $i = 0;
foreach ($object->records as $key => $valwebsite) { foreach ($object->records as $key => $valwebsite) {
@ -2826,6 +2830,10 @@ if (!GETPOST('hide_websitemenu')) {
print '<input type="image" class="valignmiddle" src="'.img_picto('', 'refresh', '', 0, 1).'" name="refreshsite" value="'.$langs->trans("Load").'">'; print '<input type="image" class="valignmiddle" src="'.img_picto('', 'refresh', '', 0, 1).'" name="refreshsite" value="'.$langs->trans("Load").'">';
} }
print '</span>';
print '<span class="websiteselection">';
if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) { if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) {
print ' &nbsp; '; print ' &nbsp; ';
@ -2852,10 +2860,15 @@ if (!GETPOST('hide_websitemenu')) {
// Delete website // Delete website
if ($website->status == $website::STATUS_VALIDATED) { if ($website->status == $website::STATUS_VALIDATED) {
print '<input type="submit" class="buttonDelete bordertransp" name="deletesite" value="'.$langs->trans("Delete").'" disabled="disabled" title="'.dol_escape_htmltag($langs->trans("WebsiteMustBeDisabled")).'">'; $disabled = ' disabled="disabled"';
$title = $langs->trans("WebsiteMustBeDisabled", $langs->transnoentitiesnoconv($website->LibStatut(0, 0)));
$url = '#';
} else { } else {
print '<input type="submit" class="buttonDelete bordertransp" name="deletesite" value="'.$langs->trans("Delete").'">'; $disabled = '';
$title = $langs->trans("Delete");
$url = $_SERVER["PHP_SELF"].'?action=deletesite&token='.newToken().'&website='.urlencode($website->ref);
} }
print '<a href="'.$url.'" class="buttonDelete bordertransp'.($disabled ? ' disabled' : '').'"'.$disabled.' title="'.dol_escape_htmltag($title).'">'.img_picto('', 'delete', 'class=""').'<span class="hideonsmartphone paddingleft">'.$langs->trans("Delete").'</span></a>';
// Regenerate all pages // Regenerate all pages
print '<a href="'.$_SERVER["PHP_SELF"].'?action=regeneratesite&token='.newToken().'&website='.urlencode($website->ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("RegenerateWebsiteContent")).'"><span class="far fa-hdd"></span></a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=regeneratesite&token='.newToken().'&website='.urlencode($website->ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("RegenerateWebsiteContent")).'"><span class="far fa-hdd"></span></a>';
@ -2863,6 +2876,7 @@ if (!GETPOST('hide_websitemenu')) {
// Generate site map // Generate site map
print '<a href="'.$_SERVER["PHP_SELF"].'?action=confirmgeneratesitemaps&token='.newToken().'&website='.urlencode($website->ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("GenerateSitemaps")).'"><span class="fa fa-sitemap"></span></a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=confirmgeneratesitemaps&token='.newToken().'&website='.urlencode($website->ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("GenerateSitemaps")).'"><span class="fa fa-sitemap"></span></a>';
// Find / replace tool
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=replacesite&website='.urlencode($website->ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebsiteContent")).'"><span class="fa fa-search"></span></a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?mode=replacesite&website='.urlencode($website->ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebsiteContent")).'"><span class="fa fa-search"></span></a>';
} }
@ -2970,22 +2984,22 @@ if (!GETPOST('hide_websitemenu')) {
print '<!-- Bar for websitepage -->'; print '<!-- Bar for websitepage -->';
print '<div class="centpercent websitebar"'.($style ? ' style="'.$style.'"' : '').'">'; print '<div class="centpercent websitebar"'.($style ? ' style="'.$style.'"' : '').'">';
print '<span class="websiteselection hideonsmartphoneimp minwidth100 tdoverflowmax100">'; print '<div class="websiteselection hideonsmartphoneimp minwidth75 tdoverflowmax100 inline-block">';
print $langs->trans("PageContainer").': '; print $langs->trans("PageContainer").': ';
print '</span>'; print '</div>';
print '<span class="websiteselection">'; print '<span class="websiteselection paddingrightonly">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=createcontainer&token='.newToken().'&website='.urlencode($website->ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddPage")).'"><span class="fa fa-plus-circle valignmiddle btnTitle-icon"></span></a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=createcontainer&token='.newToken().'&website='.urlencode($website->ref).'" class=""'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddPage")).'"><span class="fa fa-plus-circle valignmiddle btnTitle-icon"></span></a>';
print '</span>'; print '</span>';
//print '<span class="websiteselection">'; //print '<span class="websiteselection">';
if ($action != 'addcontainer') { //if ($action != 'addcontainer') {
$out = ''; $out = '';
$s = $formwebsite->selectContainer($website, 'pageid', $pageid, 0, $action, 'maxwidth200onsmartphone'); $s = $formwebsite->selectContainer($website, 'pageid', $pageid, 0, $action, 'minwidth100 maxwidth200onsmartphone');
if ($formwebsite->num > 0) { if ($formwebsite->num >= 0) {
$out .= '<span class="websiteselection">'; $out .= '<span class="websiteselection">';
$out .= $s; $out .= $s;
$out .= '</span>'; $out .= '</span>';
@ -2997,7 +3011,7 @@ if (!GETPOST('hide_websitemenu')) {
$out .= 'jQuery(document).ready(function () {'; $out .= 'jQuery(document).ready(function () {';
$out .= ' jQuery("#pageid").change(function () {'; $out .= ' jQuery("#pageid").change(function () {';
$out .= ' console.log("We select "+jQuery("#pageid option:selected").val());'; $out .= ' console.log("We select "+jQuery("#pageid option:selected").val());';
$out .= ' if (jQuery("#pgeid option:selected").val() == \'-2\') {'; $out .= ' if (jQuery("#pageid option:selected").val() == \'-2\') {';
$out .= ' window.location.href = "'.$urltocreatenewpage.'";'; $out .= ' window.location.href = "'.$urltocreatenewpage.'";';
$out .= ' } else {'; $out .= ' } else {';
$out .= ' window.location.href = "'.$_SERVER["PHP_SELF"].'?website='.urlencode($website->ref).'&pageid="+jQuery("#pageid option:selected").val();'; $out .= ' window.location.href = "'.$_SERVER["PHP_SELF"].'?website='.urlencode($website->ref).'&pageid="+jQuery("#pageid option:selected").val();';
@ -3009,14 +3023,14 @@ if (!GETPOST('hide_websitemenu')) {
} }
print $out; print $out;
} else { /*} else {
print $langs->trans("New"); print $langs->trans("New");
} }*/
print '<span class="websiteselection">'; print '<span class="websiteselection">';
print '<input type="image" class="valignmiddle" src="'.img_picto('', 'refresh', '', 0, 1).'" name="refreshpage" value="'.$langs->trans("Load").'"'.(($atleastonepage && $action != 'editsource') ? '' : ' disabled="disabled"').'>'; print '<input type="image" class="valignmiddle buttonwebsite" src="'.img_picto('', 'refresh', '', 0, 1).'" name="refreshpage" value="'.$langs->trans("Load").'"'.(($action != 'editsource') ? '' : ' disabled="disabled"').'>';
// Print nav arrows // Print nav arrows
$pagepreviousid = 0; $pagepreviousid = 0;
@ -3240,7 +3254,19 @@ if (!GETPOST('hide_websitemenu')) {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setashome&token='.newToken().'&website='.urlencode($website->ref).'&pageid='.((int) $pageid).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'"><span class="fa fa-home valignmiddle btnTitle-icon"></span></a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=setashome&token='.newToken().'&website='.urlencode($website->ref).'&pageid='.((int) $pageid).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'"><span class="fa fa-home valignmiddle btnTitle-icon"></span></a>';
} }
print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("ClonePage")).'" name="createpagefromclone">'; print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("ClonePage")).'" name="createpagefromclone">';
print '<input type="submit" class="buttonDelete bordertransp" name="delete" value="'.$langs->trans("Delete").'"'.($atleastonepage ? '' : ' disabled="disabled"').'>';
// Delete
//print '<input type="submit" class="buttonDelete bordertransp" name="delete" value="'.$langs->trans("Delete").'"'.($atleastonepage ? '' : ' disabled="disabled"').'>';
if ($websitepage->status == $websitepage::STATUS_DRAFT || !$atleastonepage) {
$disabled = ' disabled="disabled"';
$title = $langs->trans("WebpageMustBeDisabled", $langs->transnoentitiesnoconv($websitepage->LibStatut(0, 0)));
$url = '#';
} else {
$disabled = '';
$title = '';
$url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&website='.urlencode($website->ref);
}
print '<a href="'.$url.'" class="buttonDelete bordertransp'.($disabled ? ' disabled' : '').'"'.$disabled.' title="'.dol_escape_htmltag($title).'">'.img_picto('', 'delete', 'class=""').'<span class="hideonsmartphone paddingleft">'.$langs->trans("Delete").'</span></a>';
} }
} }
@ -3881,7 +3907,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties
$pageusermodifid = $objectpage->fk_user_modif; $pageusermodifid = $objectpage->fk_user_modif;
$pageauthoralias = $objectpage->author_alias; $pageauthoralias = $objectpage->author_alias;
$pagestatus = $objectpage->status; $pagestatus = $objectpage->status;
} else { } else { // $action = 'createcontainer'
$type_container = 'page'; $type_container = 'page';
$pageurl = ''; $pageurl = '';
$pagealiasalt = ''; $pagealiasalt = '';
@ -4179,6 +4205,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';
if ($action == 'createcontainer') { if ($action == 'createcontainer') {
print '<div class="center tablecheckboxcreatemanually'.$hiddenmanuallyafterload.'">'; print '<div class="center tablecheckboxcreatemanually'.$hiddenmanuallyafterload.'">';
@ -4207,7 +4234,10 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties
$arraygrabimagesinto = array('root'=>$langs->trans("WebsiteRootOfImages"), 'subpage'=>$langs->trans("SubdirOfPage")); $arraygrabimagesinto = array('root'=>$langs->trans("WebsiteRootOfImages"), 'subpage'=>$langs->trans("SubdirOfPage"));
print $form->selectarray('grabimagesinto', $arraygrabimagesinto, GETPOSTISSET('grabimagesinto') ? GETPOST('grabimagesinto') : 'root', 0, 0, 0, '', 0, 0, 0, '', '', 1); print $form->selectarray('grabimagesinto', $arraygrabimagesinto, GETPOSTISSET('grabimagesinto') ? GETPOST('grabimagesinto') : 'root', 0, 0, 0, '', 0, 0, 0, '', '', 1);
print '<br>'; print '<br>';
print '<input class="button" style="margin-top: 5px" type="submit" name="fetchexternalurl" value="'.dol_escape_htmltag($langs->trans("FetchAndCreate")).'">';
print '<input class="button small" style="margin-top: 5px" type="submit" name="fetchexternalurl" value="'.dol_escape_htmltag($langs->trans("FetchAndCreate")).'">';
print '<input class="button button-cancel small" type="submit" name="preview" value="'.$langs->trans("Cancel").'">';
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';
} }