Use button functions.

1.10.x
Julio Montoya 10 years ago
parent 8c2bddbe2f
commit ffadc5389d
  1. 2
      main/admin/extra_field_workflow.php
  2. 2
      main/exercice/hotpotatoes.php
  3. 2
      main/group/import.php
  4. 4
      main/inc/lib/auth.lib.php
  5. 20
      main/inc/lib/tracking.lib.php
  6. 2
      main/mySpace/course.php
  7. 2
      main/mySpace/session.php
  8. 2
      main/session/session_user_import.php

@ -184,7 +184,7 @@ if (!empty($roleId)) {
$form->setDefaults(array('status' => $roleId));
} else {
$form->addElement('button', 'submit', get_lang('Edit'));
$form->addButtonUpdate(get_lang('Edit'));
}
$form->display();

@ -75,7 +75,7 @@ if ($finish == 0) {
}
$form->addElement('file', 'userFile', $label);
$form->addElement('button', 'submit', get_lang('SendFile'));
$form->addButtonSend(get_lang('SendFile'));
// If finish is set; it's because the user came from this script in the first place (displaying hidden "finish" field).
if ((api_is_allowed_to_edit(null, true)) && (($finish == 0) || ($finish == 2))) {

@ -29,7 +29,7 @@ $form->addElement('file', 'file', get_lang('ImportCSVFileLocation'));
$form->addRule('file', get_lang('ThisFieldIsRequired'), 'required');
$form->addElement('checkbox', 'delete_not_in_file', null, get_lang('DeleteItemsNotInFile'));
$form->addElement('label', null, Display::url(get_lang('ExampleCSVFile'), api_get_path(WEB_CODE_PATH).'group/example.csv'));
$form->addElement('button', 'submit', get_lang('Import'));
$form->addButtonImport(get_lang('Import'));
if ($form->validate()) {
if (isset($_FILES['file']['tmp_name']) &&

@ -629,8 +629,8 @@ class Auth
$form->addElement('hidden', 'sec_token', $_SESSION['sec_token']);
$form->addElement('hidden', 'subscribe_user_with_password', $all_course_information['code']);
$form->addElement('text', 'course_registration_code');
$form->addElement('button', 'submit', get_lang('SubmitRegistrationCode'));
$content = $form->return_form();
$form->addButton(get_lang('SubmitRegistrationCode'));
$content = $form->returnForm();
return array('message' => $message, 'content' => $content);
}
}

@ -5459,7 +5459,12 @@ class Tracking
{
global $_configuration;
$form->addElement('text', 'keyword', get_lang('Keyword'));
$form->addElement('select', 'active', get_lang('Status'), array(1 => get_lang('Active'), 0 => get_lang('Inactive')));
$form->addElement(
'select',
'active',
get_lang('Status'),
array(1 => get_lang('Active'), 0 => get_lang('Inactive'))
);
if (isset($_configuration['save_user_last_login']) &&
$_configuration['save_user_last_login']
) {
@ -5467,10 +5472,19 @@ class Tracking
'select',
'sleeping_days',
get_lang('InactiveDays'),
array('', 1 => 1, 5 => 5, 15 => 15, 30 => 30, 60 => 60, 90 => 90, 120 => 120)
array(
'',
1 => 1,
5 => 5,
15 => 15,
30 => 30,
60 => 60,
90 => 90,
120 => 120,
)
);
}
$form->addElement('button', 'submit', get_lang('Search'));
$form->addButtonSearch(get_lang('Search'));
return $form;
}

@ -323,7 +323,7 @@ $table->set_header(9, get_lang('Details'), false);
$form = new FormValidator('search_course', 'get', api_get_path(WEB_CODE_PATH).'mySpace/course.php');
$form->addElement('text', 'keyword', get_lang('Keyword'));
$form->addElement('button', 'submit', get_lang('Search'));
$form->addButtonSearch(get_lang('Search'));
$form->addElement('hidden', 'session_id', $sessionId);
$keyword = isset($_GET['keyword']) ? Security::remove_XSS($_GET['keyword']) : null;

@ -89,7 +89,7 @@ if (api_is_drh() || api_is_session_admin() || api_is_platform_admin()) {
$form = new FormValidator('search_course', 'get', api_get_path(WEB_CODE_PATH).'mySpace/session.php');
$form->addElement('text', 'keyword', get_lang('Keyword'));
$form->addElement('button', 'submit', get_lang('Search'));
$form->addButtonSearch(get_lang('Search'));
$form->addElement('hidden', 'session_id', $sessionId);
$keyword = '';
if ($form->validate()) {

@ -86,7 +86,7 @@ $form = new FormValidator(
$form->addElement('hidden', 'formSent', 1);
$form->addElement('file', 'import_file', get_lang('ImportCSVFileLocation'));
$form->addElement('checkbox', 'sendMail', null, get_lang('SendMailToUsers'));
$form->addElement('button', 'submit', get_lang('Import'));
$form->addButtonImport(get_lang('Import'));
$form->display();

Loading…
Cancel
Save