Minor - Fixing checkboxes

skala
Julio Montoya 15 years ago
parent fe4a2c606e
commit e11a017185
  1. 11
      main/document/create_document.php
  2. 5
      main/dropbox/dropbox_functions.inc.php
  3. 10
      main/link/link.php
  4. 4
      main/newscorm/lp_add.php
  5. 19
      main/survey/create_new_survey.php

@ -18,7 +18,16 @@ require_once '../inc/global.inc.php';
$_SESSION['whereami'] = 'document/create';
$this_section = SECTION_COURSES;
$htmlHeadXtra[] = '<script type="text/javascript">
$htmlHeadXtra[] = '
<style>
.formw {
margin-left:200px !important;
}
form .label {
width: 160px !important;
}
</style>
<script type="text/javascript">
function InnerDialogLoaded() {
/*
var B=new window.frames[0].FCKToolbarButton(\'Templates\',window.frames[0].FCKLang.Templates);

@ -488,7 +488,10 @@ function display_add_form() {
</div>
<div class="formw">
<input type="checkbox" name="cb_overwrite" id="cb_overwrite" value="true" /><?php echo get_lang('OverwriteFile'); ?>
<input type="checkbox" name="cb_overwrite" id="cb_overwrite" value="true" />
<label for="cb_overwrite">
<?php echo get_lang('OverwriteFile'); ?>
</label>
</div>
</div>
<?php

@ -259,16 +259,15 @@ if (api_is_allowed_to_edit(null, true) && isset($_GET['action'])) {
</div>';
}
echo ' <div class="row">
<div class="label">
'.get_lang('OnHomepage').'?
<div class="label">
</div>
<div class="formw">
<input class="checkbox" type="checkbox" name="onhomepage" id="onhomepage" value="1"'.$onhomepage.'><label for="onhomepage"> '.get_lang('Yes').'</label>
<input class="checkbox" type="checkbox" name="onhomepage" id="onhomepage" value="1"'.$onhomepage.'><label for="onhomepage"> '.get_lang('OnHomepage').'?</label>
</div>
</div>';
echo ' <div class="row" id="div_target">
<div class="label">
'.get_lang('AddTargetOfLinkOnHomepage').'
'.get_lang('LinkTarget').'
</div>
<div class="formw">
<select name="target_link" id="target_link">';
@ -281,6 +280,9 @@ if (api_is_allowed_to_edit(null, true) && isset($_GET['action'])) {
echo ' <option value="'.$target_id.'"'.$selected.'>'.$target.'</option> ';
}
echo ' </select>
<span class="help-block">
'.get_lang('AddTargetOfLinkOnHomepage').'
</span>
</div>
</div>';

@ -134,13 +134,13 @@ $form->addElement('hidden', 'post_time', time());
$form->addElement('hidden', 'action', 'add_lp');
//Start date
$form->addElement('checkbox', 'activate_start_date_check',get_lang('EnableStartTime'),null, array('onclick' => 'activate_start_date()'));
$form->addElement('checkbox', 'activate_start_date_check', null, get_lang('EnableStartTime'), array('onclick' => 'activate_start_date()'));
$form->addElement('html','<div id="start_date_div" style="display:block;">');
$form->addElement('datepicker', 'publicated_on', get_lang('PublicationDate'), array('form_name'=>'exercise_admin'), 5);
$form->addElement('html','</div>');
//End date
$form->addElement('checkbox', 'activate_end_date_check', get_lang('EnableEndTime'), null,array('onclick' => 'activate_end_date()'));
$form->addElement('checkbox', 'activate_end_date_check', null, get_lang('EnableEndTime'), array('onclick' => 'activate_end_date()'));
$form->addElement('html','<div id="end_date_div" style="display:none;">');
$form->addElement('datepicker', 'expired_on', get_lang('ExpirationDate'), array('form_name'=>'exercise_admin'), 5);
$form->addElement('html','</div>');

@ -25,10 +25,7 @@ $this_section = SECTION_COURSES;
//require_once api_get_path(LIBRARY_PATH).'survey.lib.php';
require_once 'survey.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/gradebook_functions.inc.php';
$htmlHeadXtra[] = '<script type="text/javascript" language="javascript">
@ -159,25 +156,25 @@ $form->addElement('datepickerdate', 'end_date', get_lang('EndDate'), array('form
//$group[] =& HTML_QuickForm::createElement('radio', 'survey_share', null, get_lang('No'), 0);
//$form->addGroup($group, 'survey_share', get_lang('ShareSurvey'), '&nbsp;');
$form->addElement('checkbox', 'anonymous', get_lang('Anonymous'));
$form->addElement('checkbox', 'anonymous', null, get_lang('Anonymous'));
$form->addElement('html_editor', 'survey_introduction', get_lang('SurveyIntroduction'), null, array('ToolbarSet' => 'Survey', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false));
$form->addElement('html_editor', 'survey_thanks', get_lang('SurveyThanks'), null, array('ToolbarSet' => 'Survey', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false));
// Aditional Parameters
$form->addElement('html', '
<div class="row">
<div class="label">
<a href="javascript: void(0);" onclick="javascript: advanced_parameters();" ><span id="plus_minus">&nbsp;'.Display::return_icon('div_show.gif',null,array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedParameters').'</span></a>
<div class="label">
</div>
<div class="formw">
&nbsp;
<a href="javascript: void(0);" onclick="javascript: advanced_parameters();" >
<span id="plus_minus">&nbsp;'.Display::return_icon('div_show.gif',null,array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedParameters').'</span></a>
</div>
</div>');
$form -> addElement('html', '<div id="options" style="display: none;">');
// An option: Qualify the fact that survey has been answered in the gradebook
$form->addElement('checkbox', 'survey_qualify_gradebook', '', get_lang('QualifyInGradebook'), 'onclick="javascript: if (this.checked) { document.getElementById(\'gradebook_options\').style.display = \'block\'; } else { document.getElementById(\'gradebook_options\').style.display = \'none\'; }"');
$form->addElement('checkbox', 'survey_qualify_gradebook', null, get_lang('QualifyInGradebook'), 'onclick="javascript: if (this.checked) { document.getElementById(\'gradebook_options\').style.display = \'block\'; } else { document.getElementById(\'gradebook_options\').style.display = \'none\'; }"');
$form->addElement('html', '<div id="gradebook_options"'.($gradebook_link_id ? '' : ' style="display:none"').'>');
$form->addElement('text', 'survey_weight', get_lang('QualifyWeight'), 'value="0.00" style="width: 40px;" onfocus="javascript: this.select();"');
$form->applyFilter('survey_weight', 'html_filter');
@ -198,14 +195,14 @@ if ($_GET['action'] == 'add') {
}
if ($survey_data['survey_type'] == 1 || $_GET['action'] == 'add') {
$form->addElement('checkbox', 'one_question_per_page', get_lang('OneQuestionPerPage'));
$form->addElement('checkbox', 'shuffle', get_lang('ActivateShuffle'));
$form->addElement('checkbox', 'one_question_per_page', null, get_lang('OneQuestionPerPage'));
$form->addElement('checkbox', 'shuffle', null, get_lang('ActivateShuffle'));
}
if ((isset($_GET['action']) && $_GET['action'] == 'edit') && !empty($survey_id)) {
if ($survey_data['anonymous'] == 0) {
$form->addElement('checkbox', 'show_form_profile', get_lang('ShowFormProfile'), '', 'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"');
$form->addElement('checkbox', 'show_form_profile', null, get_lang('ShowFormProfile'), 'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"');
if ($survey_data['show_form_profile'] == 1) {
$form -> addElement('html', '<div id="options_field" style="display:block">');

Loading…
Cancel
Save