Fix responsive for public interface
This commit is contained in:
parent
29853b5fbd
commit
5feea89a94
@ -15,9 +15,6 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
* For paypal test: https://developer.paypal.com/
|
|
||||||
* For paybox test: ???
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,8 +23,9 @@
|
|||||||
* \brief File to offer a way to make an online signature for a particular Dolibarr entity
|
* \brief File to offer a way to make an online signature for a particular Dolibarr entity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define("NOLOGIN", 1); // This means this output page does not require to be logged.
|
if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged.
|
||||||
define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
|
if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
|
||||||
|
if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
|
||||||
|
|
||||||
// For MultiCompany module.
|
// For MultiCompany module.
|
||||||
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
|
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
|
||||||
@ -41,12 +39,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
|
|
||||||
|
// Load translation files
|
||||||
|
$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "paybox"));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
// No check on module enabled. Done later according to $validpaymentmethod
|
// No check on module enabled. Done later according to $validpaymentmethod
|
||||||
|
|
||||||
$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "paybox"));
|
$action = GETPOST('action', 'aZ09');
|
||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
|
||||||
|
|
||||||
// Input are:
|
// Input are:
|
||||||
// type ('invoice','order','contractline'),
|
// type ('invoice','order','contractline'),
|
||||||
@ -55,7 +54,7 @@ $action = GETPOST('action', 'alpha');
|
|||||||
// tag (a free text, required if type is empty)
|
// tag (a free text, required if type is empty)
|
||||||
// currency (iso code)
|
// currency (iso code)
|
||||||
|
|
||||||
$suffix = GETPOST("suffix", 'alpha');
|
$suffix = GETPOST("suffix", 'aZ09');
|
||||||
$source = GETPOST("source", 'alpha');
|
$source = GETPOST("source", 'alpha');
|
||||||
$ref = $REF = GETPOST("ref", 'alpha');
|
$ref = $REF = GETPOST("ref", 'alpha');
|
||||||
|
|
||||||
@ -71,9 +70,6 @@ if (!$action)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$paymentmethod = '';
|
|
||||||
$validpaymentmethod = array();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -133,7 +129,8 @@ if (!empty($conf->global->MAIN_SIGN_CSS_URL)) $head = '<link rel="stylesheet" ty
|
|||||||
$conf->dol_hide_topmenu = 1;
|
$conf->dol_hide_topmenu = 1;
|
||||||
$conf->dol_hide_leftmenu = 1;
|
$conf->dol_hide_leftmenu = 1;
|
||||||
|
|
||||||
llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody');
|
$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
|
||||||
|
llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea);
|
||||||
|
|
||||||
// Check link validity
|
// Check link validity
|
||||||
if (!empty($source) && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', '')))
|
if (!empty($source) && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', '')))
|
||||||
@ -171,23 +168,32 @@ elseif (!empty($conf->global->ONLINE_SIGN_LOGO)) $logosmall = $conf->global->ONL
|
|||||||
//print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n";
|
//print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n";
|
||||||
// Define urllogo
|
// Define urllogo
|
||||||
$urllogo = '';
|
$urllogo = '';
|
||||||
|
$urllogofull = '';
|
||||||
if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall))
|
if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall))
|
||||||
{
|
{
|
||||||
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
|
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
|
||||||
|
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
|
||||||
|
$width = 150;
|
||||||
}
|
}
|
||||||
elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
|
elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
|
||||||
{
|
{
|
||||||
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
|
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
|
||||||
$width = 96;
|
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
|
||||||
|
$width = 150;
|
||||||
}
|
}
|
||||||
// Output html code for logo
|
// Output html code for logo
|
||||||
if ($urllogo)
|
if ($urllogo)
|
||||||
{
|
{
|
||||||
print '<tr>';
|
print '<div class="backgreypublicpayment">';
|
||||||
print '<td align="center"><img id="dolpaymentlogo" title="'.$title.'" src="'.$urllogo.'"';
|
print '<div class="logopublicpayment">';
|
||||||
|
print '<img id="dolpaymentlogo" src="'.$urllogo.'"';
|
||||||
if ($width) print ' width="'.$width.'"';
|
if ($width) print ' width="'.$width.'"';
|
||||||
print '></td>';
|
print '>';
|
||||||
print '</tr>'."\n";
|
print '</div>';
|
||||||
|
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
||||||
|
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" width="80px"></a></div>';
|
||||||
|
}
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output introduction text
|
// Output introduction text
|
||||||
@ -209,7 +215,7 @@ print $text;
|
|||||||
// Output payment summary form
|
// Output payment summary form
|
||||||
print '<tr><td align="center">';
|
print '<tr><td align="center">';
|
||||||
print '<table with="100%" id="tablepublicpayment">';
|
print '<table with="100%" id="tablepublicpayment">';
|
||||||
print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("ThisIsInformationOnDocumentToSign").' :</td></tr>'."\n";
|
print '<tr><td align="left" colspan="2" class="opacitymedium">'.$langs->trans("ThisIsInformationOnDocumentToSign").' :</td></tr>'."\n";
|
||||||
|
|
||||||
$found = false;
|
$found = false;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user