Minor style corrections in the installation form #4219

skala
Julio Montoya 14 years ago
parent fc6bfcb87a
commit d3bee6ae9c
  1. 6
      main/css/base.css
  2. 16
      main/install/index.php
  3. 59
      main/install/install.lib.php

@ -3914,12 +3914,18 @@ form div.error input, form div.error textarea {
line-height: 16px;
}
#install_form .data_table_no_border td {
width:30%;
}
.lp_content_type_label {
font-style: italic;
color:#999;
}
/* jsPlumb */
.window {

@ -74,10 +74,12 @@ if (!array_key_exists($install_language, get_language_folder_list())) {
// Loading language files.
require api_get_path(SYS_LANG_PATH).'english/trad4all.inc.php';
require api_get_path(SYS_LANG_PATH).'english/admin.inc.php';
require api_get_path(SYS_LANG_PATH).'english/install.inc.php';
if ($install_language != 'english') {
include_once api_get_path(SYS_LANG_PATH).$install_language.'/trad4all.inc.php';
include_once api_get_path(SYS_LANG_PATH).$install_language.'/install.inc.php';
include_once api_get_path(SYS_LANG_PATH).$install_language.'/admin.inc.php';
}
// These global variables must be set for proper working of the function get_lang(...) during the installation.
@ -638,8 +640,7 @@ if ($_POST['step2']) {
<?php echo get_lang('HereAreTheValuesYouEntered'); ?>
</div><br />
<blockquote>
<blockquote>
<?php if ($installType == 'new'): ?>
<?php echo get_lang('AdminLogin').' : <strong>'.$loginForm; ?></strong><br />
<?php echo get_lang('AdminPass').' : <strong>'.$passForm; /* TODO: Maybe this password should be hidden too? */ ?></strong><br /><br />
@ -653,14 +654,9 @@ if ($_POST['step2']) {
} else {
echo get_lang('AdminLastName').' : '.$adminLastName, '<br />', get_lang('AdminFirstName').' : '.$adminFirstName, '<br />';
}
?>
<?php echo get_lang('AdminEmail').' : '.$emailForm; ?><br />
?>
<?php echo get_lang('AdminEmail').' : '.$emailForm; ?><br />
<?php echo get_lang('AdminPhone').' : '.$adminPhoneForm; ?><br />
<?php echo get_lang('MainLang').' : '.$languageForm; ?><br /><br />
<?php echo get_lang('DBHost').' : '.$dbHostForm; ?><br />
<?php echo get_lang('DBLogin').' : '.$dbUsernameForm; ?><br />
@ -697,7 +693,7 @@ if ($_POST['step2']) {
<?php echo get_lang('CampusName').' : '.$campusForm; ?><br />
<?php echo get_lang('InstituteShortName').' : '.$institutionForm; ?><br />
<?php echo get_lang('InstituteURL').' : '.$institutionUrlForm; ?><br />
<?php echo get_lang('ChamiloURL').' : <>'.$urlForm; ?><br />
<?php echo get_lang('ChamiloURL').' : '.$urlForm; ?><br />
</blockquote>

@ -1814,14 +1814,14 @@ function display_database_settings_form($installType, $dbHostForm, $dbUsernameFo
* Used by the display_configuration_settings_form function.
*/
function display_configuration_parameter($install_type, $parameter_name, $form_field_name, $parameter_value, $display_when_update = 'true') {
echo "<tr>\n";
echo "<td>$parameter_name&nbsp;&nbsp;</td>\n";
echo "<tr>";
echo "<td>$parameter_name</td>";
if ($install_type == INSTALL_TYPE_UPDATE && $display_when_update) {
echo '<td><input type="hidden" name="'.$form_field_name.'" value="'.api_htmlentities($parameter_value, ENT_QUOTES).'" />'.$parameter_value."</td>\n";
} else {
echo '<td><input type="text" size="'.FORM_FIELD_DISPLAY_LENGTH.'" maxlength="'.MAX_FORM_FIELD_LENGTH.'" name="'.$form_field_name.'" value="'.api_htmlentities($parameter_value, ENT_QUOTES).'" />'."</td>\n";
}
echo "</tr>\n";
echo "</tr>";
}
/**
@ -1837,19 +1837,21 @@ function display_configuration_settings_form($installType, $urlForm, $languageFo
echo '<div class="RequirementContent">';
echo '<p>'.get_lang('ConfigSettingsInfo').' <strong>main/inc/conf/configuration.php</strong></p>';
echo '</div>';
echo "</td></tr> <tr><td>";
echo '<fieldset>';
echo '<legend>'.get_lang('Administrator').'</legend>';
echo '<table class="data_table_no_border">';
//Parameter 7: administrator's login
//Parameter 1: administrator's login
display_configuration_parameter($installType, get_lang('AdminLogin'), 'loginForm', $loginForm, $installType == 'update');
//Parameter 8: administrator's password
//Parameter 2: administrator's password
if ($installType != 'update') {
display_configuration_parameter($installType, get_lang('AdminPass'), 'passForm', $passForm, false);
}
//Parameters 4 and 5: administrator's names
//Parameters 3 and 4: administrator's names
if (api_is_western_name_order()) {
display_configuration_parameter($installType, get_lang('AdminFirstName'), 'adminFirstName', $adminFirstName);
display_configuration_parameter($installType, get_lang('AdminLastName'), 'adminLastName', $adminLastName);
@ -1858,6 +1860,20 @@ function display_configuration_settings_form($installType, $urlForm, $languageFo
display_configuration_parameter($installType, get_lang('AdminFirstName'), 'adminFirstName', $adminFirstName);
}
//Parameter 3: administrator's email
display_configuration_parameter($installType, get_lang('AdminEmail'), 'emailForm', $emailForm);
//Parameter 6: administrator's telephone
display_configuration_parameter($installType, get_lang('AdminPhone'), 'adminPhoneForm', $adminPhoneForm);
echo '</table>';
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>'.get_lang('Platform').'</legend>';
echo '<table class="data_table_no_border">';
//First parameter: language
echo "<tr>";
echo '<td>'.get_lang('MainLang')."&nbsp;&nbsp;</td>";
@ -1870,9 +1886,10 @@ function display_configuration_settings_form($installType, $urlForm, $languageFo
echo "</td>\n";
}
echo "</tr>\n";
//Second parameter: Chamilo URL
echo "<tr>\n";
echo "<tr>";
echo '<td>'.get_lang('ChamiloURL').' (<font color="red">'.get_lang('ThisFieldIsRequired')."</font>)&nbsp;&nbsp;</td>";
if ($installType == 'update') {
@ -1882,13 +1899,6 @@ function display_configuration_settings_form($installType, $urlForm, $languageFo
}
echo "</tr>";
//Parameter 3: administrator's email
display_configuration_parameter($installType, get_lang('AdminEmail'), 'emailForm', $emailForm);
//Parameter 6: administrator's telephone
display_configuration_parameter($installType, get_lang('AdminPhone'), 'adminPhoneForm', $adminPhoneForm);
//Parameter 9: campus name
display_configuration_parameter($installType, get_lang('CampusName'), 'campusForm', $campusForm);
@ -1949,16 +1959,21 @@ function display_configuration_settings_form($installType, $urlForm, $languageFo
<td><input type="hidden" name="allowSelfRegProf" value="<?php echo $allowSelfRegProf; ?>" /><?php echo $allowSelfRegProf? get_lang('Yes') : get_lang('No'); ?></td>
<?php else: ?>
<td>
<input class="checkbox" type="radio" name="allowSelfRegProf" value="1" id="allowSelfRegProf1" <?php echo $allowSelfRegProf ? 'checked="checked" ' : ''; ?>/> <label for="allowSelfRegProf1"><?php echo get_lang('Yes'); ?></label>
<input class="checkbox" type="radio" name="allowSelfRegProf" value="0" id="allowSelfRegProf0" <?php echo $allowSelfRegProf ? '' : 'checked="checked" '; ?>/> <label for="allowSelfRegProf0"><?php echo get_lang('No'); ?></label>
<input class="checkbox" type="radio" name="allowSelfRegProf" value="1" id="allowSelfRegProf1" <?php echo $allowSelfRegProf ? 'checked="checked" ' : ''; ?>/>
<label for="allowSelfRegProf1"><?php echo get_lang('Yes'); ?></label>
<input class="checkbox" type="radio" name="allowSelfRegProf" value="0" id="allowSelfRegProf0" <?php echo $allowSelfRegProf ? '' : 'checked="checked" '; ?>/>
<label for="allowSelfRegProf0"><?php echo get_lang('No'); ?></label>
</td>
<?php endif; ?>
</tr>
<tr>
<td><button type="submit" class="back" name="step3" value="&lt; <?php echo get_lang('Previous'); ?>" /><?php echo get_lang('Previous'); ?></button></td>
<td align="right"><input type="hidden" name="is_executable" id="is_executable" value="-" /><button class="next" type="submit" name="step5" value="<?php echo get_lang('Next'); ?> &gt;" /><?php echo get_lang('Next'); ?></button></td>
<td>
<button type="submit" class="back" name="step3" value="&lt; <?php echo get_lang('Previous'); ?>" /><?php echo get_lang('Previous'); ?></button>
</td>
<td align="right"><input type="hidden" name="is_executable" id="is_executable" value="-" /><button class="next" type="submit" name="step5" value="<?php echo get_lang('Next'); ?> &gt;" /><?php echo get_lang('Next'); ?></button></td>
</tr>
</fieldset>
</table>
<?php
}

Loading…
Cancel
Save