Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Jun 1, 2017
1 parent e70bd5e commit 14aa21c
Show file tree
Hide file tree
Showing 8 changed files with 361 additions and 183 deletions.
19 changes: 16 additions & 3 deletions installation/controller/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function execute()
}

// Are we allowed to proceed?
$tmpModel = new InstallationModelSetup();
$model = new InstallationModelSetup;

$vName = $this->getInput()->getWord('view', $defaultView);
$vFormat = $app->getDocument()->getType();
Expand All @@ -50,15 +50,14 @@ public function execute()
$this->getInput()->set('view', $defaultView);
}

if (!$tmpModel->getPhpOptionsSufficient())
if (!$model->getPhpOptionsSufficient())
{
if ($vName !== 'preinstall')
{
$app->redirect('index.php?view=preinstall');
}

$vName = 'preinstall';
$model = new InstallationModelSetup;
}
else
{
Expand All @@ -71,10 +70,24 @@ public function execute()
$options = [];

break;
case 'summary':
$model = new InstallationModelSetup;
// InstallationModelConfiguration;
$checkOptions = true;
$options = $model->getOptions();

break;
case 'remove':
$model = new InstallationModelSetup;
// InstallationModelConfiguration;
$checkOptions = true;
$options = $model->getOptions();

break;
default:
$model = new InstallationModelSetup;
$checkOptions = true;
$options = [];

break;
}
Expand Down
238 changes: 104 additions & 134 deletions installation/model/forms/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,162 +2,132 @@
<form>
<fieldset name="site">
<field
name="language"
type="installation.language"
id="language"
label="INSTL_LANGUAGE_LABEL"
default="en-GB"
onchange="Install.setlanguage();"
name="language"
type="installation.language"
id="language"
class="custom-select required ml-2"
label="INSTL_LANGUAGE_LABEL"
default="en-GB"
onchange="Install.setlanguage();"
/>

<field
name="site_name"
type="text"
id="site_name"
class="form-control"
label="INSTL_SITE_NAME_LABEL"
required="true"
name="site_name"
type="text"
id="site_name"
class="form-control"
label="INSTL_SITE_NAME_LABEL"
required="true"
/>

<field
name="admin_email"
type="email"
id="admin_email"
class="form-control"
label="INSTL_ADMIN_EMAIL_LABEL"
validate="email"
required="true"
name="admin_email"
type="email"
id="admin_email"
class="form-control"
label="INSTL_ADMIN_EMAIL_LABEL"
validate="email"
required="true"
/>

<field
name="admin_user"
type="text"
id="admin_user"
class="form-control"
label="INSTL_ADMIN_USER_LABEL"
required="true"
name="admin_user"
type="text"
id="admin_user"
class="form-control"
label="INSTL_ADMIN_USER_LABEL"
required="true"
/>

<field
name="admin_password"
type="password"
id="admin_password"
class="form-control validate-password-strength"
label="INSTL_ADMIN_PASSWORD_LABEL"
required="true"
autocomplete="off"
name="admin_password"
type="password"
id="admin_password"
class="form-control validate-password-strength"
label="INSTL_ADMIN_PASSWORD_LABEL"
required="true"
autocomplete="off"
/>

<field
name="admin_password2"
type="password"
id="admin_password2"
class="form-control"
label="INSTL_ADMIN_PASSWORD2_LABEL"
required="true"
filter="raw"
validate="equals"
field="admin_password"
autocomplete="off"
name="site_metadesc"
type="textarea"
id="site_metadesc"
class="form-control text_area noResize"
label="INSTL_SITE_METADESC_LABEL"
rows="3"
/>

<field
name="site_metadesc"
type="textarea"
id="site_metadesc"
class="form-control text_area noResize"
label="INSTL_SITE_METADESC_LABEL"
rows="3"
/>

