| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- /* Copyright (C) 2014 Maxime Kohlhaas <support@atm-consulting.fr>
- * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- *
- * Need to have following variables defined:
- * $object (invoice, order, ...)
- * $action
- * $conf
- * $langs
- *
- * $parameters
- * $cols
- */
- // Protection to avoid direct call of template
- if (empty($conf) || !is_object($conf)) {
- print "Error, template page can't be called as URL";
- exit;
- }
- ?>
- <!-- BEGIN PHP TEMPLATE extrafields_add.tpl.php -->
- <?php
- // Other attributes
- print '<tr id="freeUsers" style="display:none;"><td>' . $langs->trans('freeusers') . '</td><td class="valuefieldcreate">
- <select id="fk_user" class="flat minwidth300imp" name="fk_user" data-select2-id="fk_user" tabindex="-1" aria-hidden="true">
- <option value="" data-select2-id="100"> </option>';
- foreach($freeUsers['freeUsers'] as $user){
- print '<option value="' . $user['rowid'] . '">' . $user['lastname'] . ' ' . $user['firstname']. ' (' .$user['login']. ')</option>';
- }
- print '</select>
- </td></tr>';
- print '<tr id="freeHotels" style="display:none;"><td>' . $langs->trans('freehotels') . '</td><td class="valuefieldcreate">
- <select id="hotel" class="flat minwidth300imp" name="hotel" data-select2-id="hotel" tabindex="-1" aria-hidden="true">
- <option value="" data-select2-id="100"> </option>';
- foreach($freeHotels['freeHotels'] as $hotel){
- print '<option value="' . $hotel['rowid'] . '">' . $hotel['label'] . '</option>';
- }
- print '</select>
- </td></tr>';
- ?>
- <!-- END PHP TEMPLATE extrafields_add.tpl.php -->
|