Exemplo n.º 1
0
               <?php 
echo _n('LDAP directory', 'LDAP directories', 1);
?>
            </label>
         </td>
         <td>
            <div id="dropdown_values_field">
               <?php 
$optgroup = Dropdown::getStandardDropdownItemTypes();
array_unshift($optgroup, '---');
Dropdown::showFromArray('dropdown_values', $optgroup, array('value' => $question->fields['values'], 'rand' => $rand, 'on_change' => 'change_dropdown();'));
?>
            </div>
            <div id="glpi_objects_field">
               <?php 
$optgroup = array(__("Assets") => PluginFormcreatorForm::ArrayListOfItemtypes(), __("Assistance") => array('Ticket' => _n("Ticket", "Tickets", 2), 'Problem' => _n("Problem", "Problems", 2), 'TicketRecurrent' => __("Recurrent tickets")), __("Management") => array('Budget' => _n("Budget", "Budgets", 2), 'Supplier' => _n("Supplier", "Suppliers", 2), 'Contact' => _n("Contact", "Contacts", 2), 'Contract' => _n("Contract", "Contracts", 2), 'Document' => _n("Document", "Documents", 2)), __("Tools") => array('Notes' => __("Notes"), 'RSSFeed' => __("RSS feed")), __("Administration") => array('User' => _n("User", "Users", 2), 'Group' => _n("Group", "Groups", 2), 'Entity' => _n("Entity", "Entities", 2), 'Profile' => _n("Profile", "Profiles", 2)));
array_unshift($optgroup, '---');
Dropdown::showFromArray('glpi_objects', $optgroup, array('value' => $question->fields['values'], 'rand' => $rand, 'on_change' => 'change_glpi_objects();'));
?>
            </div>
            <div id="glpi_ldap_field">
            <?php 
$ldap_values = json_decode(plugin_formcreator_decode($question->fields['values']));
Dropdown::show('AuthLDAP', array('name' => 'ldap_auth', 'rand' => $rand, 'value' => isset($ldap_values->ldap_auth) ? $ldap_values->ldap_auth : '', 'on_change' => 'change_LDAP(this)'));
?>
            </div>
         </td>
      </tr>

      <tr class="line0" id="required_tr">
         <td>