<field
name="site_offline"
type="radio"
id="site_offline"
class="btn-group"
default="0"
label="INSTL_SITE_OFFLINE_LABEL"
filter="integer"
name="site_offline"
type="radio"
id="site_offline"
class="btn-group"
default="0"
label="INSTL_SITE_OFFLINE_LABEL"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
</fieldset>
<fieldset name="database">
<fieldset name="basic">
<field
name="db_type"
type="databaseconnection"
id="db_type"
class="custom-select form-control"
label="INSTL_DATABASE_TYPE_LABEL"
supported="mysqli,pdomysql,postgresql"
required="true"
default="mysqli"
filter="string"
/>
<field
name="db_host"
type="text"
id="db_host"
class="form-control"
label="INSTL_DATABASE_HOST_LABEL"
default="localhost"
required="true"
/>
<field
name="db_user"
type="text"
id="db_user"
class="form-control"
label="INSTL_DATABASE_USER_LABEL"
required="true"
/>
<field
name="db_pass"
type="password"
id="db_pass"
class="form-control"
label="INSTL_DATABASE_PASSWORD_LABEL"
autocomplete="off"
filter="raw"
/>
<field
name="db_name"
type="text"
id="db_name"
class="form-control"
label="INSTL_DATABASE_NAME_LABEL"
required="true"
default="joomla_db"
/>
</fieldset>

<!-- Advanced Settings -->
<fieldset name="advanced">
<field
name="db_old"
type="radio"
id="db_old"
class="btn-group"
label="INSTL_DATABASE_OLD_PROCESS_LABEL"
default="backup"
required="true"
>
<option value="backup">INSTL_DATABASE_FIELD_VALUE_BACKUP</option>
<option value="remove">INSTL_DATABASE_FIELD_VALUE_REMOVE</option>
</field>
<field
name="db_prefix"
type="installation.prefix"
id="db_prefix"
class="form-control"
label="INSTL_DATABASE_PREFIX_LABEL"
required="true"
validate="installation.prefix"
message="INSTL_DATABASE_PREFIX_MSG"
autocomplete="off"
/>
</fieldset>
<field
name="db_type"
type="databaseconnection"
id="db_type"
class="custom-select form-control"
label="INSTL_DATABASE_TYPE_LABEL"
supported="mysqli,pdomysql,postgresql"
required="true"
default="mysqli"
filter="string"
/>
<field
name="db_host"
type="text"
id="db_host"
class="form-control"
label="INSTL_DATABASE_HOST_LABEL"
default="localhost"
required="true"
/>
<field
name="db_user"
type="text"
id="db_user"
class="form-control"
label="INSTL_DATABASE_USER_LABEL"
required="true"
/>
<field
name="db_pass"
type="password"
id="db_pass"
class="form-control"
label="INSTL_DATABASE_PASSWORD_LABEL"
autocomplete="off"
filter="raw"
/>
<field
name="db_name"
type="text"
id="db_name"
class="form-control"
label="INSTL_DATABASE_NAME_LABEL"
required="true"
default="joomla_db"
/>

<field
name="db_old"
type="hidden"
id="db_old"
default="backup"
/>
<field
name="db_prefix"
type="hidden"
id="db_prefix"
/>
</fieldset>
</form>
24 changes: 0 additions & 24 deletions installation/model/forms/summary.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<form>
<fieldset>
<field
name="summary_email"
type="radio"
id="summary_email"
class="btn-group btn-group-reverse"
default="0"
label="INSTL_SUMMARY_EMAIL_LABEL"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="summary_email_passwords"
type="radio"
id="email_passwords"
class="btn-group btn-group-reverse"
default="0"
label="INSTL_SUMMARY_EMAIL_PASSWORDS_LABEL"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="db_type" type="hidden" />
<field
name="sample_file"
Expand Down
2 changes: 1 addition & 1 deletion installation/model/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public function getPhpOptionsSufficient()

foreach ($options as $option)
{
if (is_null($option->notice))
if (!is_null($option->notice))
{
$result = ($result && $option->state);
}
Expand Down
9 changes: 1 addition & 8 deletions installation/template/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,8 @@
<body data-basepath="<?php echo JUri::root(true); ?>">
<?php // Header ?>
<div class="header">
<div class="container container-header d-flex align-items-center justify-content-center">
<div id="top-header" class="container container-header d-flex align-items-center justify-content-center">
<img src="<?php echo $this->baseurl ?>/template/images/logo.svg" alt="Joomla" class="logo"/>

<form class="lang-select">
<label for="jform_language" class="control-label"><?php echo JText::_('INSTL_SELECT_LANGUAGE_TITLE'); ?></label>
<select id="jform_language" class="custom-select required ml-2">
</select>
</form>

</div>
</div>
<?php // Container ?>
Expand Down

0 comments on commit 14aa21c

Please sign in to comment.