Fixing installation bundle.

1.10.x
Julio Montoya 11 years ago
parent bee8b85880
commit e87f25fbb3
  1. 15
      app/AppKernel.php
  2. 12
      app/ChamiloRequirements.php
  3. 5
      app/chamilo-check.php
  4. 7
      app/config/routing.yml
  5. 2
      src/ChamiloLMS/CoreBundle/Resources/config/services.yml
  6. 27
      src/ChamiloLMS/CoreBundle/Settings/PlatformSettingsSchema.php
  7. 2
      src/ChamiloLMS/InstallerBundle/Form/Type/Configuration/MailerType.php
  8. 94
      src/ChamiloLMS/InstallerBundle/Form/Type/Setup/AdminType.php
  9. 91
      src/ChamiloLMS/InstallerBundle/Form/Type/Setup/PortalType.php
  10. 84
      src/ChamiloLMS/InstallerBundle/Form/Type/SetupType.php
  11. 22
      src/ChamiloLMS/InstallerBundle/Process/PhpExecutableFinder.php
  12. 45
      src/ChamiloLMS/InstallerBundle/Process/Step/SetupStep.php
  13. 26
      src/ChamiloLMS/InstallerBundle/Resources/config/form.yml
  14. 27
      src/ChamiloLMS/InstallerBundle/Resources/translations/messages.en.yml
  15. 13
      src/ChamiloLMS/InstallerBundle/Resources/views/Form/fields.html.twig
  16. 11
      src/ChamiloLMS/InstallerBundle/Resources/views/Process/Step/configure.html.twig
  17. 2
      src/ChamiloLMS/InstallerBundle/Resources/views/Process/Step/installation.html.twig
  18. 43
      src/ChamiloLMS/InstallerBundle/Resources/views/Process/Step/setup.html.twig
  19. 68
      src/ChamiloLMS/InstallerBundle/Resources/views/progress.html.twig
  20. 29
      web/install.php

@ -11,10 +11,16 @@ class AppKernel extends Kernel
public function registerBundles()
{
$bundles = array(
new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
new FOS\RestBundle\FOSRestBundle(),
new JMS\SerializerBundle\JMSSerializerBundle($this),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
// Sylius
new Sylius\Bundle\SettingsBundle\SyliusSettingsBundle(),
new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
new Sylius\Bundle\FlowBundle\SyliusFlowBundle(),
new Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),
// Symfony standard edition
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
@ -64,7 +70,6 @@ class AppKernel extends Kernel
new SimpleThings\EntityAudit\SimpleThingsEntityAuditBundle(),
// API
new FOS\RestBundle\FOSRestBundle(),
new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
// E-COMMERCE
@ -85,7 +90,6 @@ class AppKernel extends Kernel
new Sonata\PriceBundle\SonataPriceBundle(),
*/
new JMS\SerializerBundle\JMSSerializerBundle($this),
new FOS\CommentBundle\FOSCommentBundle(),
new Sonata\CommentBundle\SonataCommentBundle(),
new Application\Sonata\CommentBundle\ApplicationSonataCommentBundle(),
@ -134,14 +138,13 @@ class AppKernel extends Kernel
new ChamiloLMS\CourseBundle\ChamiloLMSCourseBundle(),
new ChamiloLMS\MessageBundle\ChamiloLMSMessageBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new ChamiloLMS\NotebookBundle\ChamiloLMSNotebookBundle(),
new APY\DataGridBundle\APYDataGridBundle(),
new JMS\TranslationBundle\JMSTranslationBundle(),
//new FOS\RestBundle\FOSRestBundle(),
//new JMS\SerializerBundle\JMSSerializerBundle($this),
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
new Sp\BowerBundle\SpBowerBundle(),
new Oro\Bundle\MigrationBundle\OroMigrationBundle(),
);

