Skip to content

Commit

Permalink
Dev More css fixes for the installer.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMousa committed Mar 26, 2013
1 parent 1bf48a4 commit 3db4daa
Show file tree
Hide file tree
Showing 9 changed files with 243 additions and 241 deletions.
4 changes: 2 additions & 2 deletions application/controllers/InstallerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ private function stepDatabaseConfiguration()
$aValues['adminoutputText'].= sprintf($clang->gT('A database named "%s" already exists.'),$model->dbname)."<br /><br />\n"
.$clang->gT("Do you want to populate that database now by creating the necessary tables?")."<br /><br />";

$values['next'] = array(
$aValues['next'] = array(
'action' => 'installer/populatedb',
'label' => 'Populate database',
'name' => 'createdbstep2',
Expand Down Expand Up @@ -664,7 +664,7 @@ private function stepOptionalConfiguration()
$aData['pwd'] = $defaultpass;

$this->render('/installer/success_view', $aData);
exit();
return;
}
} else {
// if passwords don't match, redirect to proper link.
Expand Down
95 changes: 44 additions & 51 deletions application/views/installer/dbconfig_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<?php $this->renderPartial('/installer/sidebar_view', compact('progressValue', 'classesForStep', 'clang')); ?>
</div>
<div class="span9">
<?php echo CHtml::beginForm($this->createUrl('installer/database')); ?>
<?php echo CHtml::beginForm($this->createUrl('installer/database'), 'post', array('class' => 'form-horizontal')); ?>
<h2><?php echo $title; ?></h2>
<p><?php echo $descp; ?></p>
<div style="color:red; font-size:12px;">
Expand All @@ -12,56 +12,49 @@
<?php $clang->eT("Note: All fields marked with (*) are required."); ?>
<fieldset>
<legend><?php $clang->eT("Database configuration"); ?></legend>
<table style="width: 100%; font-size:14px;">
<tr>
<td style="width: 428px;">
<b><?php echo CHtml::activeLabelEx($model, 'dbtype', array('label' => $clang->gT("Database type"))); ?></b><br />
<div class="description-field"><?php $clang->eT("The type of your database management system"); ?> </div>
</td>
<td style="width: 224px;" align="right">
<?php echo CHtml::activeDropDownList($model, 'dbtype', $model->supported_db_types, array('required' => 'required', 'style' => 'width: 155px', 'autofocus' => 'autofocus')); ?>
</td>
</tr>
<tr>
<td style="width: 428px;">
<b><?php echo CHtml::activeLabelEx($model, 'dblocation', array('label' => $clang->gT("Database location"))); ?></b><br />
<div class="description-field"><?php $clang->eT('Set this to the IP/net location of your database server. In most cases "localhost" will work. You can force Unix socket with complete socket path.'); ?> </div>
</td>
<td style="width: 224px;" align="right"><?php echo CHtml::activeTextField($model, 'dblocation', array('required' => 'required')) ?></td>
</tr>
<tr>
<td style="width: 428px;">
<b><?php echo CHtml::activeLabelEx($model, 'dbuser', array('label' => $clang->gT("Database user"))); ?></b><br />
<div class="description-field"><?php $clang->eT('Your database server user name. In most cases "root" will work.'); ?></div>
</td>
<td style="width: 224px;" align="right"><?php echo CHtml::activeTextField($model, 'dbuser', array('required' => 'required')) ?></td>
</tr>
<tr>
<td style="width: 428px;">
<b><?php echo CHtml::activeLabelEx($model, 'dbpwd', array('label' => $clang->gT("Database password"))); ?></b><br />
<div class="description-field"><?php $clang->eT("Your database server password."); ?></div>
</td>
<td style="width: 224px;" align="right"><?php echo CHtml::activePasswordField($model, 'dbpwd') ?></td>
</tr>
<tr>
<td style="width: 428px;">
<b><?php echo CHtml::activeLabelEx($model, 'dbname', array('label' => $clang->gT("Database name"))); ?></b><br />
<div class="description-field"><?php $clang->eT("If the database does not yet exist it will be created (make sure your database user has the necessary permissions). In contrast, if there are existing LimeSurvey tables in that database they will be upgraded automatically after installation."); ?></div>
</td>
<td style="width: 224px;" align="right"><?php echo CHtml::activeTextField($model, 'dbname', array('required' => 'required')) ?></td>
</tr>
<tr>
<td style="width: 428px;">
<b><?php echo CHtml::activeLabelEx($model, 'dbprefix', array('label' => $clang->gT("Table prefix"))); ?></b><br />
<div class="description-field"><?php $clang->eT('If your database is shared, recommended prefix is "lime_" else you can leave this setting blank.'); ?></div>
</td>
<td style="width: 224px;" align="right"><?php echo CHtml::activeTextField($model, 'dbprefix', array('value' => 'lime_')) ?></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<?php
$rows = array();
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'dbtype', array('class' => 'control-label', 'label' => $clang->gT("Database type"))),
'control' => CHtml::activeDropDownList($model, 'dbtype', $model->supported_db_types, array('required' => 'required', 'autofocus' => 'autofocus')),
'description' => $clang->gT("The type of your database management system")
);
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'dblocation', array('class' => 'control-label', 'label' => $clang->gT("Database location"))),
'control' => CHtml::activeTextField($model, 'dblocation', array('required' => 'required')),
'description' => $clang->gT('Set this to the IP/net location of your database server. In most cases "localhost" will work. You can force Unix socket with complete socket path.')
);
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'dbuser', array('class' => 'control-label', 'label' => $clang->gT("Database user"))),
'control' => CHtml::activeTextField($model, 'dbuser', array('required' => 'required')),
'description' => $clang->gT('Your database server user name. In most cases "root" will work.')
);
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'dbpwd', array('class' => 'control-label', 'label' => $clang->gT("Database password"))),
'control' => CHtml::activePasswordField($model, 'dbpwd'),
'description' => $clang->gT("Your database server password.")
);
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'dbname', array('class' => 'control-label', 'label' => $clang->gT("Database name"))),
'control' => CHtml::activeTextField($model, 'dbname', array('required' => 'required')),
'description' => $clang->gT("If the database does not yet exist it will be created (make sure your database user has the necessary permissions). In contrast, if there are existing LimeSurvey tables in that database they will be upgraded automatically after installation.")
);

