Fix: ajax_combobox function must be included before called.
New: Feature of module survey are now localized into top menu "Tools".
This commit is contained in:
parent
c45f509984
commit
62a990d6cc
@ -1841,7 +1841,9 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
$absolute_discount = $soc->getAvailableDiscounts();
|
$absolute_discount = $soc->getAvailableDiscounts();
|
||||||
|
|
||||||
if (! empty($conf->use_javascript_ajax)) {
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||||
print ajax_combobox('fac_replacement');
|
print ajax_combobox('fac_replacement');
|
||||||
print ajax_combobox('fac_avoir');
|
print ajax_combobox('fac_avoir');
|
||||||
}
|
}
|
||||||
@ -1849,8 +1851,7 @@ if ($action == 'create')
|
|||||||
print '<form name="add" action="' . $_SERVER ["PHP_SELF"] . '" method="POST">';
|
print '<form name="add" action="' . $_SERVER ["PHP_SELF"] . '" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
if ($soc->id > 0)
|
if ($soc->id > 0) print '<input type="hidden" name="socid" value="' . $soc->id . '">' . "\n";
|
||||||
print '<input type="hidden" name="socid" value="' . $soc->id . '">' . "\n";
|
|
||||||
print '<input name="facnumber" type="hidden" value="provisoire">';
|
print '<input name="facnumber" type="hidden" value="provisoire">';
|
||||||
print '<input name="ref_client" type="hidden" value="' . $ref_client . '">';
|
print '<input name="ref_client" type="hidden" value="' . $ref_client . '">';
|
||||||
print '<input name="ref_int" type="hidden" value="' . $ref_int . '">';
|
print '<input name="ref_int" type="hidden" value="' . $ref_int . '">';
|
||||||
|
|||||||
@ -674,6 +674,7 @@ class ExtraFields
|
|||||||
$out = '';
|
$out = '';
|
||||||
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && ! $forcecombo)
|
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && ! $forcecombo)
|
||||||
{
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||||
$out.= ajax_combobox('options_'.$key.$keyprefix, $event, $conf->global->COMPANY_USE_SEARCH_TO_SELECT);
|
$out.= ajax_combobox('options_'.$key.$keyprefix, $event, $conf->global->COMPANY_USE_SEARCH_TO_SELECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -693,6 +694,7 @@ class ExtraFields
|
|||||||
$out = '';
|
$out = '';
|
||||||
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && ! $forcecombo)
|
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && ! $forcecombo)
|
||||||
{
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||||
$out.= ajax_combobox('options_'.$key.$keyprefix, $event, $conf->global->COMPANY_USE_SEARCH_TO_SELECT);
|
$out.= ajax_combobox('options_'.$key.$keyprefix, $event, $conf->global->COMPANY_USE_SEARCH_TO_SELECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -800,7 +800,8 @@ class Form
|
|||||||
{
|
{
|
||||||
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && ! $forcecombo)
|
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && ! $forcecombo)
|
||||||
{
|
{
|
||||||
$out.= ajax_combobox($htmlname, $events, $conf->global->COMPANY_USE_SEARCH_TO_SELECT);
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||||
|
$out.= ajax_combobox($htmlname, $events, $conf->global->COMPANY_USE_SEARCH_TO_SELECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct $out and $outarray
|
// Construct $out and $outarray
|
||||||
|
|||||||
@ -1151,7 +1151,7 @@ function dol_print_url($url,$target='_blank',$max=32)
|
|||||||
* @param string $email EMail to show (only email, without 'Name of recipient' before)
|
* @param string $email EMail to show (only email, without 'Name of recipient' before)
|
||||||
* @param int $cid Id of contact if known
|
* @param int $cid Id of contact if known
|
||||||
* @param int $socid Id of third party if known
|
* @param int $socid Id of third party if known
|
||||||
* @param int $addlink 0=no link to create action
|
* @param int $addlink 0=no link, 1=email has a html email link (+ link to create action if constant AGENDA_ADDACTIONFOREMAIL is on)
|
||||||
* @param int $max Max number of characters to show
|
* @param int $max Max number of characters to show
|
||||||
* @param int $showinvalid Show warning if syntax email is wrong
|
* @param int $showinvalid Show warning if syntax email is wrong
|
||||||
* @return string HTML Link
|
* @return string HTML Link
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -76,7 +76,7 @@ class modOpenSurvey extends DolibarrModules
|
|||||||
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
|
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
|
||||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||||
$this->phpmin = array(4,1); // Minimum version of PHP required by module
|
$this->phpmin = array(4,1); // Minimum version of PHP required by module
|
||||||
$this->need_dolibarr_version = array(2,4); // Minimum version of Dolibarr required by module
|
$this->need_dolibarr_version = array(3,4,0); // Minimum version of Dolibarr required by module
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
$this->const = array(); // List of parameters
|
$this->const = array(); // List of parameters
|
||||||
@ -121,7 +121,7 @@ class modOpenSurvey extends DolibarrModules
|
|||||||
// Main menu entries
|
// Main menu entries
|
||||||
$this->menus = array(); // List of menus to add
|
$this->menus = array(); // List of menus to add
|
||||||
$r=0;
|
$r=0;
|
||||||
|
/*
|
||||||
$this->menu[$r]=array( 'fk_menu'=>0, // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
$this->menu[$r]=array( 'fk_menu'=>0, // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||||
'type'=>'top',
|
'type'=>'top',
|
||||||
'titre'=>'Surveys',
|
'titre'=>'Surveys',
|
||||||
@ -133,14 +133,14 @@ class modOpenSurvey extends DolibarrModules
|
|||||||
'perms'=>'$user->rights->opensurvey->read',
|
'perms'=>'$user->rights->opensurvey->read',
|
||||||
'target'=>'',
|
'target'=>'',
|
||||||
'user'=>0);
|
'user'=>0);
|
||||||
$r++;
|
$r++;*/
|
||||||
|
|
||||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=opensurvey', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||||
'type'=>'left',
|
'type'=>'left',
|
||||||
'titre'=>'Survey',
|
'titre'=>'Survey',
|
||||||
'mainmenu'=>'opensurvey',
|
'mainmenu'=>'tools',
|
||||||
'leftmenu'=>'opensurvey',
|
'leftmenu'=>'opensurvey',
|
||||||
'url'=>'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey',
|
'url'=>'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey',
|
||||||
'langs'=>'opensurvey',
|
'langs'=>'opensurvey',
|
||||||
'position'=>200,
|
'position'=>200,
|
||||||
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||||
@ -149,10 +149,10 @@ class modOpenSurvey extends DolibarrModules
|
|||||||
'user'=>0);
|
'user'=>0);
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=opensurvey,fk_leftmenu=opensurvey', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=tools,fk_leftmenu=opensurvey', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||||
'type'=>'left',
|
'type'=>'left',
|
||||||
'titre'=>'NewSurvey',
|
'titre'=>'NewSurvey',
|
||||||
'mainmenu'=>'opensurvey',
|
'mainmenu'=>'tools',
|
||||||
'leftmenu'=>'opensurvey_new',
|
'leftmenu'=>'opensurvey_new',
|
||||||
'url'=>'/opensurvey/wizard/index.php',
|
'url'=>'/opensurvey/wizard/index.php',
|
||||||
'langs'=>'opensurvey',
|
'langs'=>'opensurvey',
|
||||||
@ -163,10 +163,10 @@ class modOpenSurvey extends DolibarrModules
|
|||||||
'user'=>0);
|
'user'=>0);
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=opensurvey,fk_leftmenu=opensurvey', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=tools,fk_leftmenu=opensurvey', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||||
'type'=>'left',
|
'type'=>'left',
|
||||||
'titre'=>'List',
|
'titre'=>'List',
|
||||||
'mainmenu'=>'opensurvey',
|
'mainmenu'=>'tools',
|
||||||
'leftmenu'=>'opensurvey_list',
|
'leftmenu'=>'opensurvey_list',
|
||||||
'url'=>'/opensurvey/list.php',
|
'url'=>'/opensurvey/list.php',
|
||||||
'langs'=>'opensurvey',
|
'langs'=>'opensurvey',
|
||||||
|
|||||||
@ -243,7 +243,7 @@ if (!$object->fk_user_creat) {
|
|||||||
{
|
{
|
||||||
print '<input type="text" name="nouvelleadresse" size="40" value="'.$object->mail_admin.'">';
|
print '<input type="text" name="nouvelleadresse" size="40" value="'.$object->mail_admin.'">';
|
||||||
}
|
}
|
||||||
else print dol_print_email($object->mail_admin);
|
else print dol_print_email($object->mail_admin, 0, 0, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -382,6 +382,8 @@ if ($object->allow_comments) {
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
llxFooterSurvey();
|
llxFooterSurvey();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user