Minor - improving UI during installation

skala CHAMILO_1_9_0_ALPHA_1
Julio Montoya 14 years ago
parent b95d0b7321
commit 0b3d4ba0e5
  1. 2
      main/inc/global_error_message.inc.php
  2. 148
      main/install/index.php
  3. 2
      main/install/install.lib.php

@ -122,7 +122,7 @@ if (is_int($global_error_code) && $global_error_code > 0) {
$click_to_install = substr($InstallationDescription, 0, $pos); $click_to_install = substr($InstallationDescription, 0, $pos);
$read_installation_guide = substr($InstallationDescription, $pos + 2); $read_installation_guide = substr($InstallationDescription, $pos + 2);
$InstallationDescription = '<form action="'.$root_rel.'main/install/index.php" method="get"> $InstallationDescription = '<form action="'.$root_rel.'main/install/index.php" method="get">
<button class="a_button blue" type="submit" value="&nbsp;&nbsp; '.$click_to_install.' &nbsp;&nbsp;" > <button class="btn btn-primary btn-large" type="submit" value="&nbsp;&nbsp; '.$click_to_install.' &nbsp;&nbsp;" >
'.$click_to_install.'</button> '.$click_to_install.'</button>
</form><br /> </form><br />
<a href="'.$installation_guide_url.'" target="_blank">'.$read_installation_guide.'</a>'; <a href="'.$installation_guide_url.'" target="_blank">'.$read_installation_guide.'</a>';

@ -309,8 +309,7 @@ if ($encryptPassForm == '1') {
@import "../css/<?php echo api_get_visual_theme(); ?>/default.css"; @import "../css/<?php echo api_get_visual_theme(); ?>/default.css";
/*]]>*/ /*]]>*/
</style> </style>
<script type="text/javascript" src="../inc/lib/javascript/jquery.min.js"></script> <script type="text/javascript" src="../inc/lib/javascript/jquery.min.js"></script>
<script type="text/javascript" > <script type="text/javascript" >
$(document).ready( function() { $(document).ready( function() {
//checked //checked
@ -406,56 +405,53 @@ if ($encryptPassForm == '1') {
return false; return false;
} }
$(document).ready( function() { $(document).ready( function() {
$(".advanced_parameters").click(function() { $(".advanced_parameters").click(function() {
if ($("#id_contact_form").css("display") == "none") { if ($("#id_contact_form").css("display") == "none") {
$("#id_contact_form").css("display","block"); $("#id_contact_form").css("display","block");
$("#img_plus_and_minus").html('&nbsp;<img src="<?php echo api_get_path(WEB_IMG_PATH) ?>div_hide.gif" alt="<?php echo get_lang('Hide') ?>" title="<?php echo get_lang('Hide')?>" style ="vertical-align:middle" >&nbsp;<?php echo get_lang('ContactInformation') ?>'); $("#img_plus_and_minus").html('&nbsp;<img src="<?php echo api_get_path(WEB_IMG_PATH) ?>div_hide.gif" alt="<?php echo get_lang('Hide') ?>" title="<?php echo get_lang('Hide')?>" style ="vertical-align:middle" >&nbsp;<?php echo get_lang('ContactInformation') ?>');
} else { } else {
$("#id_contact_form").css("display","none"); $("#id_contact_form").css("display","none");
$("#img_plus_and_minus").html('&nbsp;<img src="<?php echo api_get_path(WEB_IMG_PATH) ?>div_show.gif" alt="<?php echo get_lang('Show') ?>" title="<?php echo get_lang('Show') ?>" style ="vertical-align:middle" >&nbsp;<?php echo get_lang('ContactInformation') ?>'); $("#img_plus_and_minus").html('&nbsp;<img src="<?php echo api_get_path(WEB_IMG_PATH) ?>div_show.gif" alt="<?php echo get_lang('Show') ?>" title="<?php echo get_lang('Show') ?>" style ="vertical-align:middle" >&nbsp;<?php echo get_lang('ContactInformation') ?>');
} }
});
}); });
});
function send_contact_information() {
var data_post = ""; function send_contact_information() {
data_post += "person_name="+$("#person_name").val()+"&"; var data_post = "";
data_post += "company_name="+$("#company_name").val()+"&"; data_post += "person_name="+$("#person_name").val()+"&";
data_post += "company_activity="+$("#company_activity option:selected").val()+"&"; data_post += "company_name="+$("#company_name").val()+"&";
data_post += "person_role="+$("#person_role option:selected").val()+"&"; data_post += "company_activity="+$("#company_activity option:selected").val()+"&";
data_post += "company_country="+$("#country option:selected").val()+"&"; data_post += "person_role="+$("#person_role option:selected").val()+"&";
data_post += "company_city="+$("#company_city").val()+"&"; data_post += "company_country="+$("#country option:selected").val()+"&";
data_post += "language="+$("#language option:selected").val()+"&"; data_post += "company_city="+$("#company_city").val()+"&";
data_post += "financial_decision="+$("input[@name='financial_decision']:checked").val(); data_post += "language="+$("#language option:selected").val()+"&";
data_post += "financial_decision="+$("input[@name='financial_decision']:checked").val();
$.ajax({
contentType: "application/x-www-form-urlencoded", $.ajax({
beforeSend: function(objeto) {}, contentType: "application/x-www-form-urlencoded",
type: "POST", beforeSend: function(objeto) {},
url: "<?php echo api_get_path(WEB_AJAX_PATH) ?>install.ajax.php?a=send_contact_information", type: "POST",
data: data_post, url: "<?php echo api_get_path(WEB_AJAX_PATH) ?>install.ajax.php?a=send_contact_information",
success: function(datos) { data: data_post,
if (datos == 'required_field_error') { success: function(datos) {
message = "<?php echo get_lang('FormHasErrorsPleaseComplete') ?>"; if (datos == 'required_field_error') {
} else if (datos == '1') { message = "<?php echo get_lang('FormHasErrorsPleaseComplete') ?>";
message = "<?php echo get_lang('ContactInformationHasBeenSent') ?>"; } else if (datos == '1') {
} else { message = "<?php echo get_lang('ContactInformationHasBeenSent') ?>";
message = "<?php echo get_lang('Error').': '.get_lang('ContactInformationHasNotBeenSent') ?>"; } else {
} message = "<?php echo get_lang('Error').': '.get_lang('ContactInformationHasNotBeenSent') ?>";
alert(message);
} }
}); alert(message);
} }
});
</script> }
</script>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>" />
</head> </head>
<body dir="<?php echo api_get_text_direction(); ?>"> <body dir="<?php echo api_get_text_direction(); ?>">
<div id="wrapper"> <div id="wrapper">
<div id="header"> <div id="header">
<div id="header1" style="margin-bottom:10px;"> <div id="header1" style="margin-bottom:10px;">
<div id="logo"> <div id="logo">
@ -463,33 +459,28 @@ if ($encryptPassForm == '1') {
</div> </div>
</div> </div>
</div> </div>
<div id="main"> <div id="main">
<form class="form-horizontal" id="install_form" style="padding: 0px; margin: 0px;" method="post" action="<?php echo api_get_self(); ?>?running=1&amp;installType=<?php echo $installType; ?>&amp;updateFromConfigFile=<?php echo urlencode($updateFromConfigFile); ?>"> <div class="row-fluid">
<div id="installation_steps" style="width:220px"> <div class="span3">
<br /> <div class="well">
<ol> <ol>
<li <?php step_active('1'); ?>><?php echo get_lang('InstallationLanguage'); ?></li> <li <?php step_active('1'); ?>><?php echo get_lang('InstallationLanguage'); ?></li>
<li <?php step_active('2'); ?>><?php echo get_lang('Requirements'); ?></li> <li <?php step_active('2'); ?>><?php echo get_lang('Requirements'); ?></li>
<li <?php step_active('3'); ?>><?php echo get_lang('Licence'); ?></li> <li <?php step_active('3'); ?>><?php echo get_lang('Licence'); ?></li>
<li <?php step_active('4'); ?>><?php echo get_lang('DBSetting'); ?></li> <li <?php step_active('4'); ?>><?php echo get_lang('DBSetting'); ?></li>
<li <?php step_active('5'); ?>><?php echo get_lang('CfgSetting'); ?></li> <li <?php step_active('5'); ?>><?php echo get_lang('CfgSetting'); ?></li>
<li <?php step_active('6'); ?>><?php echo get_lang('PrintOverview'); ?></li> <li <?php step_active('6'); ?>><?php echo get_lang('PrintOverview'); ?></li>
<li <?php step_active('7'); ?>><?php echo get_lang('Installing'); ?></li> <li <?php step_active('7'); ?>><?php echo get_lang('Installing'); ?></li>
</ol> </ol>
</div> </div>
</div>
<table cellpadding="6" cellspacing="0" border="0" width="72%" align="center"> <div class="span9">
<tr> <div id="note" style="float:right;">
<td>
<div id="note" style="float:right;">
<a href="../../documentation/installation_guide.html" target="_blank"><?php echo get_lang('ReadTheInstallationGuide'); ?></a> <a href="../../documentation/installation_guide.html" target="_blank"><?php echo get_lang('ReadTheInstallationGuide'); ?></a>
</div> </div>
</td>
</tr> <form class="form-horizontal" id="install_form" style="padding: 0px; margin: 0px;" method="post" action="<?php echo api_get_self(); ?>?running=1&amp;installType=<?php echo $installType; ?>&amp;updateFromConfigFile=<?php echo urlencode($updateFromConfigFile); ?>">
<tr> <?php
<td>
<?php
echo '<div class="page-header"><h1>'.get_lang('ChamiloInstallation').' &ndash; '.get_lang('Version_').' '.$new_version.'</h1></div>'; echo '<div class="page-header"><h1>'.get_lang('ChamiloInstallation').' &ndash; '.get_lang('Version_').' '.$new_version.'</h1></div>';
$instalation_type_label = ''; $instalation_type_label = '';
@ -546,7 +537,6 @@ if ($encryptPassForm == '1') {
<input type="hidden" name="session_lifetime" value="<?php echo api_htmlentities($session_lifetime, ENT_QUOTES); ?>" /> <input type="hidden" name="session_lifetime" value="<?php echo api_htmlentities($session_lifetime, ENT_QUOTES); ?>" />
<input type="hidden" name="old_version" value="<?php echo api_htmlentities($my_old_version, ENT_QUOTES); ?>" /> <input type="hidden" name="old_version" value="<?php echo api_htmlentities($my_old_version, ENT_QUOTES); ?>" />
<input type="hidden" name="new_version" value="<?php echo api_htmlentities($new_version, ENT_QUOTES); ?>" /> <input type="hidden" name="new_version" value="<?php echo api_htmlentities($new_version, ENT_QUOTES); ?>" />
<?php <?php
if ($_POST['step2']) { if ($_POST['step2']) {
//STEP 3 : LICENSE //STEP 3 : LICENSE
@ -623,7 +613,6 @@ if ($_POST['step2']) {
display_configuration_settings_form($installType, $urlForm, $languageForm, $emailForm, $adminFirstName, $adminLastName, $adminPhoneForm, $campusForm, $institutionForm, $institutionUrlForm, $encryptPassForm, $allowSelfReg, $allowSelfRegProf, $loginForm, $passForm); display_configuration_settings_form($installType, $urlForm, $languageForm, $emailForm, $adminFirstName, $adminLastName, $adminPhoneForm, $campusForm, $institutionForm, $institutionUrlForm, $encryptPassForm, $allowSelfReg, $allowSelfRegProf, $loginForm, $passForm);
} elseif ($_POST['step5']) { } elseif ($_POST['step5']) {
//STEP 6 : LAST CHECK BEFORE INSTALL //STEP 6 : LAST CHECK BEFORE INSTALL
?> ?>
<div class="RequirementHeading"> <div class="RequirementHeading">
@ -631,24 +620,22 @@ if ($_POST['step2']) {
</div> </div>
<div class="RequirementContent"> <div class="RequirementContent">
<?php echo get_lang('HereAreTheValuesYouEntered'); ?> <?php echo get_lang('HereAreTheValuesYouEntered'); ?>
</div><br /> </div><br />
<blockquote> <blockquote>
<?php if ($installType == 'new'): ?> <?php if ($installType == 'new'): ?>
<?php echo get_lang('AdminLogin').' : <strong>'.$loginForm; ?></strong><br /> <?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 /> <?php echo get_lang('AdminPass').' : <strong>'.$passForm; /* TODO: Maybe this password should be hidden too? */ ?></strong><br /><br />
<?php else: ?> <?php else: ?>
<?php endif; ?> <?php endif;
<?php
if (api_is_western_name_order()) { if (api_is_western_name_order()) {
echo get_lang('AdminFirstName').' : '.$adminFirstName, '<br />', get_lang('AdminLastName').' : '.$adminLastName, '<br />'; echo get_lang('AdminFirstName').' : '.$adminFirstName, '<br />', get_lang('AdminLastName').' : '.$adminLastName, '<br />';
} else { } else {
echo get_lang('AdminLastName').' : '.$adminLastName, '<br />', get_lang('AdminFirstName').' : '.$adminFirstName, '<br />'; echo get_lang('AdminLastName').' : '.$adminLastName, '<br />', get_lang('AdminFirstName').' : '.$adminFirstName, '<br />';
} }
?>
<?php echo get_lang('AdminEmail').' : '.$emailForm; ?><br /> echo get_lang('AdminEmail').' : '.$emailForm; ?><br />
<?php echo get_lang('AdminPhone').' : '.$adminPhoneForm; ?><br /> <?php echo get_lang('AdminPhone').' : '.$adminPhoneForm; ?><br />
<?php echo get_lang('MainLang').' : '.$languageForm; ?><br /><br /> <?php echo get_lang('MainLang').' : '.$languageForm; ?><br /><br />
<?php echo get_lang('DBHost').' : '.$dbHostForm; ?><br /> <?php echo get_lang('DBHost').' : '.$dbHostForm; ?><br />
@ -840,10 +827,9 @@ if ($_POST['step2']) {
display_language_selection(); display_language_selection();
} }
?> ?>
</td>
</tr>
</table>
</form> </form>
</div> <!-- span-->
</div> <!-- row -->
</div> <!-- main end--> </div> <!-- main end-->
<div class="push"></div> <div class="push"></div>

@ -2029,7 +2029,7 @@ function display_after_install_message($installType, $nbr_courses) {
printf(get_lang('ToProtectYourSiteMakeXAndYReadOnly'), 'main/inc/conf/configuration.php', 'main/install/index.php'); printf(get_lang('ToProtectYourSiteMakeXAndYReadOnly'), 'main/inc/conf/configuration.php', 'main/install/index.php');
echo '</div>'; echo '</div>';
?></form> ?></form>
<br /><br /> <br />
<a class="btn btn-success btn-large" href="../../index.php"><?php echo get_lang('GoToYourNewlyCreatedPortal'); ?></a> <a class="btn btn-success btn-large" href="../../index.php"><?php echo get_lang('GoToYourNewlyCreatedPortal'); ?></a>
<?php <?php
} }

Loading…
Cancel
Save