'."\n";
- $editmode = (GETPOST('action', 'aZ09') == 'edit'.$note_private);
- print '
'."\n";
+ print '
'."\n";
print $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam, '', 0);
print '
'."\n";
- print '
'."\n";
+ print '
'."\n";
print $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam, 1);
print '
'."\n";
print '
'."\n";
--- /tmp/dsg/dolibarr/htdocs/core/tpl/github_object_discounts.tpl.php
+++ /tmp/dsg/dolibarr/htdocs/core/tpl/client_object_discounts.tpl.php
@@ -42,9 +42,11 @@
{
$translationKey = (!empty($discount_type)) ? 'HasRelativeDiscountFromSupplier' : 'CompanyHasRelativeDiscount';
print $langs->trans($translationKey, $fixedDiscount).'.';
-} else {
+}
+else
+{
$translationKey = (!empty($discount_type)) ? 'HasNoRelativeDiscountFromSupplier' : 'CompanyHasNoRelativeDiscount';
- print '
'.$langs->trans($translationKey).'. ';
+ print $langs->trans($translationKey).'.';
}
if ($isNewObject) print ' ('.$addrelativediscount.')';
@@ -62,11 +64,7 @@
$text .= ' ('.$addabsolutediscount.')';
}
- if ($isNewObject) {
- print '
'.$text;
- } else {
- print '
'.$text.'
';
- }
+ print '
'.$text;
} else {
// Discount available of type fixed amount (not credit note)
$more = '('.$addabsolutediscount.')';
@@ -89,11 +87,7 @@
$text .= '('.$addabsolutediscount.')';
}
- if ($isNewObject) {
- print '
'.$text;
- } else {
- print '
'.$text.'
';
- }
+ print '
'.$text;
} else { // We can add a credit note on a down payment or standard invoice or situation invoice
// There is credit notes discounts available
$more = $isInvoice && !$isNewObject ? ' ('.$viewabsolutediscount.')' : '';
@@ -103,7 +97,7 @@
if ($absolute_discount <= 0 && $absolute_creditnote <= 0) {
$translationKey = !empty($discount_type) ? 'HasNoAbsoluteDiscountFromSupplier' : 'CompanyHasNoAbsoluteDiscount';
- print '
'.$langs->trans($translationKey).'. ';
+ print '
'.$langs->trans($translationKey).'.';
if ($isInvoice && $object->statut == $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_CREDIT_NOTE && $object->type != $objclassname::TYPE_DEPOSIT) {
print ' ('.$addabsolutediscount.')';
--- /tmp/dsg/dolibarr/htdocs/core/tpl/github_objectline_create.tpl.php
+++ /tmp/dsg/dolibarr/htdocs/core/tpl/client_objectline_create.tpl.php
@@ -32,7 +32,6 @@
* $senderissupplier (0 by default, 1 or 2 for supplier invoices/orders)
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
*/
-
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error: this template page cannot be called directly as an URL";
@@ -61,19 +60,26 @@
{
if ($this->table_element_line == 'commandedet') {
$objectline = new OrderLine($this->db);
- } elseif ($this->table_element_line == 'propaldet') {
+ }
+ elseif ($this->table_element_line == 'propaldet') {
$objectline = new PropaleLigne($this->db);
- } elseif ($this->table_element_line == 'supplier_proposaldet') {
+ }
+ elseif ($this->table_element_line == 'supplier_proposaldet') {
$objectline = new SupplierProposalLine($this->db);
- } elseif ($this->table_element_line == 'facturedet') {
+ }
+ elseif ($this->table_element_line == 'facturedet') {
$objectline = new FactureLigne($this->db);
- } elseif ($this->table_element_line == 'contratdet') {
+ }
+ elseif ($this->table_element_line == 'contratdet') {
$objectline = new ContratLigne($this->db);
- } elseif ($this->table_element_line == 'commande_fournisseurdet') {
+ }
+ elseif ($this->table_element_line == 'commande_fournisseurdet') {
$objectline = new CommandeFournisseurLigne($this->db);
- } elseif ($this->table_element_line == 'facture_fourn_det') {
+ }
+ elseif ($this->table_element_line == 'facture_fourn_det') {
$objectline = new SupplierInvoiceLine($this->db);
- } elseif ($this->table_element_line == 'facturedet_rec') {
+ }
+ elseif ($this->table_element_line == 'facturedet_rec') {
$objectline = new FactureLigneRec($this->db);
}
}
@@ -86,7 +92,7 @@
-
trans('AddNewLine'); ?>
+
trans('AddNewLine'); ?> trans("FreeZone"); ?>
element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
@@ -106,7 +112,7 @@
trans('Qty'); ?>
global->PRODUCT_USE_UNITS))
+ if ($conf->global->PRODUCT_USE_UNITS)
{
print '
';
print '';
@@ -125,11 +131,13 @@
{
if (empty($user->rights->margins->creer)) {
$colspan++;
- } else {
+ }
+ else {
print ' ';
if ($conf->global->MARGIN_TYPE == "1")
echo $langs->trans('BuyingPrice');
- else echo $langs->trans('CostPrice');
+ else
+ echo $langs->trans('CostPrice');
echo ' ';
if (!empty($conf->global->DISPLAY_MARGIN_RATES)) echo '
'.$langs->trans('MarginRate').' ';
if (!empty($conf->global->DISPLAY_MARK_RATES)) echo '
'.$langs->trans('MarkRate').' ';
@@ -172,13 +180,15 @@
echo '
';
echo ' product->enabled) || empty($conf->service->enabled)))?' checked':'') );
- 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 '> ';
// Show type selector
echo $langs->trans("FreeLineOfType");
echo ' ';
echo ' ';
- } else {
+ }
+ else
+ {
echo '
';
// Show type selector
if ($forceall >= 0)
@@ -203,7 +213,9 @@
if (!empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToSell');
elseif ((empty($conf->product->enabled) && !empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) echo $langs->trans('PredefinedServicesToSell');
else echo $langs->trans('PredefinedProductsAndServicesToSell');
- } else {
+ }
+ else
+ {
if (!empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToPurchase');
elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) echo $langs->trans('PredefinedServicesToPurchase');
else echo $langs->trans('PredefinedProductsAndServicesToPurchase');
@@ -215,16 +227,19 @@
if (empty($senderissupplier))
{
$statustoshow = 1;
- if (!empty($conf->global->ENTREPOT_EXTRA_STATUS)) {
+ if (!empty($conf->global->ENTREPOT_EXTRA_STATUS))
+ {
// hide products in closed warehouse, but show products for internal transfer
$form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array'));
- } else {
+ }
+ else
+ {
$form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array'));
}
if (!empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_CUSTOMER_PRODUCTS))
{
?>
-
array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key
- 'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done
- 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo)
+ 'update' => array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key
+ 'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done
+ 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo)
);
$alsoproductwithnosupplierprice = 0;
- } else {
+ }
+ else
+ {
$ajaxoptions = array(
- 'update' => array('remise_percent' => 'discount', 'price_ht' => 'up') // html id tags that will be edited with each ajax json response key
+ 'update' => array('remise_percent' => 'discount') // html id tags that will be edited with each ajax json response key
);
$alsoproductwithnosupplierprice = 1;
}
@@ -259,7 +278,7 @@
if (!empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_SUPPLIER_PRODUCTS))
{
?>
-
--- /tmp/dsg/dolibarr/htdocs/core/tpl/github_objectline_title.tpl.php
+++ /tmp/dsg/dolibarr/htdocs/core/tpl/client_objectline_title.tpl.php
@@ -59,27 +59,7 @@
}
// VAT
-print '
';
-if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || !empty($conf->global->FACTURE_LOCAL_TAX2_OPTION)) {
- print $langs->trans('Taxes');
-} else {
- print $langs->trans('VAT');
-}
-
-if (in_array($object->element, array('propal', 'commande', 'facture')) && $object->status == $object::STATUS_DRAFT)
-{
- global $mysoc;
-
- print 'id.'">'.img_edit($langs->trans("UpdateForAllLines"), 0, 'class="clickvatforalllines opacitymedium paddingleft cursorpointer"').' ';
- //print '';
- if (GETPOST('mode', 'aZ09') == 'vatforalllines') {
- print '';
- print $form->load_tva('vatforalllines', '', $mysoc, $object->thirdparty, 0, 0, '', false, 1);
- print ' ';
- print '
';
- }
-}
-print ' ';
+print '
'.$langs->trans('VAT').' ';
// Price HT
print '
'.$langs->trans('PriceUHT').' ';
@@ -92,7 +72,7 @@
// Qty
print '
'.$langs->trans('Qty').' ';
-if (!empty($conf->global->PRODUCT_USE_UNITS))
+if ($conf->global->PRODUCT_USE_UNITS)
{
print '
'.$langs->trans('Unit').' ';
}
--- /tmp/dsg/dolibarr/htdocs/core/tpl/github_objectline_view.tpl.php
+++ /tmp/dsg/dolibarr/htdocs/core/tpl/client_objectline_view.tpl.php
@@ -63,22 +63,17 @@
$domData .= ' data-qty="'.$line->qty.'"';
$domData .= ' data-product_type="'.$line->product_type.'"';
-$sign = 1;
-if (!empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE_SCREEN) && in_array($object->element, array('facture', 'invoice_supplier')) && $object->type == $object::TYPE_CREDIT_NOTE) {
- $sign = -1;
-}
-
-$coldisplay = 0;
-?>
+
+$coldisplay = 0; ?>
>
global->MAIN_VIEW_LINE_NUMBER)) { ?>
-
+
info_bits & 2) == 2) {
- print '';
+ print ' ';
$txt = '';
print img_object($langs->trans("ShowReduc"), 'reduc').' ';
if ($line->description == '(DEPOSIT)') $txt = $langs->trans("Deposit");
@@ -87,43 +82,51 @@
//else $txt=$langs->trans("Discount");
print $txt;
print ' ';
-
if ($line->description)
{
- if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0) {
- include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
+ if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0)
+ {
$discount = new DiscountAbsolute($this->db);
$discount->fetch($line->fk_remise_except);
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0));
- } elseif ($line->description == '(DEPOSIT)' && $line->fk_remise_except > 0) {
- include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
+ }
+ elseif ($line->description == '(DEPOSIT)' && $line->fk_remise_except > 0)
+ {
$discount = new DiscountAbsolute($this->db);
$discount->fetch($line->fk_remise_except);
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0));
// Add date of deposit
if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE))
- print ' ('.dol_print_date($discount->datec).')';
- } elseif ($line->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0) {
- include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
+ print ' ('.dol_print_date($discount->datec).')';
+ }
+ elseif ($line->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0)
+ {
$discount = new DiscountAbsolute($this->db);
$discount->fetch($line->fk_remise_except);
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessReceived", $discount->getNomUrl(0));
- } elseif ($line->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0) {
- include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
+ }
+ elseif ($line->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0)
+ {
$discount = new DiscountAbsolute($this->db);
$discount->fetch($line->fk_remise_except);
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessPaid", $discount->getNomUrl(0));
- } else {
+ }
+ else
+ {
print ($txt ? ' - ' : '').dol_htmlentitiesbr($line->description);
}
}
-} else {
+}
+else
+{
$format = $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE ? 'dayhour' : 'day';
- if ($line->fk_product > 0)
+ if ($line->fk_product > 0)
{
print $form->textwithtooltip($text, $description, 3, '', '', $i, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : ''));
- } else {
+ }
+ else
+ {
$type = (!empty($line->product_type) ? $line->product_type : $line->fk_product_type);
if ($type == 1) $text = img_object($langs->trans('Service'), 'service');
else $text = img_object($langs->trans('Product'), 'product');
@@ -136,7 +139,8 @@
if (preg_match('/^\(DEPOSIT\)/', $line->description)) {
$newdesc = preg_replace('/^\(DEPOSIT\)/', $langs->trans("Deposit"), $line->description);
print $text.' '.dol_htmlentitiesbr($newdesc);
- } else {
+ }
+ else {
print $text.' '.dol_htmlentitiesbr($line->description);
}
}
@@ -149,7 +153,8 @@
if ($line->date_start_fill && $line->date_end_fill) print ' - ';
if ($line->date_end_fill) print $langs->trans('AutoFillDateToShort').': '.yn($line->date_end_fill);
if ($line->date_start_fill || $line->date_end_fill) print '';
- } else {
+ }
+ else {
if ($line->date_start || $line->date_end) print ''.get_date_range($line->date_start, $line->date_end, $format).'
';
//print get_date_range($line->date_start, $line->date_end, $format);
}
@@ -161,9 +166,9 @@
}
}
-if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0 && empty($conf->global->SUPPLIER_HIDE_SUPPLIER_OBJECTLINES))
-{
- require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
+if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0)
+{
+ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
$productfourn = new ProductFournisseur($this->db);
$productfourn->fetch_product_fournisseur_price($line->fk_fournprice);
print '
';
@@ -172,7 +177,9 @@
if ($user->rights->produit->creer || $user->rights->service->creer) // change required right here
{
print $productfourn->getNomUrl();
- } else {
+ }
+ else
+ {
print $productfourn->ref_supplier;
}
}
@@ -203,14 +210,14 @@
//print vatrate($line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), '%', $line->info_bits);
?>
- subprice); ?>
+ subprice); ?>
multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?>
- multicurrency_subprice); ?>
+ multicurrency_subprice); ?>
- pu_ttc) ? price($sign * $line->pu_ttc) : price($sign * $line->subprice)); ?>
+ pu_ttc) ?price($line->pu_ttc) : price($line->subprice)); ?>
@@ -224,7 +231,7 @@
} else print ' ';
print ' ';
-if (!empty($conf->global->PRODUCT_USE_UNITS))
+if ($conf->global->PRODUCT_USE_UNITS)
{
print '';
$label = $line->getLabelOfUnit('short');
@@ -247,13 +254,13 @@
// Fields for situation invoices
if ($this->situation_cycle_ref)
{
- include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
+ include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
$coldisplay++;
print ' '.$line->situation_percent.'% ';
$coldisplay++;
$locataxes_array = getLocalTaxesFromRate($line->tva.($line->vat_src_code ? ' ('.$line->vat_src_code.')' : ''), 0, ($senderissupplier ? $mysoc : $object->thirdparty), ($senderissupplier ? $object->thirdparty : $mysoc));
$tmp = calcul_price_total($line->qty, $line->pu, $line->remise_percent, $line->txtva, -1, -1, 0, 'HT', $line->info_bits, $line->type, ($senderissupplier ? $object->thirdparty : $mysoc), $locataxes_array, 100, $object->multicurrency_tx, $line->multicurrency_subprice);
- print ''.price($sign * $tmp[0]).' ';
+ print ''.price($tmp[0]).' ';
}
if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid))
@@ -264,11 +271,10 @@
if (!empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) { ?>
pa_ht == 0) ? 'n/a' : price(price2num($line->marge_tx, 'MT')).'%'); ?>
global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {?>
+ if (!empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {?>
marque_tx, 'MT')).'%'; ?>
special_code == 3) { ?>
trans('Option'); ?>
';
}
- print price($sign * $line->total_ht);
+ print price($line->total_ht);
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
- print '';
+ print '';
}
print '';
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {
- print ''.price($sign * $line->multicurrency_total_ht).' ';
+ print ''.price($line->multicurrency_total_ht).' ';
$coldisplay++;
}
}
if ($outputalsopricetotalwithtax) {
- print ''.price($sign * $line->total_ttc).' ';
+ print ''.price($line->total_ttc).' ';
$coldisplay++;
}
@@ -347,7 +353,7 @@
';
- } else {
+ } else {
print 'browser->layout != 'phone' && empty($disablemove)) ? ' class="linecolmove tdlineupdown center"' : ' class="linecolmove center"').'> ';
$coldisplay++;
}
--- /tmp/dsg/dolibarr/htdocs/core/tpl/github_onlinepaymentlinks.tpl.php
+++ /tmp/dsg/dolibarr/htdocs/core/tpl/client_onlinepaymentlinks.tpl.php
@@ -32,133 +32,123 @@
print ''.getOnlinePaymentUrl(1, 'free')." \n";
if (!empty($conf->commande->enabled))
{
- print '
';
- print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnOrder", $servicename).': ';
+ print '
';
+ print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnOrder", $servicename).': ';
print ''.getOnlinePaymentUrl(1, 'order')." \n";
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE))
{
- $langs->load("orders");
- print '';
+ $langs->load("orders");
+ print '';
}
print ' ';
}
if (!empty($conf->facture->enabled))
{
- print '
';
- print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice", $servicename).': ';
+ print '
';
+ print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice", $servicename).': ';
print ''.getOnlinePaymentUrl(1, 'invoice')." \n";
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE))
{
- $langs->load("bills");
- print '';
+ $langs->load("bills");
+ print '';
}
print ' ';
}
if (!empty($conf->contrat->enabled))
{
- print '
';
- print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine", $servicename).': ';
+ print '
';
+ print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine", $servicename).': ';
print ''.getOnlinePaymentUrl(1, 'contractline')." \n";
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE))
{
- $langs->load("contracts");
- print '';
+ $langs->load("contracts");
+ print '';
}
print ' ';
}
if (!empty($conf->adherent->enabled))
{
- print '
';
- print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription", $servicename).': ';
+ print '
';
+ print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription", $servicename).': ';
print ''.getOnlinePaymentUrl(1, 'membersubscription')." \n";
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE))
{
- $langs->load("members");
- print '';
+ $langs->load("members");
+ print '';
}
print ' ';
}
if (!empty($conf->don->enabled))
{
- print '
';
+ print '
';
print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnDonation", $servicename).': ';
print ''.getOnlinePaymentUrl(1, 'donation')." \n";
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE))
{
- $langs->load("members");
- print '';
+ $langs->load("members");
+ print '';
}
print ' ';
}
if (!empty($conf->use_javascript_ajax))
{
- print "\n".'
-
+
select_resource_list('', 'fk_resource', '', 1, 1, 0, $events, '', 2, null);
$out .= '';
-$out .= ''.$langs->trans('Busy').' '.$form->selectyesno('busy', (GETPOSTISSET('busy') ? GETPOST('busy') : 1), 1).'
';
-$out .= ''.$langs->trans('Mandatory').' '.$form->selectyesno('mandatory', (GETPOSTISSET('mandatory') ? GETPOST('mandatory') : 0), 1).'
';
+$out .= ''.$langs->trans('Busy').' '.$form->selectyesno('busy', (isset($_POST['busy']) ? $_POST['busy'] : 1), 1).'
';
+$out .= ''.$langs->trans('Mandatory').' '.$form->selectyesno('mandatory', (isset($_POST['mandatory']) ? $_POST['mandatory'] : 0), 1).'
';
$out .= '';
$out .= '
';
--- /tmp/dsg/dolibarr/htdocs/core/tpl/github_resource_view.tpl.php
+++ /tmp/dsg/dolibarr/htdocs/core/tpl/client_resource_view.tpl.php
@@ -38,9 +38,9 @@
if ($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid'))
{
- print '
';
- print '
';
- print '
';
+ print '
';
+ print '
';
+ print '
';
print '
';
print '
'.$object_resource->getNomUrl(1).'
';
@@ -49,7 +49,9 @@
print '
'.$form->selectyesno('mandatory', $linked_resource['mandatory'] ? 1 : 0, 1).'
';
print '
';
print '
';
- } else {
+ }
+ else
+ {
$class = '';
if ($linked_resource['rowid'] == GETPOST('lineid'))
$class = 'highlight';
@@ -73,11 +75,11 @@
print '
';
print '
';
@@ -85,7 +87,8 @@
print '
';
}
}
-} else {
+}
+else {
print '';
print '
'.$langs->trans('NoResourceLinked').'
';
print '
';