@ -5,7 +5,7 @@ require_once __DIR__ . '/SymfonyRequirements.php';
use Symfony\Component\Process\ProcessBuilder;
use Symfony\Component\Intl\Intl;
//use Oro\Bundle\InstallerBundle\Process\PhpExecutableFinder;
use ChamiloLMS\InstallerBundle\Process\PhpExecutableFinder;
/**
* This class specifies all requirements and optional recommendations
@ -103,17 +103,17 @@ class ChamiloRequirements extends SymfonyRequirements
// Web installer specific checks
if ('cli' !== PHP_SAPI) {
/*$output = $this->checkCliRequirements();
$output = $this->checkCliRequirements();
$requirement = new CliRequirement(
!$output,
'Requirements validation for PHP CLI',
'If you have multiple PHP versions installed, you need to configure ORO_PHP_PATH variable with PHP binary path used by web server'
'If you have multiple PHP versions installed, you need to configure CHAMILO_PHP_PATH variable with PHP binary path used by web server'
);
$requirement->setOutput($output);
$this->add($requirement);*/
$this->add($requirement);
}
$baseDir = realpath(__DIR__ . '/..');
@ -129,11 +129,11 @@ class ChamiloRequirements extends SymfonyRequirements
'Set the "<strong>memory_limit</strong>" setting in php.ini<a href="#phpini">*</a> to at least "256M".'
);
$this->addRecommendation(
/*$this->addRecommendation(
$this->checkNodeExists(),
'NodeJS should be installed',
'Install the <strong>NodeJS</strong>.'
);
);*/
$this->addChamiloRequirement(
is_writable($baseDir . '/web/uploads'),

@ -9,10 +9,5 @@ foreach ($requirements->getChamiloRequirements() as $requirement) {
/** @var Requirement $requirement */
if (!$requirement->isFulfilled()) {
echo $requirement->getTestMessage() . "\n";
$requirementNeeded = false;
}
}
if ($requirementNeeded == true) {
echo 'Chamilo is ready to be installed.';
}

@ -57,8 +57,11 @@ chamilolms_installer:
resource: "@ChamiloLMSInstallerBundle/Resources/config/routing.yml"
sylius_settings:
resource: @SyliusSettingsBundle/Resources/config/routing.yml
prefix: /settings
pattern: /settings
defaults:
_controller: sylius.controller.settings:updateAction
namespace: platform
template: SyliusSettingsBundle:Settings:update.html.twig
# Always at the end
core_bundle:

@ -116,4 +116,4 @@ services:
chamilolms.settings_schema.platform:
class: ChamiloLMS\CoreBundle\Settings\PlatformSettingsSchema
tags:
- { name: sylius.settings_schema, namespace: meta }
- { name: sylius.settings_schema, namespace: platform }

@ -12,24 +12,29 @@ class PlatformSettingsSchema implements SchemaInterface
{
$builder
->setDefaults(array(
'title' => 'Sylius - Modern ecommerce for Symfony2',
'meta_keywords' => 'symfony, sylius, ecommerce, webshop, shopping cart',
'meta_description' => 'Sylius is modern ecommerce solution for PHP. Based on the Symfony2 framework.',
))
'portal_name' => 'Campus Chamilo',
'company_title' => 'Chamilo Association',
'company_url' => 'http://www.chamilo.org',
'enable_help_link' => ''
))
->setAllowedTypes(array(
'title' => array('string'),
'meta_keywords' => array('string'),
'meta_description' => array('string'),
))
'portal_name' => array('string'),
'company_title' => array('string'),
'company_url' => array('string'),
'enable_help_link' => array('string'),
))
;
}
public function buildForm(FormBuilderInterface $builder)
{
$builder
->add('title')
->add('meta_keywords')
->add('meta_description', 'textarea')
->add('portal_name')
->add('company_title')
->add('company_url')
->add('enable_help_link', 'choice', array('choices' =>
array('true' => 'Yes', 'no' => 'No'))
)
;
}
}

