Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions mod/users/class/User_Form.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -368,6 +368,7 @@ public static function manageMembers(PHPWS_Group $group)
$form->addHidden('command', 'postMembers');
$form->addHidden('group_id', $group->getId());
$form->addText('search_member');
$form->setClass('search_member', 'form-control');
$form->setLabel('search_member', 'Add Member');
$form->addSubmit('search', 'Add');

Expand DownExpand Up@@ -514,6 +515,7 @@ public static function userForm(PHPWS_User $user, $message = NULL)
$message['AUTHORIZE'] = dgettext('users', 'Warning: this user\'s authorization script is broken. Choose another and update.');
}
$form->addSelect('authorize', $result);
$form->setClass('authorize', 'form-control');
$form->setMatch('authorize', $user->authorize);
$form->setLabel('authorize', 'Authorization');
}
Expand All@@ -523,6 +525,7 @@ public static function userForm(PHPWS_User $user, $message = NULL)
$form->addText('username', $user->getUsername());
$form->setRequired('username');
$form->setLabel('username', 'Username');
$form->setClass('username', 'form-control');
$form->addPassword('password1');
$form->addPassword('password2');
$form->setLabel('password1', 'Password');
Expand All@@ -532,7 +535,9 @@ public static function userForm(PHPWS_User $user, $message = NULL)
$form->addTplTag('USERNAME_LABEL', '<strong>' . 'Username' . '</strong>');
}
$form->addText('display_name', $user->display_name);
$form->setClass('display_name', 'form-control');
$form->addText('email', $user->getEmail());
$form->setClass('email', 'form-control');
$form->setSize('email', 30);
$form->setRequired('email');

Expand DownExpand Up@@ -665,6 +670,7 @@ public static function groupForm(PHPWS_Group $group)
$form->addHidden('command', 'postGroup');

$form->addText('groupname', $group->getName());
$form->setClass('groupname', 'form-control');
$form->setLabel('groupname', 'Group Name');
$template = $form->getTemplate();

Expand All@@ -688,6 +694,7 @@ public static function groupForm(PHPWS_Group $group)
public function memberForm()
{
$form->add('add_member', 'textfield');
$form->setClass('add_member', 'form-control');
$form->add('new_member_submit', 'submit', 'Add');

$template['CURRENT_MEMBERS'] = User_Form::memberListForm($group);
Expand DownExpand Up@@ -836,6 +843,7 @@ public static function authorizationSetup()
$template['FILE_LIST'] = 'No new scripts found';
} else {
$form->addSelect('file_list', $remaining_files);
$form->setClass('file_list', 'form-control');
$form->reindexValue('file_list');
$form->addSubmit('add_script', 'Add Script File');
}
Expand DownExpand Up@@ -880,6 +888,7 @@ public static function authorizationSetup()
$row['CHECK'] = sprintf('<input type="radio" name="default_authorization" value="%s" %s />', $id, $checked);
$form = new PHPWS_Form();
$form->addSelect("default_group[$id]", $groups);
$form->setClass('default_group[$id]', 'form-control');
$form->setMatch("default_group[$id]", $default_group);
$row['DEFAULT_GROUP'] = $form->get("default_group[$id]");

Expand DownExpand Up@@ -907,6 +916,7 @@ public static function settings()
$form->addSubmit('submit', 'Update Settings');

$form->addText('site_contact', PHPWS_User::getUserSetting('site_contact'));
$form->setClass('site_contact', 'form-control');
$form->setLabel('site_contact', 'Site contact email');
$form->setSize('site_contact', 40);

Expand DownExpand Up@@ -949,6 +959,7 @@ public static function settings()

$form->addSelect('user_menu', $menu_options);
$form->setMatch('user_menu', PHPWS_User::getUserSetting('user_menu'));
$form->setClass('user_menu', 'form-control');
$form->setLabel('user_menu', 'User Menu');

$form->addCheckBox('show_login', 1);
Expand All@@ -966,6 +977,7 @@ public static function settings()
}

$form->addTextArea('forbidden_usernames', PHPWS_Settings::get('users', 'forbidden_usernames'));
$form->setClass('forbidden_usernames', 'form-control');
$form->setLabel('forbidden_usernames', dgettext('users', 'Forbidden usernames (one per line)'));

$form->addCheckbox('session_warning', 1);
Expand Down