Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
8bace4c64e
@ -142,7 +142,7 @@ $linkback = '';
|
||||
print load_fiche_titre($langs->trans('ExportOptions'), $linkback, 'accountancy');
|
||||
|
||||
|
||||
print "\n".'<script type="text/javascript" language="javascript">'."\n";
|
||||
print "\n".'<script type="text/javascript">'."\n";
|
||||
print 'jQuery(document).ready(function () {'."\n";
|
||||
print ' function initfields()'."\n";
|
||||
print ' {'."\n";
|
||||
|
||||
@ -753,7 +753,7 @@ if ($result) {
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_savebutton()
|
||||
{
|
||||
|
||||
@ -241,7 +241,7 @@ if ($action != 'export_csv') {
|
||||
if (empty($reshook)) {
|
||||
$button = '<input type="button" id="exportcsvbutton" name="exportcsvbutton" class="butAction" value="'.$langs->trans("Export").' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
||||
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#exportcsvbutton").click(function() {
|
||||
event.preventDefault();
|
||||
|
||||
@ -738,7 +738,7 @@ if ($db->type == 'mysqli') {
|
||||
}
|
||||
|
||||
// Add code to auto check the box when we select an account
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery(".codeventil").change(function() {
|
||||
var s=$(this).attr("id").replace("codeventil", "")
|
||||
|
||||
@ -470,7 +470,7 @@ if ($result) {
|
||||
}
|
||||
|
||||
// Add code to auto check the box when we select an account
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery(".codeventil").change(function() {
|
||||
var s=$(this).attr("id").replace("codeventil", "")
|
||||
|
||||
@ -100,7 +100,7 @@ if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_S
|
||||
$showtutorial .= ' '.$langs->trans("ShowTutorial");
|
||||
$showtutorial .= '</a></div>';
|
||||
|
||||
$showtutorial .= '<script type="text/javascript" language="javascript">
|
||||
$showtutorial .= '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#show_hide").click(function () {
|
||||
jQuery( "#idfaq" ).toggle({
|
||||
|
||||
@ -747,7 +747,7 @@ if ($db->type == 'mysqli') {
|
||||
}
|
||||
|
||||
// Add code to auto check the box when we select an account
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery(".codeventil").change(function() {
|
||||
var s=$(this).attr("id").replace("codeventil", "")
|
||||
|
||||
@ -113,7 +113,7 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print dol_get_fiche_head($head, 'website', $langs->trans("Members"), -1, 'user');
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
function initemail()
|
||||
{
|
||||
|
||||
@ -104,7 +104,7 @@ abstract class ActionsAdherentCardCommon
|
||||
|
||||
if ($action == 'create' || $action == 'edit') {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
$this->tpl['ajax_selectcountry'] = "\n".'<script type="text/javascript" language="javascript">
|
||||
$this->tpl['ajax_selectcountry'] = "\n".'<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
jQuery("#selectcountry_id").change(function() {
|
||||
document.formsoc.action.value="'.$action.'";
|
||||
|
||||
@ -953,7 +953,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print load_fiche_titre($langs->trans("NewMember"), '', $object->picto);
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
jQuery("#selectcountry_id").change(function() {
|
||||
document.formsoc.action.value="create";
|
||||
@ -1183,7 +1183,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
jQuery("#selectcountry_id").change(function() {
|
||||
document.formsoc.action.value="edit";
|
||||
|
||||
@ -838,7 +838,7 @@ if ($rowid > 0) {
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
//var_dump($bankdirect.'-'.$bankviainvoice.'-'.$invoiceonly.'-'.empty($conf->global->ADHERENT_BANK_USE));
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print '$(document).ready(function () {
|
||||
$(".bankswitchclass, .bankswitchclass2").'.(($bankdirect || $bankviainvoice) ? 'show()' : 'hide()').';
|
||||
$("#none, #invoiceonly").click(function() {
|
||||
|
||||
@ -100,7 +100,7 @@ print "<br><br>\n";
|
||||
* Edit parameters
|
||||
*/
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print '$(document).ready(function () {
|
||||
$("#selectcountry_id").change(function() {
|
||||
document.form_index.action.value="updateedit";
|
||||
|
||||
@ -385,7 +385,7 @@ print "<br><br>\n";
|
||||
* Edit parameters
|
||||
*/
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print '$(document).ready(function () {
|
||||
$("#selectcountry_id").change(function() {
|
||||
document.form_index.action.value="updateedit";
|
||||
|
||||
@ -222,7 +222,7 @@ if (empty($conf->use_javascript_ajax)) {
|
||||
// Add env of ckeditor
|
||||
// This is to show how CKEditor detect browser to understand why editor is disabled or not. To help debug.
|
||||
/*
|
||||
print '<br><script language="javascript">
|
||||
print '<br><script type="text/javascript">
|
||||
function jsdump(obj, id) {
|
||||
var out = \'\';
|
||||
for (var i in obj) {
|
||||
|
||||
@ -173,7 +173,7 @@ if (version_compare(phpversion(), '7.0', '>=')) {
|
||||
|
||||
if ($action == 'edit') {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
function initfields()
|
||||
{
|
||||
|
||||
@ -143,7 +143,7 @@ if (version_compare(phpversion(), '7.0', '>=')) {
|
||||
|
||||
if ($action == 'edit') {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
function initfields()
|
||||
{
|
||||
|
||||
@ -142,7 +142,7 @@ if (version_compare(phpversion(), '7.0', '>=')) {
|
||||
|
||||
if ($action == 'edit') {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
function initfields()
|
||||
{
|
||||
|
||||
@ -255,7 +255,7 @@ llxHeader('', $langs->trans("Menu"));
|
||||
|
||||
|
||||
if ($action == 'create') {
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_topleft()
|
||||
{
|
||||
|
||||
@ -98,7 +98,7 @@ print dol_get_fiche_head($head, 'proxy', '', -1);
|
||||
print '<br>';
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
function initfields()
|
||||
{
|
||||
|
||||
@ -165,7 +165,7 @@ if (ini_get('opcache.preload')) {
|
||||
print '<br>';
|
||||
|
||||
// HTTPCacheStaticResources
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
var getphpurl;
|
||||
var cachephpstring;
|
||||
|
||||
@ -224,7 +224,7 @@ if ($conf->societe->enabled) {
|
||||
// For products
|
||||
if ($conf->product->enabled || $conf->product->service) {
|
||||
// Example 1 : Adding jquery code
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
function confirm_erase() {
|
||||
return confirm("'.dol_escape_js($langs->trans("ConfirmEraseAllCurrentBarCode")).'");
|
||||
}
|
||||
|
||||
@ -315,7 +315,7 @@ print '<br>';
|
||||
|
||||
|
||||
// Add javascript to make choice dynamic
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_selectors()
|
||||
{
|
||||
|
||||
@ -54,7 +54,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
||||
echo '</td>';
|
||||
echo '<td class="linkedcol-name nowraponall" >'.$objectlink->getNomUrl(1).'</td>';
|
||||
|
||||
echo '<td class="linkedcol-ref" align="center">';
|
||||
echo '<td class="linkedcol-ref">';
|
||||
$result = $product_static->fetch($objectlink->fk_product);
|
||||
if ($result < 0) {
|
||||
setEventMessage($product_static->error, 'errors');
|
||||
@ -62,7 +62,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
||||
$product_static->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
echo '<td class="linkedcol-date" align="center">'.dol_print_date($objectlink->date_creation, 'day').'</td>';
|
||||
echo '<td class="linkedcol-date">'.dol_print_date($objectlink->date_creation, 'day').'</td>';
|
||||
echo '<td class="linkedcol-amount right">';
|
||||
if ($user->rights->commande->lire) {
|
||||
$total = $total + $objectlink->total_ht;
|
||||
|
||||
@ -1075,7 +1075,7 @@ if ($action == 'create') {
|
||||
print '<div class="hidden marginrightonly inline-block repeateventBYDAY">';
|
||||
print $langs->trans("DayOfWeek").': <input type="input" size="4" name="BYDAY" value="'.$selectedrecurrulebyday.'">';
|
||||
print '</div>';
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_repeat()
|
||||
{
|
||||
@ -1554,7 +1554,7 @@ if ($id > 0) {
|
||||
print '<div class="hidden marginrightonly inline-block repeateventBYDAY">';
|
||||
print $langs->trans("DayOfWeek").': <input type="input" size="4" name="BYDAY" value="'.$selectedrecurrulebyday.'">';
|
||||
print '</div>';
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_repeat()
|
||||
{
|
||||
|
||||
@ -882,7 +882,7 @@ print "\n".'</form>';
|
||||
print "\n";
|
||||
|
||||
// Add js code to manage click on a box
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery(".onclickopenref").click(function() {
|
||||
var ref=$(this).attr(\'ref\');
|
||||
|
||||
@ -1050,7 +1050,7 @@ print "\n".'</form>';
|
||||
print "\n";
|
||||
|
||||
// Add js code to manage click on a box
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery(".onclickopenref").click(function() {
|
||||
var ref=$(this).attr(\'ref\');
|
||||
|
||||
@ -1221,7 +1221,7 @@ if ($action == 'create') {
|
||||
|
||||
// TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
|
||||
$out .= '<input type="hidden" class="removedfilehidden" name="removedfile" value="">'."\n";
|
||||
$out .= '<script type="text/javascript" language="javascript">';
|
||||
$out .= '<script type="text/javascript">';
|
||||
$out .= 'jQuery(document).ready(function () {';
|
||||
$out .= ' jQuery(".removedfile").click(function() {';
|
||||
$out .= ' jQuery(".removedfilehidden").val(jQuery(this).val());';
|
||||
|
||||
@ -1442,7 +1442,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
// Actions to build doc
|
||||
$upload_dir = $conf->propal->multidir_output[$object->entity];
|
||||
$upload_dir = !empty($conf->propal->multidir_output[$object->entity])?$conf->propal->multidir_output[$object->entity]:$conf->propal->dir_output;
|
||||
$permissiontoadd = $usercancreate;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
}
|
||||
@ -1584,6 +1584,7 @@ if ($action == 'create') {
|
||||
// Third party
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">'.$langs->trans('Customer').'</td>';
|
||||
$shipping_method_id = 0;
|
||||
if ($socid > 0) {
|
||||
print '<td>';
|
||||
print $soc->getNomUrl(1);
|
||||
@ -1700,7 +1701,7 @@ if ($action == 'create') {
|
||||
// Delivery date (or manufacturing)
|
||||
print '<tr><td>'.$langs->trans("DeliveryDate").'</td>';
|
||||
print '<td>';
|
||||
if ($conf->global->DATE_LIVRAISON_WEEK_DELAY != "") {
|
||||
if (isset($conf->global->DATE_LIVRAISON_WEEK_DELAY) && is_numeric($conf->global->DATE_LIVRAISON_WEEK_DELAY)) {
|
||||
$tmpdte = time() + ((7 * $conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
|
||||
$syear = date("Y", $tmpdte);
|
||||
$smonth = date("m", $tmpdte);
|
||||
@ -1737,7 +1738,7 @@ if ($action == 'create') {
|
||||
print '<td>';
|
||||
print img_picto('', 'pdf').' ';
|
||||
$liste = ModelePDFPropales::liste_modeles($db);
|
||||
$preselected = ($conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT ? $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT : $conf->global->PROPALE_ADDON_PDF);
|
||||
$preselected = (!empty($conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT) ? $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT : getDolGlobalString("PROPALE_ADDON_PDF"));
|
||||
print $form->selectarray('model', $liste, $preselected, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth200 widthcentpercentminusx', 1);
|
||||
print "</td></tr>";
|
||||
|
||||
@ -1754,7 +1755,7 @@ if ($action == 'create') {
|
||||
print '<tr>';
|
||||
print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>';
|
||||
print '<td valign="top">';
|
||||
$note_public = $object->getDefaultCreateValueFor('note_public', (is_object($objectsrc) ? $objectsrc->note_public : null));
|
||||
$note_public = $object->getDefaultCreateValueFor('note_public', (!empty($objectsrc) ? $objectsrc->note_public : null));
|
||||
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
|
||||
|
||||
@ -100,8 +100,8 @@ if (!empty($conf->propal->enabled)) {
|
||||
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
startSimpleTable("DraftPropals", "comm/propal/list.php", "search_status=".Propal::STATUS_DRAFT, 2, $num);
|
||||
|
||||
$total = 0;
|
||||
if ($num) {
|
||||
$total = 0;
|
||||
$i = 0;
|
||||
|
||||
while ($i < $nbofloop) {
|
||||
|
||||
@ -534,7 +534,7 @@ if (!empty($search_categ_cus) && $search_categ_cus != '-1') {
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
||||
}
|
||||
$sql .= ', '.MAIN_DB_PREFIX.'propal as p';
|
||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)";
|
||||
}
|
||||
if ($sall || $search_product_category > 0) {
|
||||
|
||||
@ -1369,7 +1369,7 @@ if (empty($reshook)) {
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
||||
|
||||
// Actions to build doc
|
||||
$upload_dir = $conf->commande->multidir_output[$object->entity];
|
||||
$upload_dir = !empty($conf->propal->multidir_output[$object->entity])?$conf->propal->multidir_output[$object->entity]:$conf->propal->dir_output;
|
||||
$permissiontoadd = $usercancreate;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
|
||||
|
||||
@ -452,7 +452,7 @@ if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
||||
}
|
||||
$sql .= ', '.MAIN_DB_PREFIX.'commande as c';
|
||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande_extrafields as ef on (c.rowid = ef.fk_object)";
|
||||
}
|
||||
if ($sall || $search_product_category > 0) {
|
||||
|
||||
@ -52,8 +52,8 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
||||
}
|
||||
echo '</td>';
|
||||
echo '<td class="linkedcol-name nowraponall" >'.$objectlink->getNomUrl(1).'</td>';
|
||||
echo '<td class="linkedcol-ref" align="center">'.$objectlink->ref_client.'</td>';
|
||||
echo '<td class="linkedcol-date" align="center">'.dol_print_date($objectlink->date, 'day').'</td>';
|
||||
echo '<td class="linkedcol-ref">'.$objectlink->ref_client.'</td>';
|
||||
echo '<td class="linkedcol-date">'.dol_print_date($objectlink->date, 'day').'</td>';
|
||||
echo '<td class="linkedcol-amount right">';
|
||||
if ($user->rights->commande->lire) {
|
||||
$total = $total + $objectlink->total_ht;
|
||||
|
||||
@ -343,7 +343,7 @@ if ($action == 'create') {
|
||||
print load_fiche_titre($langs->trans("NewFinancialAccount"), '', 'bank_account');
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
jQuery("#selecttype").change(function() {
|
||||
document.formsoc.action.value="create";
|
||||
@ -831,7 +831,7 @@ if ($action == 'create') {
|
||||
print load_fiche_titre($langs->trans("EditFinancialAccount"), '', 'bank_account');
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
jQuery("#selecttype").change(function() {
|
||||
document.formsoc.action.value="edit";
|
||||
|
||||
@ -342,7 +342,7 @@ foreach ($bankcateg->fetchAll() as $bankcategory) {
|
||||
if ($action == 'create') {
|
||||
// Update fields properties in realtime
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print '$(document).ready(function () {
|
||||
setPaymentType();
|
||||
$("#selectpaymenttype").change(function() {
|
||||
|
||||
@ -3220,7 +3220,7 @@ if ($action == 'create') {
|
||||
if (empty($conf->global->INVOICE_DISABLE_DEPOSIT)) {
|
||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp = '<input type="radio" id="radio_deposit" name="type" value="3"'.(GETPOST('type') == 3 ? ' checked' : '').'> ';
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#typestandardinvoice, #valuestandardinvoice").click(function() {
|
||||
jQuery("#radio_standard").prop("checked", true);
|
||||
@ -3334,7 +3334,7 @@ if ($action == 'create') {
|
||||
$tmp .= ' disabled';
|
||||
}
|
||||
$tmp .= '> ';
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#fac_replacement").change(function() {
|
||||
jQuery("#radio_replacement").prop("checked", true);
|
||||
@ -3423,7 +3423,7 @@ if ($action == 'create') {
|
||||
}
|
||||
$tmp .= '> ';
|
||||
// Show credit note options only if we checked credit note
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
if (! jQuery("#radio_creditnote").is(":checked"))
|
||||
{
|
||||
@ -3498,7 +3498,7 @@ if ($action == 'create') {
|
||||
$jsListType .= (!empty($jsListType) ? ',' : '').'"'.$type.'":"'.$curent.'"';
|
||||
}
|
||||
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var listType = {'.$jsListType.'};
|
||||
$("[name=\'type\'").change(function() {
|
||||
@ -3586,7 +3586,7 @@ if ($action == 'create') {
|
||||
$form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("[name=\'type\']").change(function() {
|
||||
if($( this ).prop("checked") && $.inArray($( this ).val(), '.json_encode($retainedWarrantyInvoiceAvailableType).' ) !== -1)
|
||||
|
||||
@ -348,7 +348,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
// Add realtime total information
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print '$(document).ready(function () {
|
||||
setPaiementCode();
|
||||
|
||||
|
||||
@ -409,7 +409,7 @@ if ($action == 'new') {
|
||||
|
||||
foreach ($accounts as $bid => $account_label) {
|
||||
print '
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
jQuery("#checkall_'.$bid.'").click(function()
|
||||
|
||||
@ -154,7 +154,7 @@ if ($action == 'create') {
|
||||
|
||||
$total = $charge->amount;
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
|
||||
//Add js for AutoFill
|
||||
print ' $(document).ready(function () {';
|
||||
|
||||
@ -154,7 +154,7 @@ if ($action == 'create') {
|
||||
|
||||
$total = $tva->amount;
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
|
||||
//Add js for AutoFill
|
||||
print ' $(document).ready(function () {';
|
||||
|
||||
@ -401,7 +401,7 @@ if ($action == 'create') {
|
||||
print load_fiche_titre($langs->trans("VAT").' - '.$langs->trans("New"));
|
||||
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print /** @lang JavaScript */'
|
||||
$(document).ready(function () {
|
||||
let onAutoCreatePaiementChange = function () {
|
||||
|
||||
@ -105,7 +105,7 @@ abstract class ActionsContactCardCommon
|
||||
|
||||
if ($action == 'create' || $action == 'edit') {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
$this->tpl['ajax_selectcountry'] = "\n".'<script type="text/javascript" language="javascript">
|
||||
$this->tpl['ajax_selectcountry'] = "\n".'<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
jQuery("#selectcountry_id").change(function() {
|
||||
document.formsoc.action.value="'.$action.'";
|
||||
|
||||
@ -620,7 +620,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors);
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">'."\n";
|
||||
print "\n".'<script type="text/javascript">'."\n";
|
||||
print 'jQuery(document).ready(function () {
|
||||
jQuery("#selectcountry_id").change(function() {
|
||||
document.formsoc.action.value="create";
|
||||
@ -798,7 +798,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
// Unsubscribe
|
||||
if (!empty($conf->mailing->enabled)) {
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">'."\n";
|
||||
print "\n".'<script type="text/javascript">'."\n";
|
||||
print '$(document).ready(function () {
|
||||
$("#email").keyup(function() {
|
||||
if ($(this).val()!="") {
|
||||
@ -924,7 +924,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors);
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">'."\n";
|
||||
print "\n".'<script type="text/javascript">'."\n";
|
||||
print 'jQuery(document).ready(function () {
|
||||
jQuery("#selectcountry_id").change(function() {
|
||||
document.formsoc.action.value="edit";
|
||||
@ -1071,7 +1071,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
// Unsubscribe
|
||||
if (!empty($conf->mailing->enabled)) {
|
||||
if ($conf->use_javascript_ajax && isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">'."\n";
|
||||
print "\n".'<script type="text/javascript">'."\n";
|
||||
|
||||
print '
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
@ -229,6 +229,7 @@ $formother = new FormOther($db);
|
||||
$socstatic = new Societe($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
$contracttmp = new Contrat($db);
|
||||
$title = "";
|
||||
|
||||
$sql = 'SELECT';
|
||||
$sql .= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public, c.entity,";
|
||||
@ -259,7 +260,7 @@ if ($search_sale > 0 || (empty($user->rights->societe->client->voir) && !$socid)
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
}
|
||||
$sql .= ", ".MAIN_DB_PREFIX."contrat as c";
|
||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (c.rowid = ef.fk_object)";
|
||||
}
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat";
|
||||
|
||||
@ -37,6 +37,7 @@ $langs->loadLangs(array('products', 'contracts', 'companies'));
|
||||
|
||||
$optioncss = GETPOST('optioncss', 'aZ09');
|
||||
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
@ -248,7 +249,7 @@ if (empty($user->rights->societe->client->voir) && !$socid) {
|
||||
$sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,";
|
||||
}
|
||||
$sql .= " ".MAIN_DB_PREFIX."contratdet as cd";
|
||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (cd.rowid = ef.fk_object)";
|
||||
}
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
|
||||
|
||||
@ -160,7 +160,7 @@ if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_
|
||||
</script>';
|
||||
|
||||
// This ajax service is called only when a directory $selecteddir is opened but not when closed.
|
||||
//print '<script language="javascript">';
|
||||
//print '<script type="text/javascript">';
|
||||
//print "loadandshowpreview('".dol_escape_js($selecteddir)."');";
|
||||
//print '</script>';
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
||||
|
||||
if (!$mesg) {
|
||||
$stringtoshow = '';
|
||||
$stringtoshow .= '<script type="text/javascript" language="javascript">
|
||||
$stringtoshow .= '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#idsubimg'.$this->boxcode.'").click(function() {
|
||||
jQuery("#idfilter'.$this->boxcode.'").toggle();
|
||||
|
||||
@ -223,7 +223,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
||||
|
||||
if (!$mesg) {
|
||||
$stringtoshow = '';
|
||||
$stringtoshow .= '<script type="text/javascript" language="javascript">
|
||||
$stringtoshow .= '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#idsubimg'.$this->boxcode.'").click(function() {
|
||||
jQuery("#idfilter'.$this->boxcode.'").toggle();
|
||||
|
||||
@ -140,7 +140,7 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
$stringtoshow = '<div class="div-table-responsive-no-min">';
|
||||
$stringtoshow .= '<script type="text/javascript" language="javascript">
|
||||
$stringtoshow .= '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#idsubimgDOLUSERCOOKIE_ticket_last_days").click(function() {
|
||||
jQuery("#idfilterDOLUSERCOOKIE_ticket_last_days").toggle();
|
||||
|
||||
@ -228,7 +228,7 @@ class box_graph_orders_permonth extends ModeleBoxes
|
||||
|
||||
if (!$mesg) {
|
||||
$stringtoshow = '';
|
||||
$stringtoshow .= '<script type="text/javascript" language="javascript">
|
||||
$stringtoshow .= '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#idsubimg'.$this->boxcode.'").click(function() {
|
||||
jQuery("#idfilter'.$this->boxcode.'").toggle();
|
||||
|
||||
@ -227,7 +227,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
||||
|
||||
if (!$mesg) {
|
||||
$stringtoshow = '';
|
||||
$stringtoshow .= '<script type="text/javascript" language="javascript">
|
||||
$stringtoshow .= '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#idsubimg'.$this->boxcode.'").click(function() {
|
||||
jQuery("#idfilter'.$this->boxcode.'").toggle();
|
||||
|
||||
@ -352,7 +352,7 @@ class box_graph_product_distribution extends ModeleBoxes
|
||||
|
||||
if (!$mesg) {
|
||||
$stringtoshow = '';
|
||||
$stringtoshow .= '<script type="text/javascript" language="javascript">
|
||||
$stringtoshow .= '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#idsubimg'.$this->boxcode.'").click(function() {
|
||||
jQuery("#idfilter'.$this->boxcode.'").toggle();
|
||||
|
||||
@ -231,7 +231,7 @@ class box_graph_propales_permonth extends ModeleBoxes
|
||||
|
||||
if (!$mesg) {
|
||||
$stringtoshow = '';
|
||||
$stringtoshow .= '<script type="text/javascript" language="javascript">
|
||||
$stringtoshow .= '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#idsubimg'.$this->boxcode.'").click(function() {
|
||||
jQuery("#idfilter'.$this->boxcode.'").toggle();
|
||||
|
||||
@ -126,7 +126,7 @@ class box_task extends ModeleBoxes
|
||||
$boxcontent .= '</form>'."\n";
|
||||
$boxcontent .= '</div>'."\n";
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
$boxcontent .= '<script type="text/javascript" language="javascript">
|
||||
$boxcontent .= '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#idsubimg'.$this->boxcode.'").click(function() {
|
||||
jQuery(".showiffilter'.$this->boxcode.'").toggle();
|
||||
|
||||
@ -244,7 +244,7 @@ class DolEditor
|
||||
$out .= '<div class="aceeditorstatusbar" id="statusBar'.$this->htmlname.'">'.$titlecontent;
|
||||
$out .= ' - <a id="morelines" href="#" class="right morelines'.$this->htmlname.' reposition">'.dol_escape_htmltag($langs->trans("ShowMoreLines")).'</a> ';
|
||||
$out .= '</div>';
|
||||
$out .= '<script type="text/javascript" language="javascript">'."\n";
|
||||
$out .= '<script type="text/javascript">'."\n";
|
||||
$out .= 'jQuery(document).ready(function() {'."\n";
|
||||
$out .= ' var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid");
|
||||
var StatusBar = window.ace.require("ace/ext/statusbar").StatusBar; // Init status bar. Need lib ext-statusbar
|
||||
@ -281,7 +281,7 @@ class DolEditor
|
||||
$out .= htmlspecialchars($this->content);
|
||||
$out .= '</textarea>';
|
||||
|
||||
$out .= '<script type="text/javascript" language="javascript">'."\n";
|
||||
$out .= '<script type="text/javascript">'."\n";
|
||||
$out .= 'var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid");
|
||||
|
||||
aceEditor.session.setMode("ace/mode/'.$format.'");
|
||||
|
||||
@ -2173,7 +2173,7 @@ class Form
|
||||
// Method with no ajax
|
||||
if ($action != 'view') {
|
||||
$out .= '<input type="hidden" class="removedassignedhidden" name="removedassigned" value="">';
|
||||
$out .= '<script type="text/javascript" language="javascript">jQuery(document).ready(function () {';
|
||||
$out .= '<script type="text/javascript">jQuery(document).ready(function () {';
|
||||
$out .= 'jQuery(".removedassigned").click(function() { jQuery(".removedassignedhidden").val(jQuery(this).val()); });';
|
||||
$out .= 'jQuery(".assignedtouser").change(function() { console.log(jQuery(".assignedtouser option:selected").val());';
|
||||
$out .= ' if (jQuery(".assignedtouser option:selected").val() > 0) { jQuery("#'.$action.'assignedtouser").attr("disabled", false); }';
|
||||
|
||||
@ -67,7 +67,7 @@ class FormBarCode
|
||||
$disable = '';
|
||||
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
jQuery("#select'.$idForm.'").change(function() {
|
||||
var formName = document.getElementById("form'.$idForm.'");
|
||||
|
||||
@ -783,7 +783,7 @@ class FormMail extends Form
|
||||
if (is_numeric($this->withfile)) {
|
||||
// TODO Trick to have param removedfile containing nb of file to delete. But this does not works without javascript
|
||||
$out .= '<input type="hidden" class="removedfilehidden" name="removedfile" value="">'."\n";
|
||||
$out .= '<script type="text/javascript" language="javascript">';
|
||||
$out .= '<script type="text/javascript">';
|
||||
$out .= 'jQuery(document).ready(function () {';
|
||||
$out .= ' jQuery(".removedfile").click(function() {';
|
||||
$out .= ' jQuery(".removedfilehidden").val(jQuery(this).val());';
|
||||
@ -978,7 +978,7 @@ class FormMail extends Form
|
||||
|
||||
// Disable enter key if option MAIN_MAILFORM_DISABLE_ENTERKEY is set
|
||||
if (!empty($conf->global->MAIN_MAILFORM_DISABLE_ENTERKEY)) {
|
||||
$out .= '<script type="text/javascript" language="javascript">';
|
||||
$out .= '<script type="text/javascript">';
|
||||
$out .= 'jQuery(document).ready(function () {';
|
||||
$out .= ' $(document).on("keypress", \'#mailform\', function (e) { /* Note this is called at every key pressed ! */
|
||||
var code = e.keyCode || e.which;
|
||||
|
||||
@ -1194,7 +1194,7 @@ class FormOther
|
||||
|
||||
// Javascript code for dynamic actions
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
$selectboxlist .= '<script type="text/javascript" language="javascript">
|
||||
$selectboxlist .= '<script type="text/javascript">
|
||||
|
||||
// To update list of activated boxes
|
||||
function updateBoxOrder(closing) {
|
||||
|
||||
@ -127,7 +127,7 @@ class FormSms
|
||||
print "\n<!-- Begin form SMS -->\n";
|
||||
|
||||
print '
|
||||
<script language="javascript">
|
||||
<script type="text/javascript">
|
||||
function limitChars(textarea, limit, infodiv)
|
||||
{
|
||||
var text = textarea.value;
|
||||
|
||||
@ -366,7 +366,7 @@ class FormTicket
|
||||
$out .= '<td>';
|
||||
// TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
|
||||
$out .= '<input type="hidden" class="removedfilehidden" name="removedfile" value="">'."\n";
|
||||
$out .= '<script type="text/javascript" language="javascript">';
|
||||
$out .= '<script type="text/javascript">';
|
||||
$out .= 'jQuery(document).ready(function () {';
|
||||
$out .= ' jQuery(".removedfile").click(function() {';
|
||||
$out .= ' jQuery(".removedfilehidden").val(jQuery(this).val());';
|
||||
@ -1204,7 +1204,7 @@ class FormTicket
|
||||
$send_email = GETPOST('send_email', 'int') ? GETPOST('send_email', 'int') : 0;
|
||||
|
||||
// Example 1 : Adding jquery code
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
send_email=' . $send_email.';
|
||||
if (send_email) {
|
||||
@ -1404,7 +1404,7 @@ class FormTicket
|
||||
$out .= '<td>';
|
||||
// TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
|
||||
$out .= '<input type="hidden" class="removedfilehidden" name="removedfile" value="">'."\n";
|
||||
$out .= '<script type="text/javascript" language="javascript">';
|
||||
$out .= '<script type="text/javascript">';
|
||||
$out .= 'jQuery(document).ready(function () {';
|
||||
$out .= ' jQuery(".removedfile").click(function() {';
|
||||
$out .= ' jQuery(".removedfilehidden").val(jQuery(this).val());';
|
||||
|
||||
@ -457,7 +457,7 @@ class SimpleOpenID
|
||||
// phpcs:enable
|
||||
$redirect_to = $this->GetRedirectURL();
|
||||
if (headers_sent()) { // Use JavaScript to redirect if content has been previously sent (not recommended, but safe)
|
||||
echo '<script language="JavaScript" type="text/javascript">window.location=\'';
|
||||
echo '<script type="text/javascript">window.location=\'';
|
||||
echo $redirect_to;
|
||||
echo '\';</script>';
|
||||
} else { // Default Header Redirect
|
||||
|
||||
@ -351,7 +351,7 @@ print $form->selectarray('objecttype', $newarrayoftype, $objecttype, 0, 0, 0, ''
|
||||
if (empty($conf->use_javascript_ajax)) {
|
||||
print '<input type="submit" class="button buttongen button-save" name="changeobjecttype" value="'.$langs->trans("Refresh").'">';
|
||||
} else {
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#objecttype").change(function() {
|
||||
console.log("Reload for "+jQuery("#objecttype").val());
|
||||
|
||||
@ -451,7 +451,7 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
|
||||
}
|
||||
|
||||
//if (!empty($conf->use_javascript_ajax)) { // use_javascript_ajax is not defined
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_trrunsql()
|
||||
{
|
||||
|
||||
@ -1569,7 +1569,7 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di
|
||||
//print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("MediaFiles")).'" name="file_manager">';
|
||||
$out = '<a class="button bordertransp button_'.$name.'"'.$disabled.' title="'.dol_escape_htmltag($label).'">'.$buttonstring.'</a>';
|
||||
$out .= '<!-- Add js code to open dialog popup on dialog -->';
|
||||
$out .= '<script language="javascript">
|
||||
$out .= '<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
jQuery(".button_'.$name.'").click(function () {
|
||||
console.log("Open popup with jQuery(...).dialog() on URL '.dol_escape_js(DOL_URL_ROOT.$url).'")
|
||||
@ -4490,7 +4490,7 @@ function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss
|
||||
|
||||
if ($textfordropdown) {
|
||||
$tmpresult = '<span class="'.$class.'text opacitymedium cursorpointer">'.$langs->trans($textfordropdown).' '.img_picto($langs->trans($textfordropdown), '1downarrow').'</span>';
|
||||
$tmpresult .= '<script type="text/javascript" language="javascript">
|
||||
$tmpresult .= '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery(".'.$class.'text").click(function() {
|
||||
console.log("toggle text");
|
||||
|
||||
@ -121,7 +121,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset
|
||||
|
||||
if ($rang == 0) {
|
||||
// Test also done with jstree and dynatree (not able to have <a> inside label)
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#'.$iddivjstree.'").treeview({
|
||||
collapsed: true,
|
||||
|
||||
@ -589,7 +589,7 @@ if (!empty($conf->use_javascript_ajax)) {
|
||||
}
|
||||
|
||||
/* Check that mandatory fields are filled */
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
$("#submitcrop").click(function(e) {
|
||||
console.log("We click on submitcrop");
|
||||
|
||||
@ -13,7 +13,7 @@ if (isset($totalarray['pos'])) {
|
||||
while ($i < $totalarray['nbfield']) {
|
||||
$i++;
|
||||
if (!empty($totalarray['pos'][$i])) {
|
||||
print '<td class="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
|
||||
print '<td class="right">'.price(!empty($totalarray['val'][$totalarray['pos'][$i]])?$totalarray['val'][$totalarray['pos'][$i]]:0).'</td>';
|
||||
} else {
|
||||
if ($i == 1) {
|
||||
if (is_null($limit) || $num < $limit) {
|
||||
|
||||
@ -263,7 +263,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
function initfields()
|
||||
{
|
||||
|
||||
@ -162,7 +162,7 @@ if ($action == 'create') {
|
||||
print load_fiche_titre($langs->trans("DoPayment"));
|
||||
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
//Add js for AutoFill
|
||||
print ' $(document).ready(function () {';
|
||||
print ' $(".AutoFillAmout").on(\'click touchstart\', function(){
|
||||
|
||||
@ -494,7 +494,7 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje
|
||||
$sql .= preg_replace('/^,/', '', $hookmanager->resPrint);
|
||||
$sql = preg_replace('/,\s*$/', '', $sql);
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
|
||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.id = ef.fk_object)";
|
||||
}
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_actioncomm as cact ON cact.id=t.fk_action AND cact.module LIKE '%@eventorganization'";
|
||||
@ -773,7 +773,7 @@ print '</tr>'."\n";
|
||||
|
||||
// Detect if we need a fetch on each output line
|
||||
$needToFetchEachLine = 0;
|
||||
if (is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) {
|
||||
if (!empty($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) {
|
||||
if (preg_match('/\$object/', $val)) {
|
||||
$needToFetchEachLine++; // There is at least one compute field that use $object
|
||||
@ -797,6 +797,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
|
||||
// Show here line of result
|
||||
print '<tr class="oddeven">';
|
||||
$totalarray['nbfield'] = 0;
|
||||
foreach ($object->fields as $key => $val) {
|
||||
$cssforfield = (empty($val['css']) ? '' : $val['css']);
|
||||
if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
|
||||
|
||||
@ -1021,7 +1021,7 @@ if ($action == 'create') {
|
||||
|
||||
$numAsked = count($object->lines);
|
||||
|
||||
print '<script type="text/javascript" language="javascript">'."\n";
|
||||
print '<script type="text/javascript">'."\n";
|
||||
print 'jQuery(document).ready(function() {'."\n";
|
||||
print 'jQuery("#autofill").click(function() {';
|
||||
$i = 0;
|
||||
|
||||
@ -2250,7 +2250,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
print '<!-- Code to open/close section to submit or link files in edit mode -->'."\n";
|
||||
print '<script language="javascript">'."\n";
|
||||
print '<script type="text/javascript">'."\n";
|
||||
print '$(document).ready(function() {
|
||||
$( ".auploadnewfilenow" ).click(function() {
|
||||
jQuery(".truploadnewfilenow").toggle();
|
||||
@ -2405,7 +2405,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
print '<!-- Code to open/close section to submit or link files in the form to add new line -->'."\n";
|
||||
print '<script language="javascript">'."\n";
|
||||
print '<script type="text/javascript">'."\n";
|
||||
print '$(document).ready(function() {
|
||||
$( ".auploadnewfilenow" ).click(function() {
|
||||
console.log("We click on toggle of auploadnewfilenow");
|
||||
|
||||
@ -170,7 +170,7 @@ if ($action == 'create' || empty($action)) {
|
||||
|
||||
// autofill remainder amount
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
//Add js for AutoFill
|
||||
print ' $(document).ready(function () {';
|
||||
print ' $(".AutoFillAmount").on(\'click touchstart\', function(){
|
||||
|
||||
@ -765,7 +765,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf";
|
||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (cf.rowid = ef.fk_object)";
|
||||
}
|
||||
if ($sall || $search_product_category > 0) {
|
||||
|
||||
@ -1995,7 +1995,7 @@ if ($action == 'create') {
|
||||
if (empty($conf->global->INVOICE_DISABLE_DEPOSIT)) {
|
||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> ';
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#typestandardinvoice, #valuestandardinvoice").click(function() {
|
||||
jQuery("#radio_standard").prop("checked", true);
|
||||
@ -2077,7 +2077,7 @@ if ($action == 'create') {
|
||||
$tmp='<input type="radio" name="type" id="radio_replacement" value="1"' . (GETPOST('type') == 1 ? ' checked' : '');
|
||||
if (! $options) $tmp.=' disabled';
|
||||
$tmp.='> ';
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#fac_replacement").change(function() {
|
||||
jQuery("#radio_replacement").prop("checked", true);
|
||||
@ -2149,7 +2149,7 @@ if ($action == 'create') {
|
||||
}
|
||||
$tmp .= '> ';
|
||||
// Show credit note options only if we checked credit note
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
if (! jQuery("#radio_creditnote").is(":checked"))
|
||||
{
|
||||
|
||||
@ -383,7 +383,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
// Add realtime total information
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print '$(document).ready(function () {
|
||||
|
||||
function _elemToJson(selector)
|
||||
@ -532,7 +532,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
//Add js for AutoFill
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print ' $(document).ready(function () {';
|
||||
print ' $(".AutoFillAmout").on(\'click touchstart\', function(){
|
||||
$("input[name="+$(this).data(\'rowname\')+"]").val($(this).data("value"));
|
||||
|
||||
@ -1178,7 +1178,7 @@ if ($step == 4 && $datatoimport) {
|
||||
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print '<script type="text/javascript" language="javascript">';
|
||||
print '<script type="text/javascript">';
|
||||
print 'jQuery(function() {
|
||||
jQuery("#left, #right").sortable({
|
||||
/* placeholder: \'ui-state-highlight\', */
|
||||
|
||||
@ -791,7 +791,7 @@ class wsdl extends nusoap_base {
|
||||
a:visited { color: #666666; font-weight: bold; }
|
||||
a:hover { color: cc3300; font-weight: bold; }
|
||||
</style>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// POP-UP CAPTIONS...
|
||||
function lib_bwcheck(){ //Browsercheck (needed)
|
||||
|
||||
@ -5370,7 +5370,7 @@ class wsdl extends nusoap_base {
|
||||
a:visited { color: #666666; font-weight: bold; }
|
||||
a:hover { color: cc3300; font-weight: bold; }
|
||||
</style>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// POP-UP CAPTIONS...
|
||||
function lib_bwcheck(){ //Browsercheck (needed)
|
||||
|
||||
@ -598,7 +598,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
|
||||
}
|
||||
|
||||
//if (!empty($conf->use_javascript_ajax)) { // use_javascript_ajax is not defined
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_trrunsql()
|
||||
{
|
||||
|
||||
@ -187,7 +187,7 @@ $morehtmlright = '';
|
||||
dol_banner_tab($object, 'loanid', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright);
|
||||
|
||||
?>
|
||||
<script type="text/javascript" language="javascript">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('[name^="mens"]').focusout(function() {
|
||||
var echeance=$(this).attr('ech');
|
||||
|
||||
@ -212,7 +212,7 @@ $help_url = '';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
// Example : Adding jquery code
|
||||
// print '<script type="text/javascript" language="javascript">
|
||||
// print '<script type="text/javascript">
|
||||
// jQuery(document).ready(function() {
|
||||
// function init_myfunc()
|
||||
// {
|
||||
|
||||
@ -406,7 +406,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
|
||||
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', '');
|
||||
|
||||
// Example : Adding jquery code
|
||||
// print '<script type="text/javascript" language="javascript">
|
||||
// print '<script type="text/javascript">
|
||||
// jQuery(document).ready(function() {
|
||||
// function init_myfunc()
|
||||
// {
|
||||
|
||||
@ -218,7 +218,7 @@ function print_paybox_redirect($PRICE, $CURRENCY, $EMAIL, $urlok, $urlko, $TAG)
|
||||
|
||||
|
||||
print "\n";
|
||||
print '<script type="text/javascript" language="javascript">'."\n";
|
||||
print '<script type="text/javascript">'."\n";
|
||||
print ' document.Submit.submit();'."\n";
|
||||
print '</script>'."\n";
|
||||
print "\n";
|
||||
|
||||
@ -311,7 +311,7 @@ llxHeader('', $langs->trans('Inventory'), $help_url);
|
||||
|
||||
|
||||
// Disable button Generate movement if data were modified and not saved
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
function disablebuttonmakemovementandclose() {
|
||||
console.log("Disable button idbuttonmakemovementandclose until we save");
|
||||
jQuery("#idbuttonmakemovementandclose").attr(\'disabled\',\'disabled\');
|
||||
@ -813,7 +813,7 @@ if ($object->id > 0) {
|
||||
// Call method to disable the button if no qty entered yet for inventory
|
||||
|
||||
if ($object->status != $object::STATUS_VALIDATED || !$hasinput) {
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
console.log("Call disablebuttonmakemovementandclose because status = '.((int) $object->status).' or $hasinput = '.((int) $hasinput).'");
|
||||
disablebuttonmakemovementandclose();
|
||||
|
||||
@ -552,7 +552,7 @@ if ($id > 0 || $ref) {
|
||||
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
?>
|
||||
<script type="text/javascript" language="javascript">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$(".collapse_batch").click(function() {
|
||||
console.log("We click on collapse_batch");
|
||||
|
||||
@ -41,7 +41,7 @@ if (empty($id)) {
|
||||
$id = $object->id;
|
||||
}
|
||||
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_price()
|
||||
{
|
||||
|
||||
@ -77,6 +77,9 @@ $search_project_ref = GETPOST('search_project_ref', 'alpha');
|
||||
$search_thirdparty = GETPOST('search_thirdparty', 'alpha');
|
||||
$search_declared_progress = GETPOST('search_declared_progress', 'alpha');
|
||||
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
|
||||
$monthofday = GETPOST('addtimemonth');
|
||||
$dayofday = GETPOST('addtimeday');
|
||||
$yearofday = GETPOST('addtimeyear');
|
||||
@ -127,7 +130,7 @@ $arrayfields['timeconsumed'] = array('label'=>'TimeConsumed', 'checked'=>1, 'ena
|
||||
);
|
||||
*/
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) {
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||
if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) {
|
||||
$arrayfields["efpt.".$key] = array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs((int) $extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key]));
|
||||
@ -612,6 +615,8 @@ print '<th class="center leftborder">'.$langs->trans("HourStart").'</td>';
|
||||
// By default, we can edit only tasks we are assigned to
|
||||
$restrictviewformytask = ((!isset($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED)) ? 2 : $conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED);
|
||||
|
||||
$numendworkingday = 0;
|
||||
$numstartworkingday = 0;
|
||||
// Get if user is available or not for each day
|
||||
$isavailable = array();
|
||||
if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)) {
|
||||
@ -776,7 +781,7 @@ print '</div>';
|
||||
print '<input type="hidden" id="numberOfLines" name="numberOfLines" value="'.count($tasksarray).'"/>'."\n";
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" name="button_addtime" class="button button-save"'.($disabledtask ? ' disabled' : '').' value="'.$langs->trans("Save").'">';
|
||||
print '<input type="submit" name="button_addtime" class="button button-save"'.(!empty($disabledtask) ? ' disabled' : '').' value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
@ -77,6 +77,9 @@ $search_project_ref = GETPOST('search_project_ref', 'alpha');
|
||||
$search_thirdparty = GETPOST('search_thirdparty', 'alpha');
|
||||
$search_declared_progress = GETPOST('search_declared_progress', 'alpha');
|
||||
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
|
||||
$startdayarray = dol_get_first_day_week($day, $month, $year);
|
||||
|
||||
$prev = $startdayarray;
|
||||
@ -135,7 +138,7 @@ $arrayfields['timeconsumed'] = array('label'=>'TimeConsumed', 'checked'=>1, 'ena
|
||||
}*/
|
||||
// Definition of fields for list
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attributes['projet_task']['label']) && count($extrafields->attributes['projet_task']['label']) > 0) {
|
||||
if (!empty($extrafields->attributes['projet_task']['label']) && is_array($extrafields->attributes['projet_task']['label']) && count($extrafields->attributes['projet_task']['label']) > 0) {
|
||||
foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) {
|
||||
if (!empty($extrafields->attributes['projet_task']['list'][$key])) {
|
||||
$arrayfields["efpt.".$key] = array('label'=>$extrafields->attributes['projet_task']['label'][$key], 'checked'=>(($extrafields->attributes['projet_task']['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes['projet_task']['pos'][$key], 'enabled'=>(abs((int) $extrafields->attributes['projet_task']['list'][$key]) != 3 && $extrafields->attributes['projet_task']['perms'][$key]));
|
||||
@ -501,6 +504,8 @@ print '<div class="clearboth" style="padding-bottom: 20px;"></div>';
|
||||
|
||||
$startday = dol_mktime(12, 0, 0, $startdayarray['first_month'], $startdayarray['first_day'], $startdayarray['first_year']);
|
||||
|
||||
$numendworkingday = 0;
|
||||
$numstartworkingday = 0;
|
||||
// Get if user is available or not for each day
|
||||
$isavailable = array();
|
||||
if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)) {
|
||||
|
||||
@ -712,7 +712,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
print '</form>';
|
||||
|
||||
// Change probability from status
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function change_percent()
|
||||
{
|
||||
@ -1170,7 +1170,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
}
|
||||
|
||||
print '<!-- Javascript to manage opportunity status change -->';
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function change_percent()
|
||||
{
|
||||
|
||||
@ -74,6 +74,7 @@ if ($mine) {
|
||||
$search_task_user = $user->id;
|
||||
$mine = 0;
|
||||
}
|
||||
$type = GETPOST('type');
|
||||
|
||||
$search_date_startday = GETPOST('search_date_startday', 'int');
|
||||
$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
|
||||
|
||||
@ -2311,7 +2311,7 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme
|
||||
print '<!-- urllogofull = '.$urllogofull.' -->'."\n";
|
||||
|
||||
// Code to ask the credit card. This use the default "API version". No way to force API version when using JS code.
|
||||
print '<script type="text/javascript" language="javascript">'."\n";
|
||||
print '<script type="text/javascript">'."\n";
|
||||
|
||||
if (!empty($conf->global->STRIPE_USE_NEW_CHECKOUT)) {
|
||||
$amountstripe = $amount;
|
||||
|
||||
@ -153,7 +153,7 @@ This page is a sample of page using tables. It is designed to make test with<br>
|
||||
<br><hr><br>Example 1 : Standard table/thead/tbody/tr/th-td (no class pair/impair on td) => Use this if you need the drag and drop for lines or for long result tables<br>
|
||||
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
<script type="text/javascript">
|
||||
/*jQuery(document).ready(function() {
|
||||
$(document).ready(function() {
|
||||
var table = $('#tablelines3').DataTable( {
|
||||
|
||||
@ -969,7 +969,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#autofill").click(function() {';
|
||||
$i = 1;
|
||||
|
||||
@ -56,8 +56,8 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
||||
} ?>
|
||||
</td>
|
||||
<td class="linkedcol-name nowraponall" ><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||
<td class="linkedcol-ref center"></td>
|
||||
<td class="linkedcol-date center"><?php echo dol_print_date($objectlink->date_delivery, 'day'); ?></td>
|
||||
<td class="linkedcol-ref"></td>
|
||||
<td class="linkedcol-date"><?php echo dol_print_date($objectlink->date_delivery, 'day'); ?></td>
|
||||
<td class="linkedcol-amount right"><?php
|
||||
if ($user->rights->reception->lire) {
|
||||
$total = $total + $objectlink->total_ht;
|
||||
|
||||
@ -484,7 +484,7 @@ if ($action == 'create') {
|
||||
print load_fiche_titre($langs->trans("NewSalary"), '', 'salary');
|
||||
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print /** @lang JavaScript */'
|
||||
$(document).ready(function () {
|
||||
let onAutoCreatePaiementChange = function () {
|
||||
|
||||
@ -163,7 +163,7 @@ if ($action == 'create') {
|
||||
|
||||
$total = $salary->amount;
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print "\n".'<script type="text/javascript">';
|
||||
|
||||
//Add js for AutoFill
|
||||
print ' $(document).ready(function () {';
|
||||
|
||||
@ -118,7 +118,7 @@ abstract class ActionsCardCommon
|
||||
|
||||
if ($action == 'create') {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
$this->tpl['ajax_selecttype'] = "\n".'<script type="text/javascript" language="javascript">
|
||||
$this->tpl['ajax_selecttype'] = "\n".'<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$("#radiocompany").click(function() {
|
||||
document.formsoc.action.value="create";
|
||||
@ -139,7 +139,7 @@ abstract class ActionsCardCommon
|
||||
|
||||
if ($action == 'create' || $action == 'edit') {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
$this->tpl['ajax_selectcountry'] = "\n".'<script type="text/javascript" language="javascript">
|
||||
$this->tpl['ajax_selectcountry'] = "\n".'<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$("#selectcountry_id").change(function() {
|
||||
document.formsoc.action.value="'.$action.'";
|
||||
|
||||
@ -103,7 +103,7 @@ class ActionsCardCompany extends ActionsCardCommon
|
||||
|
||||
if ($conf->use_javascript_ajax && empty($conf->global->MAIN_DISABLEVATCHECK)) {
|
||||
$js = "\n";
|
||||
$js .= '<script language="JavaScript" type="text/javascript">';
|
||||
$js .= '<script type="text/javascript">';
|
||||
$js .= "function CheckVAT(a) {\n";
|
||||
$js .= "newpopup('".DOL_URL_ROOT."/societe/checkvat/checkVatPopup.php?vatNumber='+a,'".dol_escape_js($langs->trans("VATIntraCheckableOnEUSite"))."',500,230);\n";
|
||||
$js .= "}\n";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user