From a961d20857fea777a52050f641311efe38c9fec0 Mon Sep 17 00:00:00 2001 From: Carlos Vargas Date: Tue, 24 Mar 2009 23:18:53 +0100 Subject: [PATCH] [svn r19254] Partial add style for buttons see FS#3541 --- main/calendar/agenda.inc.php | 13 +++++++++++-- main/document/upload.php | 4 ++-- main/exercice/exercise_show.php | 4 ++-- main/exercice/hotpotatoes.php | 4 ++-- main/link/link.php | 4 ++-- main/survey/create_new_survey.php | 11 +++++++++-- main/survey/survey.lib.php | 13 ++++++++++--- main/survey/survey_invite.php | 2 +- main/user/userInfo.php | 4 ++-- main/work/work.lib.php | 6 +++--- main/work/work.php | 12 ++++++------ 11 files changed, 50 insertions(+), 27 deletions(-) diff --git a/main/calendar/agenda.inc.php b/main/calendar/agenda.inc.php index 1242fad14b..06bb05f9c4 100644 --- a/main/calendar/agenda.inc.php +++ b/main/calendar/agenda.inc.php @@ -1,4 +1,4 @@ -
- + + diff --git a/main/document/upload.php b/main/document/upload.php index a38586f2d6..adc6f63cf0 100644 --- a/main/document/upload.php +++ b/main/document/upload.php @@ -1,4 +1,4 @@ -addElement('radio', 'if_exists', get_lang('UplWhatIfFileExists'), get_lan $form->addElement('radio', 'if_exists', '', get_lang('UplOverwriteLong'), 'overwrite'); $form->addElement('radio', 'if_exists', '', get_lang('UplRenameLong'), 'rename'); -$form->addElement('style_submit_button', 'submitDocument', get_lang('Send'),'class="save"'); +$form->addElement('style_submit_button', 'submitDocument', get_lang('SendDocument'),'class="save"'); $form->add_real_progress_bar('DocumentUpload','user_upload'); diff --git a/main/exercice/exercise_show.php b/main/exercice/exercise_show.php index 7c17aac276..fb41fabf02 100644 --- a/main/exercice/exercise_show.php +++ b/main/exercice/exercise_show.php @@ -4,7 +4,7 @@ * * @package dokeos.exercise * @author Julio Montoya Armas Added switchable fill in blank option added -* @version $Id: exercise_show.php 18840 2009-03-08 22:52:35Z yannoo $ +* @version $Id: exercise_show.php 19254 2009-03-24 22:18:53Z cvargas1 $ * * @todo remove the debug code and use the general debug library * @todo use the Database:: functions @@ -1020,7 +1020,7 @@ function display_hotspot_answer($answerId, $answer, $studentChoice, $answerComme if ($origin!='learnpath' && $origin!='student_progress') { ?> - + '; echo ''; echo ''; - echo ''; + echo ''; echo ''; echo ''; echo ''; diff --git a/main/link/link.php b/main/link/link.php index c2cb6bcb77..bf52601baf 100644 --- a/main/link/link.php +++ b/main/link/link.php @@ -1,4 +1,4 @@ -".get_lang("Description")." :", "", //"", - "", + "", "", ""; } diff --git a/main/survey/create_new_survey.php b/main/survey/create_new_survey.php index 8c77a0622a..ac1646fdae 100644 --- a/main/survey/create_new_survey.php +++ b/main/survey/create_new_survey.php @@ -25,7 +25,7 @@ * @author unknown, the initial survey that did not make it in 1.8 because of bad code * @author Patrick Cool , Ghent University: cleanup, refactoring and rewriting large parts (if not all) of the code * @author Julio Montoya Armas , Dokeos: Personality Test modification and rewriting large parts of the code -* @version $Id: create_new_survey.php 19004 2009-03-12 18:04:08Z juliomontoya $ +* @version $Id: create_new_survey.php 19254 2009-03-24 22:18:53Z cvargas1 $ * * @todo only the available platform languages should be used => need an api get_languages and and api_get_available_languages (or a parameter) */ @@ -263,7 +263,14 @@ if ((isset($_GET['action']) && $_GET['action'] == 'edit') && !empty($survey_id) } $form -> addElement('html','
'); -$form->addElement('style_submit_button', 'submit_survey', get_lang('Ok'), 'class="save"'); +if(isset($_GET['survey_id']) && $_GET['action']=='edit') { + $class="save"; + $text=get_lang('ModifySurvey'); +} else { + $class="add"; + $text=get_lang('CreateSurvey'); +} +$form->addElement('style_submit_button', 'submit_survey', $text, 'class="'.$class.'"'); // setting the rules if ($_GET['action'] == 'add') diff --git a/main/survey/survey.lib.php b/main/survey/survey.lib.php index 3aab5f3d93..7189ac16db 100644 --- a/main/survey/survey.lib.php +++ b/main/survey/survey.lib.php @@ -24,7 +24,7 @@ * @package dokeos.survey * @author Patrick Cool , Ghent University: cleanup, refactoring and rewriting large parts (if not all) of the code @author Julio Montoya Armas , Dokeos: Personality Test modification and rewriting large parts of the code -* @version $Id: survey.lib.php 19045 2009-03-13 23:33:29Z derrj $ +* @version $Id: survey.lib.php 19254 2009-03-24 22:18:53Z cvargas1 $ * * @todo move this file to inc/lib * @todo use consistent naming for the functions (save vs store for instance) @@ -1406,9 +1406,16 @@ class question */ function render_form() { + if(isset($_GET['question_id']) and !empty($_GET['question_id'])) { + $class="save"; + $text=get_lang('ModifyQuestionSurvey'); + } else { + $class="add"; + $text=get_lang('CreateQuestionSurvey'); + } $this->html .= ' '; $this->html .= '  '; - $this->html .= ' '; + $this->html .= ' '; $this->html .= '  '; $this->html .= ' '; $this->html .= ''; @@ -3715,7 +3722,7 @@ class SurveyUtil { } } echo '

'; - echo ''; + echo ''; echo ''; // getting all the information of the x axis diff --git a/main/survey/survey_invite.php b/main/survey/survey_invite.php index a165ecd428..83ce81570c 100644 --- a/main/survey/survey_invite.php +++ b/main/survey/survey_invite.php @@ -152,7 +152,7 @@ if ($survey_data['anonymous'] != 1) { // allow resending to all selected users $form->addElement('checkbox', 'resend_to_all', '', get_lang('ReminderResendToAllUsers')); // submit button -$form->addElement('style_submit_button', 'submit', get_lang('Send'), 'class="save"'); +$form->addElement('style_submit_button', 'submit', get_lang('PublishSurvey'), 'class="save"'); // The rules (required fields) $form->addRule('mail_title', get_lang('ThisFieldIsRequired'), 'required'); $form->addRule('mail_text', get_lang('ThisFieldIsRequired'), 'required'); diff --git a/main/user/userInfo.php b/main/user/userInfo.php index 58ad2e5048..d13f4d7f84 100644 --- a/main/user/userInfo.php +++ b/main/user/userInfo.php @@ -1,4 +1,4 @@ -\n", "", "", "\n"; + echo "\n", "", "", "\n"; echo "

".Display :: encrypted_mailto_link($mainUserInfo['email'], $mainUserInfo['email'])."

"; diff --git a/main/work/work.lib.php b/main/work/work.lib.php index 5240844d0a..5948ac524e 100644 --- a/main/work/work.lib.php +++ b/main/work/work.lib.php @@ -1,4 +1,4 @@ -, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default. * @author Roan Embrechts, code refactoring and virtual course support * @author Frederic Vauthier, directories management -* @version $Id: work.lib.php 18636 2009-02-23 18:44:54Z yannoo $ +* @version $Id: work.lib.php 19254 2009-03-24 22:18:53Z cvargas1 $ */ /** * Displays action links (for admins, authorized groups members and authorized students) @@ -455,7 +455,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou $form_folder -> addElement('html',''); } - $form_folder -> addElement('submit','submit_edit_dir',get_lang('Ok')); + $form_folder -> addElement('style_submit_button','submit',get_lang('ModifyDirectory'),'class="save"'); if($there_is_a_end_date == true) { $defaults = array_merge($defaults,convert_date_to_array($homework['ends_on'],'ends')); diff --git a/main/work/work.php b/main/work/work.php index 50400c1a2a..eb2857fc67 100644 --- a/main/work/work.php +++ b/main/work/work.php @@ -1,4 +1,4 @@ -, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default. * @author Roan Embrechts, code refactoring and virtual course support * @author Frederic Vauthier, directories management -* @version $Id: work.php 18636 2009-02-23 18:44:54Z yannoo $ +* @version $Id: work.php 19254 2009-03-24 22:18:53Z cvargas1 $ * * @todo refactor more code into functions, use quickforms, coding standards, ... */ @@ -1152,10 +1152,10 @@ if ($is_course_member) { // fix the Ok button when we see the tool in the learn path if ($origin== 'learnpath') { $form->addElement('html', '
'); - $form->addElement('submit', 'submitWork', get_lang('Ok')); + $form->addElement('style_submit_button','submit', get_lang('SendFile'),'class="save"'); $form->addElement('html', '
'); } else { - $form->addElement('submit', 'submitWork', get_lang('Ok')); + $form->addElement('style_submit_button','submit', get_lang('SendFile'),'class="save"'); } if (!empty($_POST['submitWork']) || $edit) { @@ -1228,7 +1228,7 @@ function draw_date_picker($prefix,$default='') { $new_folder_text .= ''; $new_folder_text .= get_lang('NewDir') . ' '; $new_folder_text .= ''; - $new_folder_text .= ''; + $new_folder_text .= ''; //new additional fields inside the "if condition" just to agroup if(true): @@ -1270,7 +1270,7 @@ function draw_date_picker($prefix,$default='') { $new_folder_text .= $addtext; endif; - $new_folder_text .= ''; + $new_folder_text .= ''; $new_folder_text .= '

'; //show the form