css
This commit is contained in:
parent
dcd8c0f53d
commit
5bca7cf5f1
@ -425,14 +425,14 @@ if ($user->admin) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
|
print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td>';
|
||||||
$state_id = 0;
|
$state_id = 0;
|
||||||
if (!empty($conf->global->MAIN_INFO_SOCIETE_STATE)) {
|
if (!empty($conf->global->MAIN_INFO_SOCIETE_STATE)) {
|
||||||
$tmp = explode(':', $conf->global->MAIN_INFO_SOCIETE_STATE);
|
$tmp = explode(':', $conf->global->MAIN_INFO_SOCIETE_STATE);
|
||||||
$state_id = $tmp[0];
|
$state_id = $tmp[0];
|
||||||
}
|
}
|
||||||
print img_picto('', 'state', 'class="pictofixedwidth"');
|
print img_picto('', 'state', 'class="pictofixedwidth"');
|
||||||
print $formcompany->select_state($state_id, $mysoc->country_code, 'state_id');
|
print $formcompany->select_state($state_id, $mysoc->country_code, 'state_id', 'maxwidth200onsmartphone minwidth300');
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Currency
|
// Currency
|
||||||
|
|||||||
@ -266,10 +266,11 @@ class FormCompany extends Form
|
|||||||
* @param int $selected Code state preselected (mus be state id)
|
* @param int $selected Code state preselected (mus be state id)
|
||||||
* @param integer $country_codeid Country code or id: 0=list for all countries, otherwise country code or country rowid to show
|
* @param integer $country_codeid Country code or id: 0=list for all countries, otherwise country code or country rowid to show
|
||||||
* @param string $htmlname Id of department. If '', we want only the string with <option>
|
* @param string $htmlname Id of department. If '', we want only the string with <option>
|
||||||
|
* @param string $morecss Add more css
|
||||||
* @return string String with HTML select
|
* @return string String with HTML select
|
||||||
* @see select_country()
|
* @see select_country()
|
||||||
*/
|
*/
|
||||||
public function select_state($selected = 0, $country_codeid = 0, $htmlname = 'state_id')
|
public function select_state($selected = 0, $country_codeid = 0, $htmlname = 'state_id', $morecss = 'maxwidth200onsmartphone minwidth300')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf, $langs, $user;
|
global $conf, $langs, $user;
|
||||||
@ -296,7 +297,7 @@ class FormCompany extends Form
|
|||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
if (!empty($htmlname)) {
|
if (!empty($htmlname)) {
|
||||||
$out .= '<select id="'.$htmlname.'" class="flat maxwidth200onsmartphone minwidth300" name="'.$htmlname.'">';
|
$out .= '<select id="'.$htmlname.'" class="flat'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'">';
|
||||||
}
|
}
|
||||||
if ($country_codeid) {
|
if ($country_codeid) {
|
||||||
$out .= '<option value="0"> </option>';
|
$out .= '<option value="0"> </option>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user