function fieldWrapper($name, $label, $element)
 {
     $out = '<div class="form-group';
     $out .= fieldError($name) . '">';
     $out .= fieldLabel($name, $label);
     $out .= $element;
     $out .= '</div>';
     return $out;
 }
Exemple #2
0
			// Town
			print '<tr><td>'.fieldLabel('Town','town').'</td><td>';
            print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'));
            print '</td></tr>';

            // Country
            print '<tr><td>'.fieldLabel('Country','selectcounty_id').'</td><td>';
            print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id');
            if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
            print '</td></tr>';

            // State
            if (empty($conf->global->USER_DISABLE_STATE))
            {
                print '<tr><td>'.fieldLabel('State','state_id').'</td><td>';
                print $formcompany->select_state($object->state_id,$object->country_code, 'state_id');
                print '</td></tr>';
            }

            // Tel pro
            print "<tr>".'<td>'.$langs->trans("PhonePro").'</td>';
            print '<td>';
            if ($caneditfield  && empty($object->ldap_sid))
            {
                print '<input size="20" type="text" name="office_phone" class="flat" value="'.$object->office_phone.'">';
            }
            else
            {
                print '<input type="hidden" name="office_phone" value="'.$object->office_phone.'">';
                print $object->office_phone;
Exemple #3
0
 $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
 print $doleditor->Create(1);
 print '</td></tr>';
 // Note Private
 print '<tr><td class="tdtop"><label for="note_private">' . $langs->trans("NotePrivate") . '</label></td><td colspan="3">';
 $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
 print $doleditor->Create(1);
 print '</td></tr>';
 // Statut
 print '<tr><td>' . $langs->trans("Status") . '</td>';
 print '<td>';
 print $object->getLibStatut(4);
 print '</td></tr>';
 // Categories
 if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
     print '<tr><td>' . fieldLabel('Categories', 'contcats') . '</td>';
     print '<td colspan="3">';
     $cate_arbo = $form->select_all_categories(Categorie::TYPE_CONTACT, null, null, null, null, 1);
     $c = new Categorie($db);
     $cats = $c->containing($object->id, Categorie::TYPE_CONTACT);
     foreach ($cats as $cat) {
         $arrayselected[] = $cat->id;
     }
     print $form->multiselectarray('contcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
     print "</td></tr>";
 }
 // Other attributes
 $parameters = array('colspan' => ' colspan="3"');
 $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
 // Note that $action and $object may have been modified by hook
 if (empty($reshook) && !empty($extrafields->attribute_label)) {
Exemple #4
0
     print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
     print '<td>' . price($object->total_localtax2, 1, '', 1, -1, -1, $conf->currency) . '</td></tr>';
 }
 // Total TTC
 print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td>' . price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency) . '</td></tr>';
 if (!empty($conf->multicurrency->enabled)) {
     // Multicurrency Amount HT
     print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountHT', 'multicurrency_total_ht') . '</td>';
     print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, !empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) . '</td>';
     print '</tr>';
     // Multicurrency Amount VAT
     print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountVAT', 'multicurrency_total_tva') . '</td>';
     print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, !empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) . '</td>';
     print '</tr>';
     // Multicurrency Amount TTC
     print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountTTC', 'multicurrency_total_ttc') . '</td>';
     print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, !empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) . '</td>';
     print '</tr>';
 }
 // Statut
 print '<tr><td>' . $langs->trans('Status') . '</td><td>' . $object->getLibStatut(4) . '</td></tr>';
 print '</table><br>';
 print "\n";
 if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) {
     $blocname = 'contacts';
     $title = $langs->trans('ContactsAddresses');
     include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php';
 }
 if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) {
     $blocname = 'notes';
     $title = $langs->trans('Notes');
Exemple #5
0
     print $object->ref_facturation ? $object->ref_facturation : $langs->trans("NoContactForAnyInvoice");
     print '</td></tr>';
 }
 // Login Dolibarr
 print '<tr><td>' . $langs->trans("DolibarrLogin") . '</td><td colspan="3">';
 if ($object->user_id) {
     $dolibarr_user = new User($db);
     $result = $dolibarr_user->fetch($object->user_id);
     print $dolibarr_user->getLoginUrl(1);
 } else {
     print $langs->trans("NoDolibarrAccess");
 }
 print '</td></tr>';
 // Photo
 print '<tr class="hideonsmartphone">';
 print '<td>' . fieldLabel('Photo', 'photoinput') . '</td>';
 print '<td colspan="3">';
 if ($object->photo) {
     print $form->showphoto('contact', $object);
     print "<br>\n";
 }
 print '<table class="nobordernopadding">';
 if ($object->photo) {
     print '<tr><td><input type="checkbox" class="flat" name="deletephoto" id="photodelete"> ' . $langs->trans("Delete") . '<br><br></td></tr>';
 }
 //print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
 print '<tr><td><input type="file" class="flat" name="photo" id="photoinput"></td></tr>';
 print '</table>';
 print '</td>';
 print '</tr>';
 print '</table>';
