Look and feel v14
This commit is contained in:
parent
026259ebd7
commit
7e7d393f30
@ -984,6 +984,7 @@ class Form
|
|||||||
print '>'.$langs->trans("Service");
|
print '>'.$langs->trans("Service");
|
||||||
|
|
||||||
print '</select>';
|
print '</select>';
|
||||||
|
print ajax_combobox('select_'.$htmlname);
|
||||||
//if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
//if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||||
}
|
}
|
||||||
if ((empty($forceall) && empty($conf->product->enabled) && !empty($conf->service->enabled)) || $forceall == 3)
|
if ((empty($forceall) && empty($conf->product->enabled) && !empty($conf->service->enabled)) || $forceall == 3)
|
||||||
@ -2753,9 +2754,10 @@ class Form
|
|||||||
* @param int $hidelabel Hide label (0=no, 1=yes)
|
* @param int $hidelabel Hide label (0=no, 1=yes)
|
||||||
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
|
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
|
||||||
* @param string $morecss More CSS
|
* @param string $morecss More CSS
|
||||||
|
* @param string $placeholder Placeholder
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '')
|
public function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '', $placeholder = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
@ -2776,9 +2778,9 @@ class Form
|
|||||||
// mode=2 means suppliers products
|
// mode=2 means suppliers products
|
||||||
$urloption = ($socid > 0 ? 'socid='.$socid.'&' : '').'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished.'&alsoproductwithnosupplierprice='.$alsoproductwithnosupplierprice;
|
$urloption = ($socid > 0 ? 'socid='.$socid.'&' : '').'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished.'&alsoproductwithnosupplierprice='.$alsoproductwithnosupplierprice;
|
||||||
print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
||||||
print ($hidelabel ? '' : $langs->trans("RefOrLabel").' : ').'<input type="text" size="20" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'">';
|
print ($hidelabel ? '' : $langs->trans("RefOrLabel").' : ').'<input type="text" class="minwidth300" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.($placeholder ? ' placeholder="'.$placeholder.'"' : '').'>';
|
||||||
} else {
|
} else {
|
||||||
print $this->select_produits_fournisseurs_list($socid, $selected, $htmlname, $filtertype, $filtre, '', -1, 0, 0, $alsoproductwithnosupplierprice, $morecss);
|
print $this->select_produits_fournisseurs_list($socid, $selected, $htmlname, $filtertype, $filtre, '', -1, 0, 0, $alsoproductwithnosupplierprice, $morecss, 0, $placeholder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2798,9 +2800,10 @@ class Form
|
|||||||
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
|
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
|
||||||
* @param string $morecss Add more CSS
|
* @param string $morecss Add more CSS
|
||||||
* @param int $showstockinlist Show stock information (slower).
|
* @param int $showstockinlist Show stock information (slower).
|
||||||
|
* @param string $placeholder Placeholder
|
||||||
* @return array Array of keys for json
|
* @return array Array of keys for json
|
||||||
*/
|
*/
|
||||||
public function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '', $showstockinlist = 0)
|
public function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '', $showstockinlist = 0, $placeholder = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs, $conf, $db, $user;
|
global $langs, $conf, $db, $user;
|
||||||
@ -2884,9 +2887,9 @@ class Form
|
|||||||
$num = $this->db->num_rows($result);
|
$num = $this->db->num_rows($result);
|
||||||
|
|
||||||
//$out.='<select class="flat" id="select'.$htmlname.'" name="'.$htmlname.'">'; // remove select to have id same with combo and ajax
|
//$out.='<select class="flat" id="select'.$htmlname.'" name="'.$htmlname.'">'; // remove select to have id same with combo and ajax
|
||||||
$out .= '<select class="flat maxwidthonsmartphone'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'">';
|
$out .= '<select class="flat '.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||||
if (!$selected) $out .= '<option value="0" selected> </option>';
|
if (!$selected) $out .= '<option value="-1" selected>'.($placeholder ? $placeholder : ' ').'</option>';
|
||||||
else $out .= '<option value="0"> </option>';
|
else $out .= '<option value="-1">'.($placeholder ? $placeholder : ' ').'</option>';
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
|
|||||||
@ -175,7 +175,7 @@ if ($nolinesbefore) {
|
|||||||
echo ((GETPOST('prod_entry_mode', 'alpha') == 'free' || !empty($conf->global->MAIN_FREE_PRODUCT_CHECKED_BY_DEFAULT)) ? ' checked' : '');
|
echo ((GETPOST('prod_entry_mode', 'alpha') == 'free' || !empty($conf->global->MAIN_FREE_PRODUCT_CHECKED_BY_DEFAULT)) ? ' checked' : '');
|
||||||
echo '> ';
|
echo '> ';
|
||||||
// Show type selector
|
// Show type selector
|
||||||
echo $langs->trans("FreeLineOfType");
|
echo '<span class="textradioforitem">'.$langs->trans("FreeLineOfType").'</span>';
|
||||||
echo '</label>';
|
echo '</label>';
|
||||||
echo ' ';
|
echo ' ';
|
||||||
} else {
|
} else {
|
||||||
@ -194,20 +194,25 @@ if ($nolinesbefore) {
|
|||||||
// Predefined product/service
|
// Predefined product/service
|
||||||
if (!empty($conf->product->enabled) || !empty($conf->service->enabled))
|
if (!empty($conf->product->enabled) || !empty($conf->service->enabled))
|
||||||
{
|
{
|
||||||
if ($forceall >= 0 && $freelines) echo '<br>';
|
if ($forceall >= 0 && $freelines) echo '<br><span class="prod_entry_mode_predef paddingtop">';
|
||||||
echo '<span class="prod_entry_mode_predef">';
|
else echo '<span class="prod_entry_mode_predef">';
|
||||||
echo '<label for="prod_entry_mode_predef">';
|
echo '<label for="prod_entry_mode_predef">';
|
||||||
echo '<input type="radio" class="prod_entry_mode_predef" name="prod_entry_mode" id="prod_entry_mode_predef" value="predef"'.(GETPOST('prod_entry_mode') == 'predef' ? ' checked' : '').'> ';
|
echo '<input type="radio" class="prod_entry_mode_predef" name="prod_entry_mode" id="prod_entry_mode_predef" value="predef"'.(GETPOST('prod_entry_mode') == 'predef' ? ' checked' : '').'> ';
|
||||||
if (empty($senderissupplier))
|
$labelforradio = '';
|
||||||
{
|
if (empty($conf->dol_optimize_smallscreen)) {
|
||||||
if (!empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToSell');
|
if (empty($senderissupplier)) {
|
||||||
elseif ((empty($conf->product->enabled) && !empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) echo $langs->trans('PredefinedServicesToSell');
|
if (!empty($conf->product->enabled) && empty($conf->service->enabled)) $labelforradio = $langs->trans('PredefinedProductsToSell');
|
||||||
else echo $langs->trans('PredefinedProductsAndServicesToSell');
|
elseif ((empty($conf->product->enabled) && !empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) $labelforradio = $langs->trans('PredefinedServicesToSell');
|
||||||
|
else $labelforradio = $langs->trans('PredefinedProductsAndServicesToSell');
|
||||||
} else {
|
} else {
|
||||||
if (!empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToPurchase');
|
if (!empty($conf->product->enabled) && empty($conf->service->enabled)) $labelforradio = $langs->trans('PredefinedProductsToPurchase');
|
||||||
elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) echo $langs->trans('PredefinedServicesToPurchase');
|
elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) $labelforradio = $langs->trans('PredefinedServicesToPurchase');
|
||||||
else echo $langs->trans('PredefinedProductsAndServicesToPurchase');
|
else $labelforradio = $langs->trans('PredefinedProductsAndServicesToPurchase');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$labelforradio = $langs->trans('PredefinedItem');
|
||||||
|
}
|
||||||
|
print '<span class="textradioforitem">'.$labelforradio.'</span>';
|
||||||
echo '</label>';
|
echo '</label>';
|
||||||
echo ' ';
|
echo ' ';
|
||||||
$filtertype = '';
|
$filtertype = '';
|
||||||
@ -255,7 +260,7 @@ if ($nolinesbefore) {
|
|||||||
);
|
);
|
||||||
$alsoproductwithnosupplierprice = 1;
|
$alsoproductwithnosupplierprice = 1;
|
||||||
}
|
}
|
||||||
$form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1, $alsoproductwithnosupplierprice, 'maxwidth500');
|
$form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1, $alsoproductwithnosupplierprice, 'minwidth300imp maxwidth500');
|
||||||
if (!empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_SUPPLIER_PRODUCTS))
|
if (!empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_SUPPLIER_PRODUCTS))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product)
|
|||||||
DiscountQtyMin=Discount for this qty.
|
DiscountQtyMin=Discount for this qty.
|
||||||
NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product
|
NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product
|
||||||
NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product
|
NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product
|
||||||
|
PredefinedItem=Predefined item
|
||||||
PredefinedProductsToSell=Predefined Product
|
PredefinedProductsToSell=Predefined Product
|
||||||
PredefinedServicesToSell=Predefined Service
|
PredefinedServicesToSell=Predefined Service
|
||||||
PredefinedProductsAndServicesToSell=Predefined products/services to sell
|
PredefinedProductsAndServicesToSell=Predefined products/services to sell
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user