Fix several pb with javascript
This commit is contained in:
parent
c2568020a5
commit
a6a027f5c4
@ -24,6 +24,7 @@ odtPHP 1.0.1 GPL-2+ b Yes
|
||||
PHPExcel 1.8.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 1.4.6 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
Restler 3.0 LGPL-3+ Yes Library to develop REST Web services
|
||||
TCPDF 6.2.6 LGPL-3+ Yes PDF generation
|
||||
|
||||
JS libraries:
|
||||
|
||||
@ -489,6 +489,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip`;
|
||||
|
||||
@ -3216,7 +3216,7 @@ class Form
|
||||
|
||||
$formconfirm.= "\n<!-- begin ajax form_confirm page=".$page." -->\n";
|
||||
$formconfirm.= '<script type="text/javascript">'."\n";
|
||||
$formconfirm.='
|
||||
$formconfirm.= 'jQuery(document).ready(function() {
|
||||
$(function() {
|
||||
$( "#'.$dialogconfirm.'" ).dialog({
|
||||
autoOpen: '.($autoOpen ? "true" : "false").',';
|
||||
@ -3281,6 +3281,7 @@ class Form
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
$formconfirm.= "<!-- end ajax form_confirm -->\n";
|
||||
}
|
||||
|
||||
@ -718,10 +718,11 @@ class FormCompany
|
||||
* @param string $htmlname HTML select name
|
||||
* @param string $fields Fields
|
||||
* @param int $fieldsize Field size
|
||||
* @param int $disableautocomplete 1 To disable autocomplete features
|
||||
* @param int $disableautocomplete 1 To disable ajax autocomplete features (browser autocomplete may still occurs)
|
||||
* @param string $moreattrib Add more attribute on HTML input field
|
||||
* @return string
|
||||
*/
|
||||
function select_ziptown($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0)
|
||||
function select_ziptown($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0, $moreattrib='')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@ -730,8 +731,12 @@ class FormCompany
|
||||
$size='';
|
||||
if (!empty($fieldsize)) $size='size="'.$fieldsize.'"';
|
||||
|
||||
if ($conf->use_javascript_ajax && empty($disableautocomplete)) $out.= ajax_multiautocompleter($htmlname,$fields,DOL_URL_ROOT.'/core/ajax/ziptown.php')."\n";
|
||||
$out.= '<input id="'.$htmlname.'" type="text" name="'.$htmlname.'" '.$size.' value="'.$selected.'">'."\n";
|
||||
if ($conf->use_javascript_ajax && empty($disableautocomplete))
|
||||
{
|
||||
$out.= ajax_multiautocompleter($htmlname,$fields,DOL_URL_ROOT.'/core/ajax/ziptown.php')."\n";
|
||||
$moreattrib.=' autocomplete="off"';
|
||||
}
|
||||
$out.= '<input id="'.$htmlname.'" type="text"'.($moreattrib?' '.$moreattrib:'').' name="'.$htmlname.'" '.$size.' value="'.$selected.'">'."\n";
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
@ -1582,9 +1582,9 @@ else
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td>'.fieldLabel('Zip','zipcode').'</td><td>';
|
||||
print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6);
|
||||
print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
||||
print '</td><td>'.fieldLabel('Town','town').'</td><td>';
|
||||
print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id'));
|
||||
print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
|
||||
Loading…
Reference in New Issue
Block a user