@ -17,7 +17,7 @@ class MailerType extends AbstractType
'chamilo_installer_mailer_transport',
'choice',
array(
'label' => 'form.configuration.mailer.transport',
'label' => 'form.configuration.mailer.transport.header',
'preferred_choices' => array('mail'),
'choices' => array(
'mail' => 'PHP mail',

@ -0,0 +1,94 @@
<?php
namespace ChamiloLMS\InstallerBundle\Form\Type\Setup;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class AdminType extends AbstractType
{
protected $dataClass;
public function __construct($dataClass)
{
$this->dataClass = $dataClass;
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add(
'username',
'text',
array(
'label' => 'form.setup.admin.username',
)
)
->add(
'plainPassword',
'repeated',
array(
'type' => 'password',
'invalid_message' => 'The password fields must match.',
'first_options' => array('label' => 'form.setup.admin.password'),
'second_options' => array('label' => 'form.setup.admin.password_re'),
)
)
->add(
'email',
'email',
array(
'label' => 'form.setup.admin.email',
)
)
->add(
'firstName',
'text',
array(
'label' => 'form.setup.admin.firstname',
)
)
->add(
'lastName',
'text',
array(
'label' => 'form.setup.admin.lastname',
)
)
->add(
'phone',
'text',
array(
'label' => 'form.setup.admin.phone',
)
);
/*
->add(
'loadFixtures',
'checkbox',
array(
'label' => 'form.setup.load_fixtures',
'required' => false,
'mapped' => false,
)
);*/
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(
array(
'data_class' => $this->dataClass,
'validation_groups' => array('Registration', 'Default'),
)
);
}
public function getName()
{
return 'chamilo_installer_setup_admin';
}
}

@ -0,0 +1,91 @@
<?php
namespace ChamiloLMS\InstallerBundle\Form\Type\Setup;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class PortalType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add(
'portal_name',
'text',
array(
'label' => 'form.setup.portal.portal_name',
'mapped' => false,
'constraints' => array(
new Assert\NotBlank(),
new Assert\Length(array('max' => 15))
),
)
)
->add(
'company_title',
'text',
array(
'label' => 'form.setup.portal.company_title',
'mapped' => false,
'required' => false,
)
)
->add(
'company_url',
'url',
array(
'label' => 'form.setup.portal.company_url',
'mapped' => false,
'required' => false,
)
)
->add(
'allow_self_registration',
'choice',
array(
'label' => 'form.setup.portal.allow_self_registration',
'mapped' => false,
'required' => false,
'preferred_choices' => array(),
'choices' => array(
'1' => 'Yes',
'0' => 'No',
),
)
)
->add(
'allow_self_registration_as_trainer',
'choice',
array(
'label' => 'form.setup.portal.allow_self_registration_as_trainer',
'mapped' => false,
'required' => false,
'preferred_choices' => array(),
'choices' => array(
'1' => 'Yes',
'0' => 'No',
),
)
);
}
/**
* {@inheritdoc}
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'allow_self_registration_as_trainer' => '1',
'allow_self_registration' => 'No'
)
);
}
public function getName()
{
return 'chamilo_installer_setup_portal';
}
}

@ -4,101 +4,29 @@ namespace ChamiloLMS\InstallerBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Validator\Constraints as Assert;
class SetupType extends AbstractType
{
protected $dataClass;
public function __construct($dataClass)
{
$this->dataClass = $dataClass;
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add(
'company_name',
'text',
array(
'label' => 'form.setup.company_name',
'mapped' => false,
'constraints' => array(
new Assert\NotBlank(),
new Assert\Length(array('max' => 15))
),
)
)
->add(
'company_title',
'text',
array(
'label' => 'form.setup.company_title',
'mapped' => false,
'required' => false,
)
)
->add(
'username',
'text',
array(
'label' => 'form.setup.username',
)
)
->add(
'plainPassword',
'repeated',
'admin',
'chamilo_installer_setup_admin',
array(
'type' => 'password',
'invalid_message' => 'The password fields must match.',
'first_options' => array('label' => 'form.setup.password'),
'second_options' => array('label' => 'form.setup.password_re'),
'label' => 'form.setup.admin.header',
)
)
->add(
'email',
'email',
'portal',
'chamilo_installer_setup_portal',
array(
'label' => 'form.setup.email',
)
)
->add(
'firstName',
'text',
array(
'label' => 'form.setup.firstname',
)
)
->add(
'lastName',
'text',
array(
'label' => 'form.setup.lastname',
)
)
->add(
'loadFixtures',
'checkbox',
array(
'label' => 'form.setup.load_fixtures',
'required' => false,
'mapped' => false,
'label' => 'form.setup.portal.header'
)
);
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(
array(
'data_class' => $this->dataClass,
'validation_groups' => array('Registration', 'Default'),
)
);
}
public function getName()
{
return 'chamilo_installer_setup';

@ -0,0 +1,22 @@
<?php
namespace ChamiloLMS\InstallerBundle\Process;
use Symfony\Component\Process\PhpExecutableFinder as BasePhpExecutableFinder;
class PhpExecutableFinder extends BasePhpExecutableFinder
{
/**
* {@inheritdoc}
*/
public function find()
{
if ($php = getenv('CHAMILO_PHP_PATH')) {
if (is_executable($php)) {
return $php;
}
}
return parent::find();
}
}