$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'dbprefix', array('class' => 'control-label', 'label' => $clang->gT("Table prefix"))),
'control' => CHtml::activeTextField($model, 'dbprefix', array('value' => 'lime_')),
'description' => $clang->gT('If your database is shared, recommended prefix is "lime_" else you can leave this setting blank.')
);

foreach ($rows as $row)
{
echo CHtml::openTag('div', array('class' => 'control-group'));
echo $row['label'];
echo CHtml::tag('div', array('class' => 'controls'), $row['control'] . CHtml::tag('div', array('class' => 'description-field'), $row['description']));
echo CHtml::closeTag('div');
}

?>
</fieldset>
<div class="row">
<div class="span3" >
Expand Down
2 changes: 1 addition & 1 deletion application/views/installer/dbsettings_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
if (isset($next))
{
echo CHtml::form(array($next['action']), 'post');
echo CHtml::button($clang->gT($next['label']), array(
echo CHtml::submitButton($clang->gT($next['label']), array(
'name' => $next['name'],
'class' => 'btn'
));
Expand Down
5 changes: 3 additions & 2 deletions application/views/installer/license_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
<?php echo CHtml::form(array("installer/license"), 'post', array('name'=>'formcheck')); ?>


<div class="row">
<div class="row navigator">
<div class="span3">
<input class="btn" type="button" value="<?php $clang->eT("Previous"); ?>" onclick="javascript: window.open('<?php echo $this->createUrl("installer/install/welcome"); ?>', '_top')" />
</div>
<div class="span6" style="text-align:right;">
<div class="span3"></div>
<div class="span3">
<input class="btn" type="submit" value="<?php $clang->eT('I accept'); ?>" />
</div>
</div>
Expand Down
181 changes: 84 additions & 97 deletions application/views/installer/optconfig_view.php
Original file line number Diff line number Diff line change
@@ -1,103 +1,90 @@
<?php echo CHtml::beginForm($this->createUrl('installer/optional')); ?>
<div class="row">
<div class="span3">
<?php $this->renderPartial('/installer/sidebar_view', compact('progressValue', 'classesForStep', 'clang')); ?>
</div>
<div class="span9">
<?php echo CHtml::beginForm($this->createUrl('installer/optional'), 'post', array('class' => 'form-horizontal')); ?>
<h2><?php echo $title; ?></h2>
<p><?php echo $descp; ?></p>
<?php echo $confirmation; ?>
<div style="color:red; font-size:12px;">
<?php echo CHtml::errorSummary($model, null, null, array('class' => 'errors')); ?>
</div>
<?php ?>
<fieldset>
<legend><?php
$clang->eT("You can leave these settings blank and change them later");
?>

<div class="container_6">
</legend>
<?php
$rows = array();
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'adminLoginName', array('class' => 'control-label', 'label' => $clang->gT("Admin login name"), 'autofocus' => 'autofocus')),
'description' => $clang->gT("This will be the userid by which admin of board will login."),
'control' => CHtml::activeTextField($model, 'adminLoginName')
);
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'adminLoginPwd', array('class' => 'control-label', 'label' => $clang->gT("Admin login password"))),
'description' => $clang->gT("This will be the password of admin user."),
'control' => CHtml::activePasswordField($model, 'adminLoginPwd')
);
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'confirmPwd', array('class' => 'control-label', 'label' => $clang->gT("Confirm your admin password"))),
'control' => CHtml::activePasswordField($model, 'confirmPwd')
);
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'adminName', array('class' => 'control-label', 'label' => $clang->gT("Administrator name"))),
'description' => $clang->gT("This is the default name of the site administrator and used for system messages and contact options."),
'control' => CHtml::activeTextField($model, 'adminName')
);
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'adminEmail', array('class' => 'control-label', 'label' => $clang->gT("Administrator email"))),
'description' => $clang->gT("This is the default email address of the site administrator and used for system messages, contact options and default bounce email."),
'control' => CHtml::activeTextField($model, 'adminEmail')
);
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'siteName', array('class' => 'control-label', 'label' => $clang->gT("Site name"))),
'description' => $clang->gT("This name will appear in the survey list overview and in the administration header."),
'control' => CHtml::activeTextField($model, 'siteName')
);
foreach(getLanguageData(true, Yii::app()->session['installerLang']) as $langkey => $languagekind)
{
$languages[$langkey] = sprintf('%s - %s', $languagekind['nativedescription'], $languagekind['description']);
}

