Fix several minor bugs

This commit is contained in:
Laurent Destailleur 2015-08-31 12:13:23 +02:00
parent 3e266243e5
commit 31465fe899
8 changed files with 49 additions and 25 deletions

View File

@ -761,7 +761,7 @@ else
// On propose la generation de la vignette si elle n'existe pas
if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i',$mysoc->logo))
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&amp;file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'&nbsp;&nbsp;</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&amp;file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'</a>&nbsp;&nbsp;';
}
else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
{

View File

@ -208,7 +208,7 @@ print '</tr>';
if (count($object->lines) > 0)
{
// Loop on each active job
$style='impair';
$style='pair';
foreach($object->lines as $line)
{
// title profil

View File

@ -311,12 +311,15 @@ if ($action != 'edit')
{
print '<script type="text/javascript">
jQuery(document).ready(function () {
jQuery("#opensurveyurl").focus(function() { jQuery(this).select(); } );
jQuery("#opensurveyurl").click(function() { jQuery(this).select(); } );
});
</script>';
print ' <a href="'.$url.'" target="_blank">'.$langs->trans("Link").'</a>';
}
print '</td></tr>';
print '</table>';
dol_fiche_end();

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
/* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
*
* 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
@ -125,7 +125,6 @@ for ($i=0; $i<$nblignes; $i++)
}
if ($testmodifier)
{
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
@ -473,17 +472,28 @@ if ($object->fk_user_creat) {
print '</td></tr>';
// Link
print '<tr><td>'.img_picto('','object_globe.png').' '.$langs->trans("UrlForSurvey",'').'</td><td>';
print '<tr><td>'.img_picto('','object_globe.png').' '.$langs->trans("UrlForSurvey",'').'</td><td colspan="2">';
// Define $urlwithroot
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
$url=$urlwithouturlroot.dol_buildpath('/public/opensurvey/studs.php',1).'?sondage='.$numsondage;
$urlvcal='<a href="'.$url.'" target="_blank">'.$url.'</a>';
print $urlvcal;
$url=$urlwithouturlroot.dol_buildpath('/public/opensurvey/studs.php',1).'?sondage='.$object->id_sondage;
$urllink='<input type="text" style="width: 60%" '.($action == 'edit' ? 'disabled' : '').' id="opensurveyurl" name="opensurveyurl" value="'.$url.'">';
print $urllink;
if ($action != 'edit')
{
print '<script type="text/javascript">
jQuery(document).ready(function () {
jQuery("#opensurveyurl").click(function() { jQuery(this).select(); } );
});
</script>';
print ' <a href="'.$url.'" target="_blank">'.$langs->trans("Link").'</a>';
}
print '</td></tr>';
print '</table>';

View File

@ -100,6 +100,8 @@ print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setvalue">';
dol_fiche_head(null, 'payboxaccount', '');
$var=true;
print '<table class="noborder" width="100%">';
@ -195,7 +197,13 @@ print '<input size="32" type="email" name="PAYBOX_PAYONLINE_SENDEMAIL" value="'.
print ' &nbsp; '.$langs->trans("Example").': myemail@myserver.com';
print '</td></tr>';
print '</table><br><div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div></form>';
print '</table>';
dol_fiche_end();
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
print '</form>';
print '<br><br>';
@ -227,6 +235,6 @@ if (! empty($conf->adherent->enabled))
print "<br>";
print info_admin($langs->trans("YouCanAddTagOnUrl"));
$db->close();
dol_fiche_end();
llxFooter();
$db->close();

View File

@ -98,6 +98,11 @@ print '<br>';
$head=paypaladmin_prepare_head();
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setvalue">';
dol_fiche_head($head, 'paypalaccount', '');
print $langs->trans("PaypalDesc")."<br>\n";
@ -111,10 +116,6 @@ if (! function_exists('curl_version'))
print '<br>';
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setvalue">';
print '<table class="noborder" width="100%">';
@ -232,12 +233,12 @@ print '</td></tr>';
print '</table>';
print '<br><div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
dol_fiche_end();
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
print '</form>';
dol_fiche_end();
print '<br><br>';
// Help doc
@ -365,10 +366,10 @@ if (! empty($conf->use_javascript_ajax))
{
print "\n".'<script type="text/javascript">';
print '$(document).ready(function () {
$("#apidoc").hide();
$("#apidoca").hide();
$("#apidoca").click(function() {
$("#apidoca").hide();
$("#apidoc").show();
$("#apidoca").hide();
});
$("#generate_token").click(function() {

View File

@ -173,7 +173,7 @@ function paypaladmin_prepare_head()
$head = array();
$head[$h][0] = DOL_URL_ROOT."/paypal/admin/paypal.php";
$head[$h][1] = $langs->trans("Account");
$head[$h][1] = $langs->trans("PayPal");
$head[$h][2] = 'paypalaccount';
$h++;

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -299,6 +299,8 @@ else
print '</table>';
print '<br>';
// Boutons actions
print '<div class="center">';
print '<input type="submit" id="convert_vatrate" name="convert_vatrate" value="'.$langs->trans("MassConvert").'" class="button" />';