[svn r18925] Replaces buttons in admin interfaces and in blogs

skala
Noël Dieschburg 17 years ago
parent 5856f13926
commit 37b9ae6337
  1. 5
      main/admin/user_add.php
  2. 4
      main/admin/user_fields_add.php
  3. 4
      main/coursecopy/classes/CourseSelectForm.class.php
  4. 4
      main/coursecopy/copy_course.php
  5. 4
      main/coursecopy/create_backup.php
  6. 4
      main/coursecopy/import_backup.php
  7. 4
      main/coursecopy/recycle_course.php
  8. 4
      main/exercice/exercice.php
  9. 33
      main/forum/editpost.php
  10. 16
      main/forum/forumfunction.inc.php
  11. 2
      main/forum/reply.php
  12. 6
      main/survey/preview.php
  13. 6
      main/survey/survey.lib.php
  14. 17
      main/user/subscribe_user.php

@ -1,4 +1,4 @@
<?php // $Id: user_add.php 18466 2009-02-12 14:25:22Z juliomontoya $
<?php // $Id: user_add.php 18925 2009-03-10 14:09:33Z ndieschburg $
/*
==============================================================================
Dokeos - elearning and course management software
@ -310,9 +310,8 @@ $defaults['status'] = STUDENT;
$defaults = array_merge($defaults,$extra_data);
$form->setDefaults($defaults);
// Submit button
$form->addElement('style_submit_button', 'submit', get_lang('Add'), 'class="add"');
$form->addElement('style_submit_button', 'submit', get_lang('Add'), 'class="add"') ;
$form->addElement('style_submit_button', 'submit_plus', get_lang('Add').'+', 'class="add"');
// Validate form
if( $form->validate())
{

@ -1,4 +1,4 @@
<?php // $Id: user_fields_add.php 18769 2009-03-02 22:07:40Z iflorespaz $
<?php // $Id: user_fields_add.php 18925 2009-03-10 14:09:33Z ndieschburg $
/*
==============================================================================
Dokeos - elearning and course management software
@ -167,7 +167,7 @@ if (is_numeric($_GET['field_id']))
}
$form->setDefaults($defaults);
// Submit button
$form->addElement('submit', 'submit', get_lang('Add'));
$form->addElement('style_submit_button', 'submit', get_lang('buttonAddUserField'), "class='add'");
// Validate form
if( $form->validate())
{

@ -1,5 +1,5 @@
<?php
// $Id: CourseSelectForm.class.php 17054 2008-12-03 13:38:03Z pcool $
// $Id: CourseSelectForm.class.php 18925 2009-03-10 14:09:33Z ndieschburg $
/*
==============================================================================
Dokeos - elearning and course management software
@ -156,7 +156,7 @@ class CourseSelectForm
echo '<input type="hidden" name="'.$key.'" value="'.$value.'"/>';
}
}
echo '<br /><input type="submit" value="'.get_lang('Ok').'" onclick="checkLearnPath(\''.addslashes(get_lang('DocumentsWillBeAddedToo')).'\')"/>';
echo '<br /><button class="save" type="submit" onclick="checkLearnPath(\''.addslashes(get_lang('DocumentsWillBeAddedToo')).'\')">'.get_lang('Ok').'</button>';
CourseSelectForm :: display_hidden_quiz_questions($course);
CourseSelectForm :: display_hidden_scorm_directories($course);

@ -1,5 +1,5 @@
<?php
// $Id: copy_course.php 15909 2008-08-05 08:42:48Z elixir_julian $
// $Id: copy_course.php 18925 2009-03-10 14:09:33Z ndieschburg $
/*
==============================================================================
Dokeos - elearning and course management software
@ -147,7 +147,7 @@ else
<label for="same_file_name_option_3"><?php echo get_lang('SameFilenameOverwrite') ?></label>
</blockquote>
<br/>
<input type="submit" value="<?php echo get_lang('CopyCourse') ?>"/>
<button class="save" type="submit"><?php echo get_lang('CopyCourse') ?></button>
</form>
<?php
}

@ -1,5 +1,5 @@
<?php
// $Id: create_backup.php 18429 2009-02-10 23:41:38Z ivantcholakov $
// $Id: create_backup.php 18925 2009-03-10 14:09:33Z ndieschburg $
/*
==============================================================================
Dokeos - elearning and course management software
@ -128,7 +128,7 @@ else
$form->addElement('radio', 'backup_option', '', get_lang('CreateFullBackup'), 'full_backup');
$form->addElement('radio', 'backup_option', '', get_lang('LetMeSelectItems'), 'select_items');
$form->addElement('html','<br />');
$form->addElement('submit', null, get_lang('CreateBackup'));
$form->addElement('style_submit_button', null, get_lang('CreateBackup'), 'class="save"');
$form->add_progress_bar();

@ -1,4 +1,4 @@
<?php // $Id: import_backup.php 18429 2009-02-10 23:41:38Z ivantcholakov $
<?php // $Id: import_backup.php 18925 2009-03-10 14:09:33Z ndieschburg $
/*
==============================================================================
Dokeos - elearning and course management software
@ -220,7 +220,7 @@ else
$form->addElement('radio', 'same_file_name_option', '', get_lang('SameFilenameOverwrite'), FILE_OVERWRITE, 'id="same_file_name_option_3" class="checkbox"');
$form->addElement('html', '<br />');
$form->addElement('submit', null, get_lang('ImportBackup'));
$form->addElement('style_submit_button', null, get_lang('ImportBackup'), 'class="save"');
$values['backup_type'] = 'local';
$values['import_option'] = 'full_backup';

@ -1,4 +1,4 @@
<?php // $Id: recycle_course.php 12219 2007-05-01 18:46:59Z yannoo $
<?php // $Id: recycle_course.php 18925 2009-03-10 14:09:33Z ndieschburg $
/*
==============================================================================
Dokeos - elearning and course management software
@ -107,7 +107,7 @@ else
<label for="recycle_option_2"><?php echo get_lang('LetMeSelectItems') ?></label>
<br/>
<br/>
<input type="submit" value="<?php echo get_lang('RecycleCourse') ?>"/>
<button class="save" type="submit"><?php echo get_lang('RecycleCourse') ?></button>
</form>
<?php
}

@ -1,4 +1,4 @@
<?php // $Id: exercice.php 18637 2009-02-23 21:29:20Z cfasanando $
<?php // $Id: exercice.php 18925 2009-03-10 14:09:33Z ndieschburg $
/*
==============================================================================
@ -681,7 +681,7 @@ echo '<div class="actions">';
}
$form_filter = '<form method="post" action="'.api_get_self().'?cidReq='.api_get_course_id().'&show=result">';
$form_filter .= make_select('filter',array(1=>get_lang('FilterByNotRevised'),2=>get_lang('FilterByRevised')),$filter);
$form_filter .= '<button type="submit">'.get_lang('FilterExercices').'</button></form>';
$form_filter .= '<button class="save" type="submit">'.get_lang('FilterExercices').'</button></form>';
echo $form_filter;
}
}

@ -233,24 +233,25 @@ echo "\t</tr>\n";
echo '</table>';
// the form for the reply
$id_attach = isset($_GET['id_attach'])?(int)$_GET['id_attach']:0;
$values=show_edit_post_form($current_post, $current_thread, $current_forum, isset($_SESSION['formelements'])?$_SESSION['formelements']:'',$id_attach);
if (!empty($values) and $_POST['SubmitPost']) {
$values=show_edit_post_form($current_post, $current_thread, $current_forum, isset($_SESSION['formelements'])?$_SESSION['formelements']:'');
if (!empty($values) and isset($_POST['SubmitPost'])) {
store_edit_post($values);
$option_chek=isset($values['thread_qualify_gradebook'])?$values['thread_qualify_gradebook']:null;// values 1 or 0
if ( 1== $option_chek ) {
$id=$values['thread_id'];
$title_gradebook=$values['calification_notebook_title'];
$value_calification=$values['numeric_calification'];
$weight_calification=$values['weight_calification'];
$description="";
$session_id=api_get_session_id();
$link_id=is_resource_in_course_gradebook(api_get_course_id(),5,$id,$session_id);
if ( $link_id==false ) {
add_resource_to_course_gradebook(api_get_course_id(), 5, $id, $title_gradebook,$weight_calification,$value_calification,$description,time(),1,api_get_session_id());
} else {
api_sql_query('UPDATE '.$table_link.' SET weight='.$weight_calification.' WHERE id='.$link_id.'');
}
if ( 1== $option_chek ) {
$id=$values['thread_id'];
$title_gradebook=$values['calification_notebook_title'];
$value_calification=$values['numeric_calification'];
$weight_calification=$values['weight_calification'];
$description="";
$session_id=api_get_session_id();
$link_id=is_resource_in_course_gradebook(api_get_course_id(),5,$id,$session_id);
if ( $link_id==false ) {
add_resource_to_course_gradebook(api_get_course_id(), 5, $id, $title_gradebook,$weight_calification,$value_calification,$description,time(),1,api_get_session_id());
} else {
api_sql_query('UPDATE '.$table_link.' SET weight='.$weight_calification.' WHERE id='.$link_id.'');
}
}
}

@ -89,8 +89,8 @@ get_notifications_of_user();
*/
function handle_forum_and_forumcategories() {
$action_forum_cat = isset($_GET['action']) ? $_GET['action'] : '';
$post_submit_cat= isset($_POST['SubmitForumCategory']) ? $_POST['SubmitForumCategory'] : '';
$post_submit_forum= isset($_POST['SubmitForum']) ? $_POST['SubmitForum'] : '';
$post_submit_cat= isset($_POST['SubmitForumCategory']) ? true : false;
$post_submit_forum= isset($_POST['SubmitForum']) ? true : false;
$get_id=isset($_GET['id']) ? $_GET['id'] : '';
// Adding a forum category
if (($action_forum_cat=='add' && $_GET['content']=='forumcategory') || $post_submit_cat ) {
@ -106,7 +106,7 @@ function handle_forum_and_forumcategories() {
show_add_forum_form($inputvalues);
}
// Edit a forum category
if (($action_forum_cat=='edit' && $_GET['content']=='forumcategory' && isset($_GET['id'])) || $_POST['SubmitEditForumCategory'] )
if (($action_forum_cat=='edit' && $_GET['content']=='forumcategory' && isset($_GET['id'])) || (isset($_POST['SubmitEditForumCategory'])) ? true : false )
{
$forum_category=get_forum_categories(strval(intval($_GET['id']))); // note: this has to be cleaned first
show_edit_forumcategory_form($forum_category);
@ -158,7 +158,7 @@ function show_add_forumcategory_form($inputvalues=array()) {
$form->addElement('header', '', get_lang('AddForumCategory'));
$form->addElement('text', 'forum_category_title', get_lang('Title'),'class="input_titles"');
$form->addElement('html_editor', 'forum_category_comment', get_lang('Comment'));
$form->addElement('submit', 'SubmitForumCategory', get_lang('Ok'));
$form->addElement('style_submit_button', 'SubmitForumCategory', get_lang('Ok'), 'class="save"');
// setting the rules
$form->addRule('forum_category_title', '<div class="required">'.get_lang('ThisFieldIsRequired'), 'required');
@ -327,7 +327,7 @@ function show_add_forum_form($inputvalues=array()) {
$form->addElement('html','</div>');
// The OK button
$form->addElement('submit', 'SubmitForum', get_lang('Ok'));
$form->addElement('style_submit_button', 'SubmitForum', get_lang('Ok'), 'class="save"');
// setting the rules
$form->addRule('forum_title', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('forum_category', get_lang('ThisFieldIsRequired'), 'required');
@ -425,7 +425,7 @@ function show_edit_forumcategory_form($inputvalues=array()) {
$form->addElement('hidden', 'forum_category_id');
$form->addElement('text', 'forum_category_title', get_lang('Title'),'class="input_titles"');
$form->addElement('html_editor', 'forum_category_comment', get_lang('Comment'));
$form->addElement('submit', 'SubmitEditForumCategory',get_lang('Ok'));
$form->addElement('style_submit_button', 'SubmitEditForumCategory',get_lang('Ok'), 'class="save"');
global $charset;
// setting the default values
$defaultvalues['forum_category_id']=$inputvalues['cat_id'];
@ -1895,7 +1895,7 @@ function show_add_post_form($action='', $id='', $form_values='') {
$info =api_get_user_info($userid);
$courseid=api_get_course_id();
$form->addElement('submit', 'SubmitPost', get_lang('Ok'));
$form->addElement('style_submit_button', 'SubmitPost', get_lang('Ok'), 'class="save"');
$form->add_real_progress_bar('DocumentUpload','user_upload');
if ( !empty($form_values) ) {
@ -2319,7 +2319,7 @@ function show_edit_post_form($current_post, $current_thread, $current_forum, $fo
$values = $form->exportValues();
}
$form->addElement('submit', 'SubmitPost', get_lang('Ok'));
$form->addElement('style_submit_button', 'SubmitPost', get_lang('Ok'), 'class="save"');
global $charset;
// setting the default values for the form elements
$defaults['post_title']=prepare4display(html_entity_decode($current_post['post_title'],ENT_QUOTES,$charset));

@ -214,7 +214,7 @@ $my_post = isset($_GET['post']) ? $_GET['post'] : '';
$my_elements = isset($_SESSION['formelements']) ? $_SESSION['formelements'] : '';
$values=show_add_post_form($my_action,$my_post, $my_elements); // note: this has to be cleaned first
if (!empty($values) AND $_POST['SubmitPost']) {
if (!empty($values) AND isset($_POST['SubmitPost'])) {
store_reply($values);
}

@ -93,7 +93,7 @@ else
}
// displaying the survey thanks message
if ($_POST['finish_survey'])
if(isset($_POST['finish_survey']))
{
echo '<div id="survey_content" class="survey_content"><strong>'.get_lang('SurveyFinished').' </strong>'.$survey_data['survey_thanks'].'</div>';
Display :: display_footer();
@ -186,11 +186,11 @@ else
if (($show < $numberofpages) OR !$_GET['show'])
{
//echo '<a href="'.api_get_self().'?survey_id='.$_GET['survey_id'].'&amp;show='.$limit.'">NEXT</a>';
echo '<br /><input type="submit" name="next_survey_page" value="'.get_lang('Next').' >> " />';
echo '<br /><button type="submit" name="next_survey_page">'.get_lang('Next').' >> </button>';
}
if ($show >= $numberofpages AND $_GET['show'])
{
echo '<input type="submit" name="finish_survey" value="'.get_lang('FinishSurvey').' >> " />';
echo '<button type="submit" name="finish_survey">'.get_lang('FinishSurvey').' >> </button>';
}
echo '</form>';
}

@ -24,7 +24,7 @@
* @package dokeos.survey
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts (if not all) of the code
@author Julio Montoya Armas <gugli100@gmail.com>, Dokeos: Personality Test modification and rewriting large parts of the code
* @version $Id: survey.lib.php 18472 2009-02-12 18:00:38Z juliomontoya $
* @version $Id: survey.lib.php 18925 2009-03-10 14:09:33Z ndieschburg $
*
* @todo move this file to inc/lib
* @todo use consistent naming for the functions (save vs store for instance)
@ -2947,9 +2947,9 @@ class SurveyUtil {
echo ' <th>';
if ($_POST['submit_question_filter'] OR $_POST['export_report'])
{
echo ' <input type="submit" name="reset_question_filter" value="'.get_lang('ResetQuestionFilter').'" />';
echo ' <button class="save" type="submit" name="reset_question_filter" value="'.get_lang('ResetQuestionFilter').'">'.get_lang('ResetQuestionFilter').'</button>';
}
echo ' <input type="submit" name="submit_question_filter" value="'.get_lang('SubmitQuestionFilter').'"/';
echo ' <button class="save" type="submit" name="submit_question_filter" value="'.get_lang('SubmitQuestionFilter').'">'.get_lang('SubmitQuestionFilter').'</button>';
echo '</th>';
$display_extra_user_fields = false;

@ -1,4 +1,4 @@
<?php // $Id: subscribe_user.php 18156 2009-02-02 17:02:08Z juliomontoya $
<?php // $Id: subscribe_user.php 18925 2009-03-10 14:09:33Z ndieschburg $
/*
==============================================================================
Dokeos - elearning and course management software
@ -129,12 +129,13 @@ if (isset ($_POST['action'])) {
$list_register_user='';
if ($$is_suscribe_counter!=1) {
//if ($$is_suscribe_counter!=1) {
for ($i=0; $i<$$is_suscribe_counter;$i++) {
for ($j=0; $j<count($user_id_temp);$j++) {
if ($is_suscribe_user_id[$i]==$user_id_temp[$j]) {
if ($is_suscribe[$i]) {
$list_register_user.=" - ".$user_name_temp[$j].'<br/>';
$list_register_user.=" - ".$user_name_temp[$j].'<br/>';
$temp_unique_user=$user_name_temp[$j];
$counter++;
} else {
$list_not_register_user.=" - ".$user_name_temp[$j].'<br/>';
@ -142,13 +143,13 @@ if (isset ($_POST['action'])) {
}
}
}
} else {
$list_register_user=$user_name_temp[0]; // only 1 user register
}
//} else {
//$list_register_user=$temp_unique_user; // only 1 user register
//}
if (!empty($list_register_user)) {
if ($$is_suscribe_counter==1) {
$register_user_message=$list_register_user.' '.get_lang('langAddedToCourse');
$register_user_message=$temp_unique_user.' '.get_lang('langAddedToCourse');
Display::display_confirmation_message($register_user_message,false);
} else {
$register_user_message='<br />'.get_lang('UsersRegistered').'<br/><br />'.$list_register_user;
@ -419,7 +420,7 @@ $form = new FormValidator('search_user', 'POST',api_get_self().'?type='.$_REQUES
$renderer = & $form->defaultRenderer();
$renderer->setElementTemplate('<span>{element}</span> ');
$form->add_textfield('keyword', '', false);
$form->addElement('submit', 'submit', get_lang('SearchButton'));
$form->addElement('style_submit_button', 'submit', get_lang('SearchButton'), 'class="search"');
$form->display();
echo '</div>';

Loading…
Cancel
Save