@ -5,6 +5,7 @@ namespace ChamiloLMS\InstallerBundle\Process\Step;
use Sylius\Bundle\FlowBundle\Process\Context\ProcessContextInterface;
use ChamiloLMS\CoreBundle\Migrations\Data\ORM\LoadAdminUserData;
//use Oro\Bundle\ConfigBundle\Config\ConfigManager;
use Sylius\Bundle\SettingsBundle\Manager\SettingsManager;
use Application\Sonata\UserBundle\Entity\User;
class SetupStep extends AbstractStep
@ -21,7 +22,7 @@ class SetupStep extends AbstractStep
return $this->render(
'ChamiloLMSInstallerBundle:Process/Step:setup.html.twig',
array(
'form' => $form->createView()
'form' => $this->createSetupForm()->createView()
)
);
}
@ -37,25 +38,41 @@ class SetupStep extends AbstractStep
throw new \RuntimeException("Admin user wasn't loaded in fixtures.");
}
$form = $this->createForm('chamilo_installer_setup');
$form->setData($adminUser);
$form = $this->createSetupForm();
$form->get('admin')->setData($adminUser);
$form->handleRequest($this->getRequest());
if ($form->isValid()) {
// pass "load demo fixtures" flag to the next step
$context->getStorage()->set(
/*$context->getStorage()->set(
'loadFixtures',
$form->has('loadFixtures') && $form->get('loadFixtures')->getData()
);
);*/
$this->get('fos_user.user_manager')->updateUser($adminUser);
// update company name and title if specified
/** @var ConfigManager $configManager */
/*
$configManager = $this->get('oro_config.global');
$defaultCompanyName = $configManager->get('oro_ui.application_name');
/** @var SettingsManager $settingsManager */
$settingsManager = $this->get('sylius.settings.manager');
$settings = $settingsManager->loadSettings('platform');
$settings->set(
'portal_name',
$form->get('portal')->get('portal_name')->getData()
);
$settings->set(
'company_title',
$form->get('portal')->get('company_title')->getData()
);
$settings->set(
'company_url',
$form->get('portal')->get('company_url')->getData()
);
$settingsManager->saveSettings('platform', $settings);
/*$defaultCompanyName = $configManager->get('oro_ui.application_name');
$defaultCompanyTitle = $configManager->get('oro_ui.application_title');
$companyName = $form->get('company_name')->getData();
$companyTitle = $form->get('company_title')->getData();
@ -66,7 +83,7 @@ class SetupStep extends AbstractStep
$configManager->set('oro_ui.application_title', $companyTitle);
}
$configManager->flush();
*/
*/
return $this->complete();
}
@ -77,4 +94,12 @@ class SetupStep extends AbstractStep
)
);
}
protected function createSetupForm()
{
$data = $this->get('chamilo_installer.yaml_persister')->parse();
return $this->createForm('chamilo_installer_setup', empty($data) ? null : $data);
}
}

@ -4,8 +4,11 @@ parameters:
chamilo_installer.form.type.configuration.mailer.class: ChamiloLMS\InstallerBundle\Form\Type\Configuration\MailerType
chamilo_installer.form.type.configuration.system.class: ChamiloLMS\InstallerBundle\Form\Type\Configuration\SystemType
# chamilo_installer.form.type.configuration.ws.class: ChamiloLMS\InstallerBundle\Form\Type\Configuration\WebsocketType
chamilo_installer.form.type.setup.admin.class: ChamiloLMS\InstallerBundle\Form\Type\Setup\AdminType
chamilo_installer.form.type.setup.portal.class: ChamiloLMS\InstallerBundle\Form\Type\Setup\PortalType
chamilo_installer.form.type.setup.class: ChamiloLMS\InstallerBundle\Form\Type\SetupType
services:
chamilo_installer.form.type.configuration:
class: %chamilo_installer.form.type.configuration.class%
@ -27,14 +30,25 @@ services:
tags:
- { name: form.type, alias: chamilo_installer_configuration_system }
# chamilo_installer.form.type.configuration.websocket:
# class: %chamilo_installer.form.type.configuration.ws.class%
# tags:
# - { name: form.type, alias: chamilo_installer_configuration_websocket }
chamilo_installer.form.type.setup:
class: %chamilo_installer.form.type.setup.class%
tags:
- { name: form.type, alias: chamilo_installer_setup }
chamilo_installer.form.type.setup.admin:
class: %chamilo_installer.form.type.setup.admin.class%
arguments:
- Application\Sonata\UserBundle\Entity\User
tags:
- { name: form.type, alias: chamilo_installer_setup }
- { name: form.type, alias: chamilo_installer_setup_admin }
chamilo_installer.form.type.setup.portal:
class: %chamilo_installer.form.type.setup.portal.class%
tags:
- { name: form.type, alias: chamilo_installer_setup_portal }
# chamilo_installer.form.type.configuration.websocket:
# class: %chamilo_installer.form.type.configuration.ws.class%
# tags:
# - { name: form.type, alias: chamilo_installer_configuration_websocket }

