Minor - add default see BT#4301

1.10.x
Julio Montoya 10 years ago
parent 1fe2621349
commit fa4db6debe
  1. 15
      main/admin/usergroups.php

@ -35,7 +35,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'add') {
$tool = 'Add';
$interbreadcrumb[] = array('url' => api_get_self(), 'name' => get_lang('Group'));
}
if (isset($_GET['action']) && $_GET['action'] == 'editnote') {
if (isset($_GET['action']) && $_GET['action'] == 'edit') {
$tool = 'Modify';
$interbreadcrumb[] = array('url' => api_get_self(), 'name' => get_lang('Group'));
}
@ -101,13 +101,16 @@ if (isset($_GET['action']) && $_GET['action'] == 'add') {
api_not_allowed();
}
$_SESSION['notebook_view'] = 'creation_date';
//@todo move this in the career.lib.php
// Initiate the object
$form = new FormValidator('note', 'post', api_get_self().'?action='.Security::remove_XSS($_GET['action']));
$form = new FormValidator(
'usergroup',
'post',
api_get_self().'?action='.Security::remove_XSS($_GET['action'])
);
$usergroup->setForm($form, 'add');
// Setting the defaults
$form->setDefaults(['visibility' => 2]);
// The validation or display
if ($form->validate()) {
$values = $form->exportValues();

Loading…
Cancel
Save