print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','departement_id'),6); print '</td><td>'.$langs->trans('Town').'</td><td>'; print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','departement_id')); print '</td></tr>'; // Country print '<tr><td width="25%">'.$langs->trans('Country').'</td><td colspan="3">'; print $form->select_country($object->country_id,'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); print '</td></tr>'; // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">'; if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code,'departement_id'); else print $countrynotdefined; print '</td></tr>'; } // Phone / Fax print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="tel" value="'.$object->tel.'"></td>'; print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>'; print '<tr><td>'.$langs->trans('EMail').($conf->global->SOCIETE_MAIL_REQUIRED?'*':'').'</td><td><input type="text" name="email" size="32" value="'.$object->email.'"></td>'; print '<td>'.$langs->trans('Web').'</td><td><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>'; // Prof ids $i=1; $j=0; while ($i <= 6) {
$selectedcode = $mysoc->country_code; } } $account->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules print '<tr><td class="fieldrequired">' . $langs->trans("Country") . '</td>'; print '<td colspan="3">'; print $form->select_country($selectedcode, 'account_country_id'); if ($user->admin) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } print '</td></tr>'; // State print '<tr><td>' . $langs->trans('State') . '</td><td colspan="3">'; if ($selectedcode) { print $formcompany->select_state(isset($_POST["account_state_id"]) ? $_POST["account_state_id"] : $account->state_id, $selectedcode, 'account_state_id'); } else { print $countrynotdefined; } print '</td></tr>'; // Conciliable print '<tr><td>' . $langs->trans("Conciliable") . '</td>'; print '<td colspan="3">'; $conciliate = $account->canBeConciliated(); if ($conciliate == -2) { print $langs->trans("No") . ' (' . $langs->trans("CashAccount") . ')'; } else { if ($conciliate == -3) { print $langs->trans("No") . ' (' . $langs->trans("Closed") . ')'; } else { print '<input type="checkbox" class="flat" name="norappro"' . ($conciliate > 0 ? '' : ' checked="checked"') . '"> ' . $langs->trans("DisableConciliation");
if ($country_code) { $new_country_id = getCountry($country_code, 3, $db, $langs); //print 'xxx'.$country_code.' - '.$new_country_id; if ($new_country_id) { $country_id = $new_country_id; } } } $country_code = getCountry($country_id, 2, $db, $langs); print $form->select_country($country_id, 'country_id'); print '</td></tr>'; // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print '<tr><td>' . $langs->trans('State') . '</td><td>'; if ($country_code) { print $formcompany->select_state(GETPOST("state_id"), $country_code); } else { print ''; } print '</td></tr>'; } // EMail print '<tr><td>' . $langs->trans("Email") . ' <FONT COLOR="red">*</FONT></td><td><input type="text" name="email" size="40" value="' . dol_escape_htmltag(GETPOST('email')) . '"></td></tr>' . "\n"; // Login if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { print '<tr><td>' . $langs->trans("Login") . ' <FONT COLOR="red">*</FONT></td><td><input type="text" name="login" size="20" value="' . dol_escape_htmltag(GETPOST('login')) . '"></td></tr>' . "\n"; print '<tr><td>' . $langs->trans("Password") . ' <FONT COLOR="red">*</FONT></td><td><input type="password" name="pass1" size="20" value="' . GETPOST("pass1") . '"></td></tr>' . "\n"; print '<tr><td>' . $langs->trans("PasswordAgain") . ' <FONT COLOR="red">*</FONT></td><td><input type="password" name="pass2" size="20" value="' . GETPOST("pass2") . '"></td></tr>' . "\n"; } // Birthday print '<tr id="trbirth" class="trbirth"><td>' . $langs->trans("DateToBirth") . '</td><td>';
print '<tr><td><label for="zipcode">' . $langs->trans("Zip") . '</label> / <label for="town">' . $langs->trans("Town") . '</label></td><td colspan="' . $colspan . '" class="maxwidthonsmartphone">'; print $formcompany->select_ziptown(GETPOST("zipcode") ? GETPOST("zipcode") : $object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6) . ' '; print $formcompany->select_ziptown(GETPOST("town") ? GETPOST("town") : $object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id')); print '</td></tr>'; // Country print '<tr><td><label for="selectcountry_id">' . $langs->trans("Country") . '</label></td><td colspan="' . $colspan . '" class="maxwidthonsmartphone">'; print $form->select_country(GETPOST("country_id", 'alpha') ? GETPOST("country_id", 'alpha') : $object->country_id, 'country_id'); if ($user->admin) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } print '</td></tr>'; // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print '<tr><td><label for="state_id">' . $langs->trans('State') . '</label></td><td colspan="' . $colspan . '" class="maxwidthonsmartphone">'; if ($object->country_id) { print $formcompany->select_state(GETPOST("state_id", 'alpha') ? GETPOST("state_id", 'alpha') : $object->state_id, $object->country_code, 'state_id'); } else { print $countrynotdefined; } print '</td></tr>'; } // Phone / Fax if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) { $object->phone_pro = $objsoc->phone; } // Predefined with third party print '<tr><td><label for="phone_pro">' . $langs->trans("PhonePro") . '</label></td>'; print '<td><input name="phone_pro" id="phone_pro" type="text" size="18" maxlength="80" value="' . dol_escape_htmltag(GETPOST("phone_pro") ? GETPOST("phone_pro") : $object->phone_pro) . '"></td>'; print '<td><label for="phone_perso">' . $langs->trans("PhonePerso") . '</label></td>'; print '<td><input name="phone_perso" id="phone_perso" type="text" size="18" maxlength="80" value="' . dol_escape_htmltag(GETPOST("phone_perso") ? GETPOST("phone_perso") : $object->phone_perso) . '"></td></tr>'; if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 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','selectcountry_id').'</td><td class="maxwidthonsmartphone">'; print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->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 class="maxwidthonsmartphone">'; print $formcompany->select_state($object->state_id,$object->country_code, 'state_id'); print '</td></tr>'; } // Tel print '<tr><td>'.$langs->trans("PhonePro").'</td>'; print '<td>'; if (! empty($ldap_phone)) { print '<input type="hidden" name="office_phone" value="'.$ldap_phone.'">'; print $ldap_phone; } else { print '<input size="20" type="text" name="office_phone" value="'.GETPOST('office_phone').'">'; }
$row_array['label'] .= ($county && $country?' - ':''); $row_array['label'] .= $country; $row_array['label'] .= ($county || $country)?')':''; if ($zipcode) { $row_array['value'] = $row['zip']; $row_array['town'] = $row['town']; } if ($town) { $row_array['value'] = $row['town']; $row_array['zipcode'] = $row['zip']; } $row_array['selectpays_id'] = $row['fk_country']; $row_array['departement_id'] = $row['fk_county']; $row_array['states'] = $formcompany->select_state('',$row['fk_country'],''); array_push($return_arr,$row_array); } } echo json_encode($return_arr); } else { } ?>
//print $pays_code; if ($pays_code) { $new_pays_id=getCountry($pays_code,3,$db,$langs); //print 'xxx'.$pays_code.' - '.$new_pays_id; if ($new_pays_id) $pays_id=$new_pays_id; } } $pays_code=getCountry($pays_id,2,$db,$langs); print $html->select_country($pays_id,'pays_id'); print '</td></tr>'; // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print '<tr><td>'.$langs->trans('State').'</td><td>'; if ($pays_code) print $formcompany->select_state(GETPOST("departement_id"),$pays_code); else print ''; print '</td></tr>'; } // EMail print '<tr><td>'.$langs->trans("Email").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="email" size="40" value="'.dol_escape_htmltag(GETPOST('email')).'"></td></tr>'."\n"; // Login if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { print '<tr><td>'.$langs->trans("Login").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="login" size="20" value="'.dol_escape_htmltag(GETPOST('login')).'"></td></tr>'."\n"; print '<tr><td>'.$langs->trans("Password").' <FONT COLOR="red">*</FONT></td><td><input type="password" name="pass1" size="20" value="'.GETPOST("pass1").'"></td></tr>'."\n"; print '<tr><td>'.$langs->trans("PasswordAgain").' <FONT COLOR="red">*</FONT></td><td><input type="password" name="pass2" size="20" value="'.GETPOST("pass2").'"></td></tr>'."\n"; } // Birthday print '<tr><td>'.$langs->trans("Birthday").'</td><td>'; print $html->select_date($birthday,'birth',0,0,1,"newmember");
print ' '; print $formcompany->select_ziptown(GETPOST('town', 'alpha') ? GETPOST('town', 'alpha') : $object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id')); print '</td></tr>'; // Country $object->country_id = $object->country_id ? $object->country_id : $mysoc->country_id; print '<tr><td width="25%">' . $langs->trans('Country') . '</td><td>'; print $form->select_country(GETPOST('country_id', 'alpha') ? GETPOST('country_id', 'alpha') : $object->country_id, 'country_id'); if ($user->admin) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } print '</td></tr>'; // State if (empty($conf->global->MEMBER_DISABLE_STATE)) { print '<tr><td>' . $langs->trans('State') . '</td><td>'; if ($object->country_id) { print $formcompany->select_state(GETPOST('state_id', 'int') ? GETPOST('state_id', 'int') : $object->state_id, $object->country_code); } else { print $countrynotdefined; } print '</td></tr>'; } // Pro phone print '<tr><td>' . $langs->trans("PhonePro") . '</td><td><input type="text" name="phone" size="20" value="' . (GETPOST('phone', 'alpha') ? GETPOST('phone', 'alpha') : $object->phone) . '"></td></tr>'; // Personal phone print '<tr><td>' . $langs->trans("PhonePerso") . '</td><td><input type="text" name="phone_perso" size="20" value="' . (GETPOST('phone_perso', 'alpha') ? GETPOST('phone_perso', 'alpha') : $object->phone_perso) . '"></td></tr>'; // Mobile phone print '<tr><td>' . $langs->trans("PhoneMobile") . '</td><td><input type="text" name="phone_mobile" size="20" value="' . (GETPOST('phone_mobile', 'alpha') ? GETPOST('phone_mobile', 'alpha') : $object->phone_mobile) . '"></td></tr>'; // Skype if (!empty($conf->skype->enabled)) { print '<tr><td>' . $langs->trans("Skype") . '</td><td><input type="text" name="member_skype" size="40" value="' . (GETPOST('member_skype', 'alpha') ? GETPOST('member_skype', 'alpha') : $object->skype) . '"></td></tr>'; }
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 '</td></tr>'; // Country print '<tr><td width="25%">'.fieldLabel('Country','selectcountry_id').'</td><td colspan="3" class="maxwidthonsmartphone">'; print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '</td></tr>'; // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print '<tr><td>'.fieldLabel('State','state_id').'</td><td colspan="3" class="maxwidthonsmartphone">'; if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code); else print $countrynotdefined; print '</td></tr>'; } // Email web print '<tr><td>'.fieldLabel('EMail','email').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'</td>'; print '<td colspan="3"><input type="text" name="email" id="email" size="32" value="'.$object->email.'"></td></tr>'; print '<tr><td>'.fieldLabel('Web','url').'</td>'; print '<td colspan="3"><input type="text" name="url" id="url" size="32" value="'.$object->url.'"></td></tr>'; // Skype if (! empty($conf->skype->enabled)) { print '<tr><td>'.fieldLabel('Skype','skype').'</td>'; print '<td colspan="3"><input type="text" name="skype" id="skype" size="32" value="'.$object->skype.'"></td></tr>';
if (isset($_POST["account_country_id"])) { $selectedcode = $_POST["account_country_id"]; } else { if (empty($selectedcode)) { $selectedcode = $mysoc->country_code; } } print $form->select_country($selectedcode, 'account_country_id'); if ($user->admin) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"), 1); } print '</td></tr>'; // State print '<tr><td>' . $langs->trans('State') . '</td><td colspan="3">'; if ($selectedcode) { print $formcompany->select_state(isset($_POST["account_departement_id"]) ? $_POST["account_departement_id"] : $account->fk_departement, $selectedcode, 'account_departement_id'); } else { print $countrynotdefined; } print '</td></tr>'; // Conciliable print '<tr><td valign="top">' . $langs->trans("Conciliable") . '</td>'; print '<td colspan="3">'; $conciliate = $account->canBeConciliated(); if ($conciliate == -2) { print $langs->trans("No") . ' (' . $langs->trans("CashAccount") . ')'; } else { if ($conciliate == -3) { print $langs->trans("No") . ' (' . $langs->trans("Closed") . ')'; } else { print '<input type="checkbox" class="flat" name="norappro"' . ($account->rappro ? '' : ' checked="checked"') . '"> ' . $langs->trans("DisableConciliation");
print ' '; print $formcompany->select_ziptown(GETPOST('town', 'alpha') ? GETPOST('town', 'alpha') : $object->town, 'town', array('zipcode', 'selectcountry_id', 'departement_id')); print '</td></tr>'; // Country $object->country_id = $object->country_id ? $object->country_id : $mysoc->country_id; print '<tr><td width="25%">' . $langs->trans('Country') . '</td><td>'; print $form->select_country(GETPOST('country_id', 'alpha') ? GETPOST('country_id', 'alpha') : $object->country_id, 'country_id'); if ($user->admin) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"), 1); } print '</td></tr>'; // State if (empty($conf->global->MEMBER_DISABLE_STATE)) { print '<tr><td>' . $langs->trans('State') . '</td><td>'; if ($object->country_id) { print $formcompany->select_state(GETPOST('departement_id', 'int') ? GETPOST('departement_id', 'int') : $object->fk_departement, $object->country_code); } else { print $countrynotdefined; } print '</td></tr>'; } // Tel pro print '<tr><td>' . $langs->trans("PhonePro") . '</td><td><input type="text" name="phone" size="20" value="' . (GETPOST('phone', 'alpha') ? GETPOST('phone', 'alpha') : $object->phone) . '"></td></tr>'; // Tel perso print '<tr><td>' . $langs->trans("PhonePerso") . '</td><td><input type="text" name="phone_perso" size="20" value="' . (GETPOST('phone_perso', 'alpha') ? GETPOST('phone_perso', 'alpha') : $object->phone_perso) . '"></td></tr>'; // Tel mobile print '<tr><td>' . $langs->trans("PhoneMobile") . '</td><td><input type="text" name="phone_mobile" size="20" value="' . (GETPOST('phone_mobile', 'alpha') ? GETPOST('phone_mobile', 'alpha') : $object->phone_mobile) . '"></td></tr>'; // EMail print '<tr><td>' . ($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '') . $langs->trans("EMail") . ($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '') . '</td><td><input type="text" name="member_email" size="40" value="' . (GETPOST('member_email', 'alpha') ? GETPOST('member_email', 'alpha') : $object->email) . '"></td></tr>'; // Birthday print "<tr><td>" . $langs->trans("Birthday") . "</td><td>\n";
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';