@ -28,7 +28,7 @@ form:
host: Host
password: Password
transport:
0: Transport
header: Transport
gmail: Gmail
mail: Mail
sendmail: Sendmail
@ -39,14 +39,23 @@ form:
secret: Secret
locale: Locale
setup:
email: Email
company_name: Company short name
company_title: Company name
username: Username
firstname: First name
lastname: Last name
password: Password
password_re: Re-enter password
admin:
header: Admin information
username: Username
firstname: First name
lastname: Last name
password: Password
password_re: Re-enter password
email: Email
phone: Phone
portal:
header: Portal information
portal_name: Portal name
company_title: Company name
company_url: Company URL
allow_self_registration_as_trainer: Allow self-registration as a trainer
allow_self_registration: Allow self-registration
load_fixtures: Load Sample Data
process:

@ -1,20 +1,19 @@
{% extends 'OroFormBundle:Form:fields.html.twig' %}
{% block _chamilo_installer_configuration_mailer_chamilo_installer_mailer_transport_row %}
{% block _oro_installer_configuration_mailer_oro_installer_mailer_transport_row %}
<script type="text/javascript">
$(function () {
var con = $('#oro_installer_configuration_mailer');
var con = $('#chamilo_installer_configuration_mailer');
checkTransport();
con.find('.control-group:first select').change(checkTransport);
con.find('.form-group:first select').change(checkTransport);
function checkTransport() {
if (con.find('.control-group:first select').val() != 'smtp') {
con.find('.control-group:not(:first)').hide()
if (con.find('.form-group:first select').val() != 'smtp') {
con.find('.form-group:not(:first)').hide()
.find('input').attr('disabled', 'disabled');
} else {
con.find('.control-group:not(:first)').show()
con.find('.form-group:not(:first)').show()
.find('input').attr('disabled', null);
}
}

@ -1,6 +1,7 @@
{% extends 'ChamiloLMSInstallerBundle::layout.html.twig' %}
{% set step = 'configure' %}
{% use 'ChamiloLMSInstallerBundle::progress.html.twig' %}
{% form_theme form with 'ChamiloLMSInstallerBundle:Form:fields.html.twig' %}
{% block title %}
{% autoescape false %}
@ -26,26 +27,22 @@
<div>
<form action="{{ path('sylius_flow_forward', { scenarioAlias: 'chamilo_installer', stepName: 'configure'}) }}" method="post">
{{ form_errors(form) }}
<div class="row">
<div class="box">
<div class="col-sm-6">
<h3 class="sub-title">{{ form.database.vars.label|trans }}</h3>
{{ form_widget(form.database) }}
</div>
<div class="box">
<div class="col-sm-6">
<h3 class="sub-title">{{ form.mailer.vars.label|trans }}</h3>
{{ form_widget(form.mailer) }}
</div>
</div>
<div class="row">
<div class="box">
<div class="col-sm-12">
<h3 class="sub-title">{{ form.system.vars.label|trans }}</h3>
{{ form_widget(form.system) }}
</div>
{{ form_rest(form) }}
</div>

@ -1,6 +1,6 @@
{% extends 'ChamiloLMSInstallerBundle::layout.html.twig' %}
{#{% set step, platformSteps = 'administration', ['navigation', 'js-routing', 'localization', 'assets', 'assetic', 'translation', 'requirejs'] %}#}
{% set step, platformSteps = 'administration', [ 'assets', 'assetic'] %}
{% set step, platformSteps = 'administration', [ 'assets', 'assetic', 'fixtures' ] %}
{% use 'ChamiloLMSInstallerBundle::progress.html.twig' %}
{% if loadFixtures %}

@ -9,18 +9,37 @@
{% endblock %}
{% block content %}
<div class="page-header">
<h2>{{ 'process.step.setup.header'|trans|raw }}</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div class="page-header">
<h2>{{ 'process.step.setup.header'|trans|raw }}</h2>
</div>
<form action="{{ path('sylius_flow_forward', {'scenarioAlias': 'chamilo_installer', 'stepName': 'setup'}) }}" method="post">
{{ form_errors(form) }}
<div class="row">
<div class="col-sm-6">
<h3 class="sub-title">{{ form.admin.vars.label|trans }}</h3>
<form action="{{ path('sylius_flow_forward', {'scenarioAlias': 'chamilo_installer', 'stepName': 'setup'}) }}" method="post" class="form-horizontal">
<div>{{ form_widget(form) }}</div>
<div class="form-actions">
<a href="{{ path('sylius_flow_display', {'scenarioAlias': 'chamilo_installer', 'stepName': 'configure'}) }}" class="btn btn-default btn-lg"><i class="icon-chevron-left"></i>
{{ 'process.button.back'|trans }}</a> &nbsp;
<button class="btn btn-lg btn-primary" type="submit">
<i class="icon-magic"></i> {{ 'process.button.install'|trans }}
</button>
{{ form_widget(form.admin) }}
</div>
<div class="col-sm-6">
<h3 class="sub-title">{{ form.portal.vars.label|trans }}</h3>
{{ form_widget(form.portal) }}
</div>
</div>
{{ form_rest(form) }}
<div class="form-actions">
<a href="{{ path('sylius_flow_display', {'scenarioAlias': 'chamilo_installer', 'stepName': 'configure'}) }}" class="btn btn-default btn-lg">
<i class="icon-chevron-left"></i>
{{ 'process.button.back'|trans }}
</a> &nbsp;
<button class="btn btn-lg btn-primary" type="submit">
<i class="icon-magic"></i> {{ 'process.button.install'|trans }}
</button>
</div>
</form>
</div>
</form>
</div>
{% endblock %}

@ -1,38 +1,40 @@
{% block progress %}
{% set step = step is defined ? step|lower : 'welcome' %}
<div class="container">
<ul class="nav nav-wizard">
<li{% if step == 'welcome' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">1</strong>
<span>{{ 'process.step.welcome.header'|trans }}</span>
</li>
<li{% if step == 'check' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">2</strong>
<span>{{ 'process.step.check.header'|trans }}</span>
</li>
<li{% if step == 'configure' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">3</strong>
<span>{{ 'process.step.configure.header'|trans }}</span>
</li>
<li{% if step == 'schema' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">4</strong>
<span>{{ 'process.step.schema.header'|trans }}</span>
</li>
<li{% if step == 'setup' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">5</strong>
<span>{{ 'process.step.setup.header'|trans }}</span>
</li>
<li{% if step == 'final' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">6</strong>
<span>{{ 'process.step.final.header'|trans }}</span>
</li>
</ul>
<div class="row">
<div class="col-sm-12">
<ul class="nav nav-wizard">
<li{% if step == 'welcome' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">1</strong>
<span>{{ 'process.step.welcome.header'|trans }}</span>
</li>
<li{% if step == 'check' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">2</strong>
<span>{{ 'process.step.check.header'|trans }}</span>
</li>
<li{% if step == 'configure' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">3</strong>
<span>{{ 'process.step.configure.header'|trans }}</span>
</li>
<li{% if step == 'schema' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">4</strong>
<span>{{ 'process.step.schema.header'|trans }}</span>
</li>
<li{% if step == 'setup' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">5</strong>
<span>{{ 'process.step.setup.header'|trans }}</span>
</li>
<li{% if step == 'final' %} class="active"{% endif %}>
<em class="fix-bg">&nbsp;</em>
<strong class="step">6</strong>
<span>{{ 'process.step.final.header'|trans }}</span>
</li>
</ul>
</div>
</div>
<style>

@ -21,8 +21,6 @@ if (file_exists($paramFile)) {
&& isset($data['parameters']['installed'])
&& false != $data['parameters']['installed']
) {
require_once __DIR__.'/app_dev.php';
exit;
@ -69,7 +67,21 @@ function iterateRequirements(array $collection)
<pre class="output"><?php echo $requirement->getOutput(); ?></pre>
<?php endif; ?>
</td>
<td><?php echo $requirement->isFulfilled() ? '<span class="label label-success">OK</span>' : $requirement->getHelpHtml(); ?></td>
<td>
<?php
if ($requirement->isFulfilled()) {
echo '<span class="label label-success">OK</span>';
} else {
if (!$requirement->isOptional()) {
echo '<span class="label label-danger">';
} else {
echo '<span class="label label-warning">';
}
$requirement->getHelpHtml();
echo '</span>';
}
?>
</td>
</tr>
<?php
endforeach;
@ -116,6 +128,17 @@ function iterateRequirements(array $collection)
<?php endif; ?>
});
</script>
<style>
td pre.output {
background-color: #232125;
overflow: auto;
line-height: 1.3em;
color: #fff;
font-size: 14px;
padding: .7em;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">

Loading…
Cancel
Save