diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index c2469655df6..eaebb294cac 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3189,7 +3189,7 @@ if ($action == 'create') { $arrayoutstandingbills = $soc->getOutstandingBills(); $outstandingBills = $arrayoutstandingbills['opened']; print ' - '.$langs->trans('CurrentOutstandingBill').': '; - print price($outstandingBills, '', $langs, 0, 0, -1, $conf->currency); + print ''.price($outstandingBills, '', $langs, 0, 0, -1, $conf->currency).''; if ($soc->outstanding_limit != '') { if ($outstandingBills > $soc->outstanding_limit) { print img_warning($langs->trans("OutstandingBillReached")); @@ -3308,7 +3308,7 @@ if ($action == 'create') { print '
'; $tmp = ' '; $tmp = $tmp.''; - $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3); + $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3, 'standardonsmartphone'); print ''; print '
'; print $desc; @@ -3347,7 +3347,7 @@ if ($action == 'create') { jQuery("#radio_deposit").prop("checked", true); setRadioForTypeOfIncoice(); }); - jQuery("#radio_standard, #radio_deposit, #radio_replacement, #radio_template").change(function() { + jQuery("#radio_standard, #radio_deposit, #radio_replacement, #radio_creditnote, #radio_template").change(function() { setRadioForTypeOfIncoice(); }); function setRadioForTypeOfIncoice() { @@ -3363,10 +3363,10 @@ if ($action == 'create') { }); '; - $tmp = $tmp.''; - $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3); print ''; print ''; if (($origin == 'propal') || ($origin == 'commande')) { @@ -3405,7 +3405,7 @@ if ($action == 'create') { print '
'; $tmp = ' '; $tmp = $tmp.''; - $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); + $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3, 'firstsituationonsmartphone'); print $desc; print '
'; @@ -3418,7 +3418,7 @@ if ($action == 'create') { $tmp .= ' disabled'; } $tmp .= '> '; - $text = ' '; + $text = $tmp.' '; $text .= 'id > 0) { $text .= ' disabled'; @@ -3487,26 +3487,18 @@ if ($action == 'create') { if (!empty($conf->global->INVOICE_USE_SITUATION)) { print '
'; $tmp = ' '; - $text = ' '; + $text = $tmp.' '; $text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); - print $desc; - print '
'; - - print '
'; - $tmp = ' '; - $text = ' '; - $text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); + $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3, 'firstsituationonsmartphone'); print $desc; print '
'; } print '
'; $tmp = ' '; - $text = ' '; - $text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3); + $text = $tmp.' '; + //$text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; + $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc").'

'.$langs->trans("YouMustCreateInvoiceFromThird"), 1, 'help', '', 0, 3, 'replacementonsmartphone'); print $desc; print '
'; } @@ -3566,7 +3558,6 @@ if ($action == 'create') { }); '; $text = ' '; - // $text.=''; $text .= ' 0 ? 'checked' : '').' /> "; print '
    0 ? 'checked' : '').' /> "; print ''; @@ -3596,9 +3587,9 @@ if ($action == 'create') { } else { $tmp = ' '; } - $text = ' '; - $text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); + $text = $tmp.' '; + //$text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; + $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc").'

'.$langs->trans("YouMustCreateInvoiceFromThird"), 1, 'help', '', 0, 3, 'creditnoteonsmartphone'); print $desc; print ''."\n"; } @@ -3607,9 +3598,8 @@ if ($action == 'create') { // Template invoice print '
'; $tmp = ' '; - $text = ' '; - //$text.= '('.$langs->trans("YouMustCreateStandardInvoiceFirst").') '; - $desc = $form->textwithpicto($text, $langs->transnoentities("YouMustCreateStandardInvoiceFirstDesc"), 1, 'help', '', 0, 3); + $text = $tmp.' '; + $desc = $form->textwithpicto($text, $langs->transnoentities("YouMustCreateStandardInvoiceFirstDesc"), 1, 'help', '', 0, 3, 'templateonsmartphone'); print $desc; print '
'; @@ -3630,7 +3620,8 @@ if ($action == 'create') { $(document).ready(function() { var listType = {'.$jsListType.'}; $("[name=\'type\'").change(function() { - if($( this ).prop("checked")) + console.log("change name=type"); + if ($( this ).prop("checked")) { if(($( this ).val() in listType)) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a672709cc48..62fee2bc8ec 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -709,7 +709,7 @@ class Form * @param string $extracss Add a CSS style to td, div or span tag * @param int $noencodehtmltext Do not encode into html entity the htmltext * @param int $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span - * @param string $tooltiptrigger ''=Tooltip on hover, 'abc'=Tooltip on click (abc is a unique key, clickable link is on image or on link if param $type='none' or on both if $type='xxxclickable') + * @param string $tooltiptrigger ''=Tooltip on hover and hidden on smartphone, 'abconsmartphone'=Tooltip on hover and on click on smartphone, 'abc'=Tooltip on click (abc is a unique key, clickable link is on image or on link if param $type='none' or on both if $type='xxxclickable') * @param int $forcenowrap Force no wrap between text and picto (works with notabs=2 only) * @return string HTML code of text, picto, tooltip */ @@ -717,11 +717,6 @@ class Form { global $conf, $langs; - $alt = ''; - if ($tooltiptrigger) { - $alt = $langs->transnoentitiesnoconv("ClickToShowHelp"); - } - //For backwards compatibility if ($type == '0') { $type = 'info'; @@ -729,6 +724,15 @@ class Form $type = 'help'; } + if (preg_match('/onsmartphone$/', $tooltiptrigger) && empty($conf->dol_no_mouse_hover)) { + $tooltiptrigger = preg_replace('/^.*onsmartphone$/', '', $tooltiptrigger); + } + + $alt = ''; + if ($tooltiptrigger) { + $alt = $langs->transnoentitiesnoconv("ClickToShowHelp"); + } + // If info or help with no javascript, show only text if (empty($conf->use_javascript_ajax)) { if ($type == 'info' || $type == 'infoclickable' || $type == 'help' || $type == 'helpclickable') {
'; + $tmp = $tmp.''; + $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3, 'depositonsmartphone'); print $desc; print '