'.dol_escape_htmltag($langs->trans("Replace")).'" name="replacesite">';
- print 'ref.'" class="button nobordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebSiteContent")).'">';
+ print 'ref.'" class="button nobordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebsiteContent")).'">';
}
print '';
@@ -1872,7 +1887,7 @@ if (! GETPOST('hide_websitemenu'))
print '';
- if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')
+ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')
{
$urlext=$virtualurl;
$urlint=$urlwithroot.'/public/website/index.php?website='.$websitekey;
@@ -2038,11 +2053,26 @@ if (! GETPOST('hide_websitemenu'))
$websitepage->fetch($pageid);
}
- if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')
+ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')
{
$disabled='';
if (empty($user->rights->website->write)) $disabled=' disabled="disabled"';
+ // Confirmation delete site
+ if ($action == 'deletesite') {
+ // Create an array for form
+ $formquestion = array(
+ array('type' => 'checkbox', 'name' => 'delete_also_js', 'label' => $langs->trans("DeleteAlsoJs"), 'value' => 0),
+ array('type' => 'checkbox', 'name' => 'delete_also_medias', 'label' => $langs->trans("DeleteAlsoMedias"), 'value' => 0),
+ //array('type' => 'other','name' => 'newlang','label' => $langs->trans("Language"), 'value' => $formadmin->select_language(GETPOST('newlang', 'az09')?GETPOST('newlang', 'az09'):$langs->defaultlang, 'newlang', 0, null, '', 0, 0, 'minwidth200')),
+ //array('type' => 'other','name' => 'newwebsite','label' => $langs->trans("WebSite"), 'value' => $formwebsite->selectWebsite($object->id, 'newwebsite', 0))
+ );
+
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id='.$object->id, $langs->trans('DeleteWebsite'), '', 'confirm_deletesite', $formquestion, 0, 1, 200);
+
+ print $formconfirm;
+ }
+
// Confirmation to clone
if ($action == 'createfromclone') {
// Create an array for form
@@ -2058,7 +2088,7 @@ if (! GETPOST('hide_websitemenu'))
print $formconfirm;
}
- if ($pageid > 0 && $atleastonepage) // pageid can be set without pages, if homepage of site is set and all page were removed
+ if ($pageid > 0 && $atleastonepage) // pageid can be set without pages, if homepage of site is set and all pages were removed
{
// Confirmation to clone
if ($action == 'createpagefromclone') {
@@ -2125,8 +2155,19 @@ if (! GETPOST('hide_websitemenu'))
print '
';
print '';
- if ($object->fk_default_home > 0 && $pageid == $object->fk_default_home) print '';
- else print '';
+ // @TODO Move this action into a combo list
+ if ($object->fk_default_home > 0 && $pageid == $object->fk_default_home)
+ {
+ //$disabled=' disabled="disabled"';
+ //print '';
+ print '';
+ }
+ else
+ {
+ //$disabled='';
+ //print 'ref.'" class="button nobordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'">';
+ print '';
+ }
print '';
print '';
}
@@ -2136,7 +2177,7 @@ if (! GETPOST('hide_websitemenu'))
print '