<?php $this->renderPartial('/installer/sidebar_view', compact('progressValue', 'classesForStep', 'clang')); ?>
$rows[] = array(
'label' => CHtml::activeLabelEx($model, 'surveylang', array('class' => 'control-label', 'label' => $clang->gT("Default language"))),
'description' => $clang->gT("This will be your default language."),
'control' => CHtml::activeDropDownList($model, 'surveylang', $languages, array('style' => 'width: 156px', 'encode' => false, 'options'=>array('en' => array('selected' => true))))
);

<div class="grid_4 table">
foreach ($rows as $row)
{
echo CHtml::openTag('div', array('class' => 'control-group'));
echo $row['label'];

<p class="maintitle"><?php echo $title; ?></p>
echo CHtml::openTag('div', array('class' => 'controls'));
echo $row['control'];
if (isset($row['description']))
{
echo CHtml::tag('div', array('class' => 'description-field'), $row['description']);
}
echo CHtml::closeTag('div');
echo CHtml::closeTag('div');
}
?>
</fieldset>
<div class="row navigator">
<div class="span3">
<input class="btn" type="button" value="<?php $clang->eT("Previous"); ?>" onclick="javascript: window.open('<?php echo $this->createUrl("installer/welcome"); ?>', '_top')" />
</div>
<div class="span3"></div>
<div class="span3">
<?php echo CHtml::submitButton($clang->gT("Next"), array('class' => 'btn')); ?>
</div>
</div>

<div style="-moz-border-radius:15px; border-radius:15px;" >
<p><?php echo $descp; ?></p>
<hr />
<?php echo $confirmation; ?>
<div style="color:red; font-size:12px;">
<?php echo CHtml::errorSummary($model, null, null, array('class' => 'errors')); ?>
<?php echo CHtml::endForm(); ?>
</div>
</div>
<br />
<?php $clang->eT("You can leave these settings blank and change them later"); ?>
<br />

