From 11dd6b191884e6255e563f8abb9ee7b079e367e5 Mon Sep 17 00:00:00 2001 From: Carlos Vargas Date: Wed, 25 Mar 2009 01:10:44 +0100 Subject: [PATCH] [svn r19261] Change styles for buttons in admin see FS#3541 --- main/admin/course_category.php | 13 +++++++++++-- main/admin/course_edit.php | 4 ++-- main/admin/course_import.php | 2 +- main/admin/course_list.php | 8 ++++---- main/admin/course_user_import.php | 2 +- main/admin/user_fields_add.php | 11 +++++++++-- main/admin/user_import.php | 4 ++-- 7 files changed, 30 insertions(+), 14 deletions(-) diff --git a/main/admin/course_category.php b/main/admin/course_category.php index 0dd50a97fd..157884e167 100644 --- a/main/admin/course_category.php +++ b/main/admin/course_category.php @@ -1,4 +1,4 @@ -   - " /> + + diff --git a/main/admin/course_edit.php b/main/admin/course_edit.php index cb0760eca1..3120c2d8c6 100644 --- a/main/admin/course_edit.php +++ b/main/admin/course_edit.php @@ -1,4 +1,4 @@ -addElement('radio', 'unsubscribe', null, get_lang('NotAllowedToUnsubscrib $form->addElement('text','disk_quota',get_lang('CourseQuota')); $form->addRule('disk_quota', get_lang('ThisFieldIsRequired'),'required'); $form->addRule('disk_quota',get_lang('ThisFieldShouldBeNumeric'),'numeric'); -$form->addElement('button', null, get_lang('Ok'), 'onclick="valide()"'); +$form->addElement('style_submit_button', 'button', get_lang('ModifyCourseInfo'),'onclick="valide()"; class="search"'); // Set some default values $course_db_name = $course['db_name']; diff --git a/main/admin/course_import.php b/main/admin/course_import.php index da50799ca2..143627a43c 100644 --- a/main/admin/course_import.php +++ b/main/admin/course_import.php @@ -201,7 +201,7 @@ if (count($errors) != 0)
- +

:

diff --git a/main/admin/course_list.php b/main/admin/course_list.php index 128cc822df..c0abe6e712 100644 --- a/main/admin/course_list.php +++ b/main/admin/course_list.php @@ -1,4 +1,4 @@ -addElement('radio', 'keyword_unsubscribe', get_lang('Unsubscription'), get_lang('AllowedToUnsubscribe'), 1); $form->addElement('radio', 'keyword_unsubscribe', null, get_lang('NotAllowedToUnsubscribe'), 0); $form->addElement('radio', 'keyword_unsubscribe', null, get_lang('All'), '%'); - $form->addElement('submit', 'submit', get_lang('Ok')); + $form->addElement('style_submit_button', 'submit', get_lang('SearchCourse'),'class="search"'); $defaults['keyword_language'] = '%'; $defaults['keyword_visibility'] = '%'; $defaults['keyword_subscribe'] = '%'; @@ -252,7 +252,7 @@ else $renderer =& $form->defaultRenderer(); $renderer->setElementTemplate('{element} '); $form->addElement('text','keyword',get_lang('keyword')); - $form->addElement('submit','submit',get_lang('Search')); + $form->addElement('style_submit_button', 'submit', get_lang('SearchCourse'),'class="search"'); $form->addElement('static','search_advanced_link',null,''.get_lang('AdvancedSearch').''); echo '
'.Display::return_icon('view_more_stats.gif',get_lang('AddSession')).get_lang('AddCourse').' diff --git a/main/admin/course_user_import.php b/main/admin/course_user_import.php index fec51da23d..a8b6597747 100644 --- a/main/admin/course_user_import.php +++ b/main/admin/course_user_import.php @@ -187,7 +187,7 @@ $form = new FormValidator('course_user_import'); $form->addElement('file','import_file', get_lang('ImportFileLocation')); $form->addElement('checkbox','subscribe',get_lang('Action'),get_lang('SubscribeUserIfNotAllreadySubscribed')); $form->addElement('checkbox','unsubscribe','',get_lang('UnsubscribeUserIfSubscriptionIsNotInFile')); -$form->addElement('submit','submit',get_lang('Ok')); +$form->addElement('style_submit_button', 'submit',get_lang('Import'),'class="save"'); if ($form->validate()) { $users_courses = parse_csv_data($_FILES['import_file']['tmp_name']); $errors = validate_data($users_courses); diff --git a/main/admin/user_fields_add.php b/main/admin/user_fields_add.php index 04527027e6..dbdc7172ab 100644 --- a/main/admin/user_fields_add.php +++ b/main/admin/user_fields_add.php @@ -1,4 +1,4 @@ -setDefaults($defaults); + if(isset($_GET['field_id']) && !empty($_GET['field_id'])) { + $class="save"; + $text=get_lang('buttonEditUserField'); + } else { + $class="add"; + $text=get_lang('buttonAddUserField'); + } // Submit button -$form->addElement('style_submit_button', 'submit', get_lang('buttonAddUserField'), "class='add'"); +$form->addElement('style_submit_button', 'submit',$text, 'class='.$class.''); // Validate form if( $form->validate()) { diff --git a/main/admin/user_import.php b/main/admin/user_import.php index 6fe222ea3b..79c0270e8a 100644 --- a/main/admin/user_import.php +++ b/main/admin/user_import.php @@ -1,4 +1,4 @@ -addElement('radio', 'file_type', get_lang('FileType'), 'XML ('.get_lang('ExampleCSVFile').')', 'csv'); $form->addElement('radio', 'sendMail', get_lang('SendMailToUsers'), get_lang('Yes'), 1); $form->addElement('radio', 'sendMail', null, get_lang('No'), 0); -$form->addElement('style_submit_button', 'submit',get_lang('Ok'),'class="save"'); +$form->addElement('style_submit_button', 'submit',get_lang('Import'),'class="save"'); $defaults['formSent'] = 1; $defaults['file_type'] = 'xml'; $form->setDefaults($defaults);