Exemple #6
0
 // Amount
 print '<tr><td>';
 print fieldLabel('Amount', 'amount', 1) . '</td><td>';
 print '<input name="amount" id="amount" size="10" value="' . GETPOST("amount") . '">';
 print '</td></tr>';
 // Bank
 if (!empty($conf->banque->enabled)) {
     print '<tr><td>';
     print fieldLabel('Account', 'selectaccountid', 1) . '</td><td>';
     $form->select_comptes($_POST["accountid"], "accountid", 0, '', 1);
     // Affiche liste des comptes courant
     print '</td></tr>';
 }
 // Type payment
 print '<tr><td>';
 print fieldLabel('PaymentMode', 'selectpaymenttype', 1) . '</td><td>';
 $form->select_types_paiements(GETPOST("paymenttype"), "paymenttype");
 print '</td></tr>';
 // Number
 if (!empty($conf->banque->enabled)) {
     // Number
     print '<tr><td><label for="num_payment">' . $langs->trans('Numero');
     print ' <em>(' . $langs->trans("ChequeOrTransferNumber") . ')</em>';
     print '</label></td>';
     print '<td><input name="num_payment" id="num_payment" type="text" value="' . GETPOST("num_payment") . '"></td></tr>' . "\n";
 }
 // Other attributes
 $parameters = array('colspan' => ' colspan="1"');
 $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
 // Note that $action and $object may have been modified by hook
 print '</table>';
Exemple #7
0
     // Zipcode / Town
     print '<tr><td>' . fieldLabel('Zip', 'zipcode', 0) . '</td><td>';
     print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id'), 6) . '</tr>';
     print '<tr><td>' . fieldLabel('Town', 'town', 0) . '</td><td>';
     print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id')) . '</td></tr>';
     // Country
     print '<tr><td>' . fieldLabel('Country', 'selectcountry_id', 0) . '</td>';
     print '<td class="maxwidthonsmartphone">';
     print $form->select_country($object->fk_country, 'country_id');
     if ($user->admin) {
         print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
     }
     print '</td>';
     print '</tr>';
     // Status
     print '<tr><td>' . fieldLabel('Status', 'status', 1) . '</td><td>';
     print $form->selectarray('status', $status2label, $object->status);
     print '</td></tr>';
     print '</table>';
     dol_fiche_end();
     print '<div class="center">';
     print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
     print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
     print '<input type="submit" name="cancel" class="button" value="' . $langs->trans("Cancel") . '">';
     print '</div>';
     print '</form>';
 } else {
     /*
      * Confirm delete
      */
     if ($action == 'delete') {
Exemple #8
0
			if ($action != 'editincoterm')
			{
				print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1);
			}
			else
			{
				print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms)?$object->location_incoterms:''), $_SERVER['PHP_SELF'].'?socid='.$object->id);
			}
            print '</td></tr>';
		}

		// Multicurrency
		if (! empty($conf->multicurrency->enabled))
		{
			print '<tr>';
			print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
	        print '<td>';
	        print !empty($object->multicurrency_code) ? currency_name($object->multicurrency_code,1) : '';
			print '</td></tr>';
		}
		
        // Other attributes
        $parameters=array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
        $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action);    // Note that $action and $object may have been modified by hook
        print $hookmanager->resPrint;
        if (empty($reshook) && ! empty($extrafields->attribute_label))
        {
        	print $object->showOptionals($extrafields);
        }

        // Ban
    if (!empty($hookmanager->resPrint)) {
        $moreOptions = json_decode($hookmanager->resPrint);
    }
    if (!empty($conf->global->FULLCALENDAR_FILTER_ON_STATE)) {
        dol_include_once('/core/class/html.formcompany.class.php');
        $formcompany = new FormCompany($db);
    }
    ?>

	$(document).ready(function() {

		<?php 
    if (!empty($conf->global->FULLCALENDAR_FILTER_ON_STATE)) {
        ?>
			var select_departement = <?php 
        echo json_encode('<tr><td>' . fieldLabel('State', 'state_id') . '</td><td>' . $formcompany->select_state(GETPOST('state_id'), 'FR') . '</td></tr>');
        ?>
;
			$("#selectstatus").closest("tr").after(select_departement);
		<?php 
    }
    ?>

		var year = $('form[name=listactionsfilter]').find('input[name=year]').val();
		var month = $('form[name=listactionsfilter]').find('input[name=month]').val();
		var defaultDate = year+'-'+month+'-<?php 
    echo $defaultDay;
    ?>
';

		var defaultView='month';