diff --git a/htdocs/admin/dons.php b/htdocs/donations/admin/dons.php similarity index 100% rename from htdocs/admin/dons.php rename to htdocs/donations/admin/dons.php diff --git a/htdocs/compta/dons/class/index.html b/htdocs/donations/admin/index.html similarity index 100% rename from htdocs/compta/dons/class/index.html rename to htdocs/donations/admin/index.html diff --git a/htdocs/donations/admin/index.php b/htdocs/donations/admin/index.php new file mode 100644 index 00000000000..78ff3b48f9a --- /dev/null +++ b/htdocs/donations/admin/index.php @@ -0,0 +1,117 @@ + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * \file htdocs/admin/index.php + * \ingroup Donations + * \brief Setup page to configure donations module + */ + +require '../main.inc.php'; + +// Class +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; + +$langs->load("admin"); +$langs->load("donations"); + +// Security check +if (!$user->admin) + accessforbidden(); + +$action = GETPOST('action', 'alpha'); + +// Other parameters DONATIONS_* +$list = array ( + 'DONATIONS_ACCOUNTING_ACCOUNT_PRODUCT' +); + +/* + * Actions + */ + +if ($action == 'update') +{ + $error = 0; + + foreach ($list as $constname) { + $constvalue = GETPOST($constname, 'alpha'); + + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; + } + } + + if (! $error) + { + setEventMessage($langs->trans("SetupSaved")); + } + else + { + setEventMessage($langs->trans("Error"),'errors'); + } +} + +/* + * View + */ + +llxHeader('',$langs->trans('DonationsSetup')); + +$form = new Form($db); + +$linkback=''.$langs->trans("BackToModuleList").''; +print_fiche_titre($langs->trans('DonationsSetup'),$linkback,'setup'); + +print '
'; +print ''; +print ''; + +/* + * Params + */ +print ''; +print ''; +print ''; +print "\n"; + +foreach ($list as $key) +{ + $var=!$var; + + print ''; + + // Param + $label = $langs->trans($key); + print ''; + + // Value + print ''; +} + +print ''; + +print ''; +print "
' . $langs->trans('Options') . '
'; + print ''; + print '
\n"; + +print '
'; + +llxFooter(); +$db->close(); \ No newline at end of file diff --git a/htdocs/compta/dons/card.php b/htdocs/donations/card.php similarity index 100% rename from htdocs/compta/dons/card.php rename to htdocs/donations/card.php diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/donations/class/don.class.php similarity index 100% rename from htdocs/compta/dons/class/don.class.php rename to htdocs/donations/class/don.class.php diff --git a/htdocs/donations/class/index.html b/htdocs/donations/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/dons/class/paymentdonation.class.php b/htdocs/donations/class/paymentdonation.class.php similarity index 100% rename from htdocs/compta/dons/class/paymentdonation.class.php rename to htdocs/donations/class/paymentdonation.class.php diff --git a/htdocs/compta/dons/document.php b/htdocs/donations/document.php similarity index 100% rename from htdocs/compta/dons/document.php rename to htdocs/donations/document.php diff --git a/htdocs/donations/index.html b/htdocs/donations/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/dons/index.php b/htdocs/donations/index.php similarity index 100% rename from htdocs/compta/dons/index.php rename to htdocs/donations/index.php diff --git a/htdocs/compta/dons/info.php b/htdocs/donations/info.php similarity index 100% rename from htdocs/compta/dons/info.php rename to htdocs/donations/info.php diff --git a/htdocs/compta/dons/list.php b/htdocs/donations/list.php similarity index 100% rename from htdocs/compta/dons/list.php rename to htdocs/donations/list.php diff --git a/htdocs/compta/dons/payment.php b/htdocs/donations/payment.php similarity index 100% rename from htdocs/compta/dons/payment.php rename to htdocs/donations/payment.php diff --git a/htdocs/compta/dons/stats.php b/htdocs/donations/stats.php similarity index 100% rename from htdocs/compta/dons/stats.php rename to htdocs/donations/stats.php