<fieldset class="content-table">
<legend class="content-table-heading"><?php $clang->eT("Optional settings"); ?></legend>
<table style="width: 640px; font-size:14px;">
<tr>
<td><b><?php echo CHtml::activeLabelEx($model, 'adminLoginName', array('label' => $clang->gT("Admin login name"), 'autofocus' => 'autofocus')); ?></b><br />
<div class="description-field"><?php $clang->eT("This will be the userid by which admin of board will login."); ?></div>
</td>
<td align="right"><?php echo CHtml::activeTextField($model, 'adminLoginName'); ?></td>
</tr>
<tr>
<td><b><?php echo CHtml::activeLabelEx($model, 'adminLoginPwd', array('label' => $clang->gT("Admin login password"))); ?></b><br />
<div class="description-field"><?php $clang->eT("This will be the password of admin user."); ?></div>
</td>
<td align="right"><?php echo CHtml::activePasswordField($model, 'adminLoginPwd'); ?></td>
</tr>
<tr>
<td><b><?php echo CHtml::activeLabelEx($model, 'confirmPwd', array('label' => $clang->gT("Confirm your admin password"))); ?></b><br />
</td>
<td align="right"><?php echo CHtml::activePasswordField($model, 'confirmPwd'); ?></td>
</tr>
<tr>
<td><b><?php echo CHtml::activeLabelEx($model, 'adminName', array('label' => $clang->gT("Administrator name"))); ?></b><br />
<div class="description-field"><?php $clang->eT("This is the default name of the site administrator and used for system messages and contact options."); ?></div>
</td>
<td align="right"><?php echo CHtml::activeTextField($model, 'adminName'); ?></td>
</tr>
<tr>
<td><b><?php echo CHtml::activeLabelEx($model, 'adminEmail', array('label' => $clang->gT("Administrator email"))); ?></b><br />
<div class="description-field"><?php $clang->eT("This is the default email address of the site administrator and used for system messages, contact options and default bounce email."); ?></div>
</td>
<?php /* @todo HTML5 email field */ ?>
<td align="right"><?php echo CHtml::activeTextField($model, 'adminEmail'); ?></td>
</tr>
<tr>
<td><b><?php echo CHtml::activeLabelEx($model, 'siteName', array('label' => $clang->gT("Site name"))); ?></b><br />
<div class="description-field"><?php $clang->eT("This name will appear in the survey list overview and in the administration header."); ?></div>
</td>
<td align="right"><?php echo CHtml::activeTextField($model, 'siteName'); ?></td>
</tr>
<tr>
<td><b><?php echo CHtml::activeLabelEx($model, 'surveylang', array('label' => $clang->gT("Default language"))); ?></b><br />
<div class="description-field"><?php $clang->eT("This will be your default language."); ?></div>
</td>
<td align="right">
<?php
foreach(getLanguageData(true, Yii::app()->session['installerLang']) as $langkey => $languagekind)
{
$languages[$langkey] = sprintf('%s - %s', $languagekind['nativedescription'], $languagekind['description']);
}
echo CHtml::activeDropDownList($model, 'surveylang', $languages, array('style' => 'width: 156px', 'encode' => false, 'options'=>array('en' => array('selected' => true))));
?>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</fieldset>

</div>
</div>
</div>

<div class="container_6">
<div class="grid_2">&nbsp;</div>
<div class="grid_4 demo">
<br/>
<table style="font-size:11px; width: 694px; background: #ffffff;">
<tbody>
<tr>
<td align="left" style="width: 227px;"><input class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" value="<?php $clang->eT("Previous"); ?>" onclick="javascript: window.open('<?php echo $this->createUrl("installer/welcome"); ?>', '_top')" /></td>
<td align="center" style="width: 227px;"></td>
<td align="right" style="width: 227px;"><?php echo CHtml::submitButton($clang->gT("Next"), array('class' => 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only')); ?></td>
</tr>
</tbody>
</table>
</div>
</div>


<?php echo CHtml::endForm(); ?>

0 comments on commit 3db4daa

Please sign in to comment.