Skip to content

Commit b3730b7

Browse files
author
Dimitri Grammatikogianni
authored
Merge pull request joomla#56 from ciar4n/post-install-ftp
Post install ftp & lang select to header
2 parents e95fb4a + 8d41267 commit b3730b7

File tree

8 files changed

+163
-103
lines changed

8 files changed

+163
-103
lines changed

installation/language/en-GB/en-GB.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ INSTL_MCRYPT_SUPPORT_AVAILABLE="Mcrypt Support"
262262
INSTL_NOTICEMBLANGNOTDEFAULT="PHP mbstring language is not set to neutral. This can be set locally by entering <strong>php_value mbstring.language neutral</strong> in your <code>.htaccess</code> file."
263263
INSTL_NOTICEMBSTRINGOVERLOAD="PHP mbstring function overload is set. This can be turned off locally by entering <strong>php_value mbstring.func_overload 0</strong> in your <code>.htaccess</code> file."
264264
INSTL_NOTICEMCRYPTNOTAVAILABLE="Warning! PHP mcrypt extension should be installed or enabled. Without this, some features of Joomla will not be available."
265-
INSTL_NOTICEYOUCANSTILLINSTALL="<br>You can still continue the installation as the configuration settings will be displayed at the end. You will have to manually upload the code. Select in the text area to highlight all of the code and then paste into a new text file. Name this file 'configuration.php' and upload it to your site root folder."
265+
INSTL_NOTICEYOUCANSTILLINSTALL="You can still continue the installation as the configuration settings will be displayed at the end. You will have to manually upload the code. Select in the text area to highlight all of the code and then paste into a new text file. Name this file 'configuration.php' and upload it to your site root folder."
266266
INSTL_OUTPUT_BUFFERING="Output Buffering"
267267
INSTL_PARSE_INI_FILE_AVAILABLE="INI Parser Support"
268268
INSTL_PHP_VERSION="PHP Version"

installation/language/en-US/en-US.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ INSTL_MCRYPT_SUPPORT_AVAILABLE="Mcrypt Support"
256256
INSTL_NOTICEMBLANGNOTDEFAULT="PHP mbstring language is not set to neutral. This can be set locally by entering <strong>php_value mbstring.language neutral</strong> in your <code>.htaccess</code> file."
257257
INSTL_NOTICEMBSTRINGOVERLOAD="PHP mbstring function overload is set. This can be turned off locally by entering <strong>php_value mbstring.func_overload 0</strong> in your <code>.htaccess</code> file."
258258
INSTL_NOTICEMCRYPTNOTAVAILABLE="Warning! PHP mcrypt extension should be installed or enabled. Without this, some features of Joomla will not be available."
259-
INSTL_NOTICEYOUCANSTILLINSTALL="<br>You can still continue the installation as the configuration settings will be displayed at the end. You will have to manually upload the code. Select in the text area to highlight all of the code and then paste into a new text file. Name this file 'configuration.php' and upload it to your site root folder."
259+
INSTL_NOTICEYOUCANSTILLINSTALL="You can still continue the installation as the configuration settings will be displayed at the end. You will have to manually upload the code. Select in the text area to highlight all of the code and then paste into a new text file. Name this file 'configuration.php' and upload it to your site root folder. <br><a class=\"btn btn-primary btn-sm mt-2\" href="#" id=showFtp>Connect with FTP</a>"
260260
INSTL_OUTPUT_BUFFERING="Output Buffering"
261261
INSTL_PARSE_INI_FILE_AVAILABLE="INI Parser Support"
262262
INSTL_PHP_VERSION="PHP Version"

installation/template/css/template.css

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8834,4 +8834,37 @@ form {
88348834
border-left: 1px solid #ddd; }
88358835

88368836
.system-message .alert {
8837-
margin: 25px 50px; }
8837+
margin: 25px 50px; }
8838+
8839+
.preinstall-alert {
8840+
position: relative;
8841+
display: block;
8842+
padding: 20px 20px 20px 100px;
8843+
margin: 20px 0;
8844+
background: #fafafa;
8845+
border: 1px solid rgba(0, 0, 0, 0.1);
8846+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); }
8847+
.preinstall-alert::after {
8848+
position: absolute;
8849+
top: 50%;
8850+
left: 0;
8851+
width: 100px;
8852+
font-family: FontAwesome;
8853+
font-size: 3rem;
8854+
text-align: center;
8855+
content: "\f071";
8856+
opacity: .2;
8857+
transform: translateY(-50%); }
8858+
.preinstall-alert p {
8859+
margin-bottom: 0; }
8860+
8861+
.lang-select {
8862+
position: absolute;
8863+
top: 0;
8864+
right: 0;
8865+
width: auto;
8866+
padding: 10px; }
8867+
.lang-select .custom-select {
8868+
height: 30px;
8869+
padding: .3rem 1.75rem .3rem .75rem;
8870+
line-height: 1; }

installation/template/css/template.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

installation/template/index.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@
5959
<div class="header">
6060
<div class="container container-header d-flex align-items-center justify-content-center">
6161
<img src="<?php echo $this->baseurl ?>/template/images/logo.svg" alt="Joomla" class="logo"/>
62+
63+
<form class="lang-select">
64+
<label for="jform_language" class="control-label"><?php echo JText::_('INSTL_SELECT_LANGUAGE_TITLE'); ?></label>
65+
<select id="jform_language" class="custom-select required ml-2">
66+
<option selected>Choose...</option>
67+
<option value="1">One</option>
68+
<option value="2">Two</option>
69+
<option value="3">Three</option>
70+
</select>
71+
</form>
72+
6273
</div>
6374
</div>
6475
<?php // Container ?>

installation/template/scss/template.scss

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,41 @@ form {
205205
.system-message .alert {
206206
margin: 25px 50px;
207207
}
208+
209+
.preinstall-alert {
210+
position: relative;
211+
display: block;
212+
padding: 20px 20px 20px 100px;
213+
margin: 20px 0;
214+
background: #fafafa;
215+
border: 1px solid rgba(0,0,0,.1);
216+
box-shadow: 0 0 10px rgba(0,0,0,.05);
217+
&::after {
218+
position: absolute;
219+
top: 50%;
220+
left: 0;
221+
width: 100px;
222+
font-family: FontAwesome;
223+
font-size: 3rem;
224+
text-align: center;
225+
content: "\f071";
226+
opacity: .2;
227+
transform: translateY(-50%);
228+
}
229+
p {
230+
margin-bottom: 0;
231+
}
232+
}
233+
234+
.lang-select {
235+
position: absolute;
236+
top: 0;
237+
right: 0;
238+
width: auto;
239+
padding: 10px;
240+
.custom-select {
241+
height: 30px;
242+
padding: .3rem 1.75rem .3rem .75rem;
243+
line-height: 1;
244+
}
245+
}

installation/view/preinstall/tmpl/default.php

Lines changed: 56 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -16,96 +16,78 @@
1616
<a href="#" class="btn btn-primary" onclick="Install.submitform();" title="<?php echo JText::_('JCHECK_AGAIN'); ?>"><span class="icon-refresh icon-white"></span> <?php echo JText::_('JCHECK_AGAIN'); ?></a>
1717
</div>
1818
</div>
19-
<div class="form-group">
19+
<!-- <div class="form-group row">
2020
<label for="jform_language" class="control-label"><?php echo JText::_('INSTL_SELECT_LANGUAGE_TITLE'); ?></label>
2121
<?php echo $this->form->getInput('language'); ?>
2222
</div>
2323
<input type="hidden" name="view" value="preinstall">
2424
<input type="hidden" name="task" value="setlanguage">
25-
<?php echo JHtml::_('form.token'); ?>
25+
<?php echo JHtml::_('form.token'); ?> -->
2626
</form>
2727
<form action="index.php" method="post" id="adminForm">
2828
<div class="row">
29-
<div class="col-md-12">
29+
<div class="col-md-12 mb-4">
3030
<h3><?php echo JText::_('INSTL_PRECHECK_TITLE'); ?></h3>
3131
<hr>
3232
<p class="install-text">
3333
<?php echo JText::_('INSTL_PRECHECK_DESC'); ?>
34-
</p>
35-
<table class="table table-striped table-sm">
36-
<tbody>
34+
</p>
35+
<div class="row">
36+
<div class="col-md-8 offset-md-2">
3737
<?php foreach ($this->options as $option) : ?>
3838
<?php if ($option->state === 'JNO' || $option->state === false) : ?>
39-
<tr>
40-
<td class="item">
41-
<?php echo $option->label; ?>
42-
</td>
43-
<td>
44-
<span class="badge badge-<?php echo ($option->state) ? 'success' : 'important'; ?>">
45-
<?php echo JText::_($option->state ? 'JYES' : 'JNO'); ?>
46-
<?php if ($option->notice) : ?>
47-
<span class="icon-info-sign icon-white hasTooltip" title="<?php echo $option->notice; ?>"></span>
48-
<?php endif;?>
49-
</span>
50-
</td>
51-
</tr>
52-
<?php if ($option->state === false && preg_match('$configuration.php$', $option->label)) : ?>
53-
<tr>
54-
<form action="index.php" method="post" id="adminForm" class="form-validate">
55-
<h3><?php echo JText::_('INSTL_FTP'); ?></h3>
56-
<hr>
57-
<div class="form-group">
58-
<?php echo $this->form->getLabel('ftp_enable'); ?>
59-
<?php echo $this->form->getInput('ftp_enable'); ?>
60-
</div>
61-
<div class="form-group">
62-
<?php echo $this->form->getLabel('ftp_user'); ?>
63-
<?php echo $this->form->getInput('ftp_user'); ?>
64-
<p class="form-text text-muted small"><?php echo JText::_('INSTL_FTP_USER_DESC'); ?></p>
65-
</div>
66-
<div class="form-group">
67-
<?php echo $this->form->getLabel('ftp_pass'); ?>
68-
<?php echo $this->form->getInput('ftp_pass'); ?>
69-
<p class="form-text text-muted small"><?php echo JText::_('INSTL_FTP_PASSWORD_DESC'); ?></p>
70-
</div>
71-
<div class="form-group">
72-
<button id="verifybutton" class="btn btn-success" onclick="Install.verifyFtpSettings(this);"><span class="icon-ok icon-white"></span> <?php echo JText::_('INSTL_VERIFY_FTP_SETTINGS'); ?></button>
73-
</div>
74-
<div class="form-group">
75-
<?php echo $this->form->getLabel('ftp_host'); ?>
76-
<div class="input-append">
77-
<?php echo $this->form->getInput('ftp_host'); ?><button id="findbutton" class="btn btn-secondary" onclick="Install.detectFtpRoot(this);"><span class="icon-folder-open"></span> <?php echo JText::_('INSTL_AUTOFIND_FTP_PATH'); ?></button>
78-
</div>
79-
</div>
80-
<div class="form-group">
81-
<?php echo $this->form->getLabel('ftp_port'); ?>
82-
<?php echo $this->form->getInput('ftp_port'); ?>
83-
</div>
84-
<div class="form-group">
85-
<?php echo $this->form->getLabel('ftp_save'); ?>
86-
<?php echo $this->form->getInput('ftp_save'); ?>
87-
</div>
88-
<div class="btn-toolbar justify-content-end">
89-
<div class="btn-group">
90-
<a class="btn btn-secondary" href="#" onclick="return Install.goToPage('database');" rel="prev" title="<?php echo JText::_('JPREVIOUS'); ?>"><span class="fa fa-arrow-left"></span> <?php echo JText::_('JPREVIOUS'); ?></a>
91-
<a class="btn btn-primary" href="#" onclick="Install.submitform();" rel="next" title="<?php echo JText::_('JNEXT'); ?>"><span class="fa fa-arrow-right icon-white"></span> <?php echo JText::_('JNEXT'); ?></a>
92-
</div>
93-
</div>
94-
<input type="hidden" name="task" value="ftp">
95-
<input type="hidden" name="format" value="json">
96-
<?php echo JHtml::_('form.token'); ?>
97-
</form>
98-
</tr>
99-
<?php endif; ?>
39+
<div class="alert preinstall-alert">
40+
<strong><?php echo $option->label; ?></strong>
41+
<p class="form-text text-muted small"><?php echo $option->notice; ?></p>
42+
</div>
10043
<?php endif; ?>
10144
<?php endforeach; ?>
102-
</tbody>
103-
<tfoot>
104-
<tr>
105-
<td colspan="2"></td>
106-
</tr>
107-
</tfoot>
108-
</table>
45+
</div>
46+
</div>
47+
<?php if ($option->state === false && preg_match('$configuration.php$', $option->label)) : ?>
48+
<div id="ftpOptions" class="ftp-options mb-4">
49+
<form action="index.php" method="post" id="adminForm" class="form-validate">
50+
<!-- <h3><?php echo JText::_('INSTL_FTP'); ?></h3>
51+
<hr> -->
52+
<div class="form-group row">
53+
<div class="col-md-8 offset-md-2">
54+
<?php echo $this->form->getLabel('ftp_user'); ?>
55+
<?php echo $this->form->getInput('ftp_user'); ?>
56+
<p class="form-text text-muted small"><?php echo JText::_('INSTL_FTP_USER_DESC'); ?></p>
57+
</div>
58+
</div>
59+
<div class="form-group row">
60+
<div class="col-md-8 offset-md-2">
61+
<?php echo $this->form->getLabel('ftp_pass'); ?>
62+
<?php echo $this->form->getInput('ftp_pass'); ?>
63+
<p class="form-text text-muted small"><?php echo JText::_('INSTL_FTP_PASSWORD_DESC'); ?></p>
64+
</div>
65+
</div>
66+
<div class="form-group row mb-4">
67+
<div class="col-md-8 offset-md-2">
68+
<?php echo $this->form->getLabel('ftp_host'); ?>
69+
<div class="input-append d-flex">
70+
<?php echo $this->form->getInput('ftp_host'); ?><button id="findbutton" class="btn btn-secondary ml-2" onclick="Install.detectFtpRoot(this);"><span class="icon-folder-open"></span> <?php echo JText::_('INSTL_AUTOFIND_FTP_PATH'); ?></button>
71+
</div>
72+
</div>
73+
</div>
74+
<div class="form-group row">
75+
<div class="col-md-8 offset-md-2">
76+
<?php echo $this->form->getLabel('ftp_port'); ?>
77+
<?php echo $this->form->getInput('ftp_port'); ?>
78+
</div>
79+
</div>
80+
<div class="form-group row">
81+
<div class="col-md-8 offset-md-2 justify-content-end d-flex">
82+
<button id="verifybutton" class="btn btn-success" onclick="Install.verifyFtpSettings(this);"><span class="icon-ok icon-white"></span> <?php echo JText::_('INSTL_VERIFY_FTP_SETTINGS'); ?></button>
83+
</div>
84+
</div>
85+
<input type="hidden" name="task" value="ftp">
86+
<input type="hidden" name="format" value="json">
87+
<?php echo JHtml::_('form.token'); ?>
88+
</form>
89+
</div>
90+
<?php endif; ?>
10991
</div>
11092
<div class="col-md-12">
11193
<h3><?php echo JText::_('INSTL_PRECHECK_RECOMMENDED_SETTINGS_TITLE'); ?></h3>

installation/view/site/tmpl/default.php

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,39 @@
1111

1212
/* @var InstallationViewDefault $this */
1313
?>
14-
14+
<!-- <form action="index.php" method="post" id="languageForm">
15+
<div class="col-md-11 col-lg-12 container">
16+
<div class="form-group row">
17+
<div class="col-md-8 offset-md-2">
18+
<label for="jform_language"><?php echo JText::_('INSTL_SELECT_LANGUAGE_TITLE'); ?></label>
19+
<?php echo $this->form->getInput('language'); ?>
20+
</div>
21+
</div>
22+
<input type="hidden" name="task" value="setlanguage">
23+
<input type="hidden" name="format" value="json">
24+
<?php echo JHtml::_('form.token'); ?>
25+
</div>
26+
</form> -->
1527
<form action="index.php" method="post" id="adminForm" class="form-validate">
1628
<div class="row">
1729
<div class="col-md-11 col-lg-12 container">
18-
<div class="form-group row align-items-center">
30+
<div class="form-group row">
1931
<div class="col-md-8 offset-md-2">
2032
<?php echo $this->form->getLabel('admin_user'); ?>
21-
</div>
22-
<div class="col-md-8 offset-md-2">
2333
<?php echo $this->form->getInput('admin_user'); ?>
2434
<p class="form-text text-muted small"><?php echo JText::_('INSTL_ADMIN_USER_DESC'); ?></p>
2535
</div>
2636
</div>
27-
<div class="form-group row align-items-center">
37+
<div class="form-group row">
2838
<div class="col-md-8 offset-md-2">
2939
<?php echo $this->form->getLabel('admin_email'); ?>
30-
</div>
31-
<div class="col-md-8 offset-md-2">
3240
<?php echo $this->form->getInput('admin_email'); ?>
3341
<p class="form-text text-muted small"><?php echo JText::_('INSTL_ADMIN_EMAIL_DESC'); ?></p>
3442
</div>
3543
</div>
36-
<div class="form-group row align-items-center">
44+
<div class="form-group row">
3745
<div class="col-md-8 offset-md-2">
3846
<?php echo $this->form->getLabel('admin_password'); ?>
39-
</div>
40-
<div class="col-md-8 offset-md-2">
4147
<?php // Disables autocomplete ?> <input type="password" style="display:none">
4248
<div class="input-group">
4349
<?php echo $this->form->getInput('admin_password'); ?>
@@ -47,48 +53,38 @@
4753
<p class="form-text text-muted small"><?php echo JText::_('INSTL_ADMIN_PASSWORD_DESC'); ?></p>
4854
</div>
4955
</div>
50-
<div class="form-group row align-items-center">
56+
<div class="form-group row">
5157
<div class="col-md-8 offset-md-2">
5258
<?php echo $this->form->getLabel('db_type'); ?>
53-
</div>
54-
<div class="col-md-8 offset-md-2">
5559
<?php echo $this->form->getInput('db_type'); ?>
5660
<p class="form-text text-muted small"><?php echo JText::_('INSTL_DATABASE_TYPE_DESC'); ?></p>
5761
</div>
5862
</div>
59-
<div class="form-group row align-items-center">
63+
<div class="form-group row">
6064
<div class="col-md-8 offset-md-2">
6165
<?php echo $this->form->getLabel('db_host'); ?>
62-
</div>
63-
<div class="col-md-8 offset-md-2">
6466
<?php echo $this->form->getInput('db_host'); ?>
6567
<p class="form-text text-muted small"><?php echo JText::_('INSTL_DATABASE_HOST_DESC'); ?></p>
6668
</div>
6769
</div>
68-
<div class="form-group row align-items-center">
70+
<div class="form-group row">
6971
<div class="col-md-8 offset-md-2">
7072
<?php echo $this->form->getLabel('db_user'); ?>
71-
</div>
72-
<div class="col-md-8 offset-md-2">
7373
<?php echo $this->form->getInput('db_user'); ?>
7474
<p class="form-text text-muted small"><?php echo JText::_('INSTL_DATABASE_USER_DESC'); ?></p>
7575
</div>
7676
</div>
77-
<div class="form-group row align-items-center">
77+
<div class="form-group row">
7878
<div class="col-md-8 offset-md-2">
7979
<?php echo $this->form->getLabel('db_pass'); ?>
80-
</div>
81-
<div class="col-md-8 offset-md-2">
8280
<?php // Disables autocomplete ?> <input type="password" style="display:none">
8381
<?php echo $this->form->getInput('db_pass'); ?>
8482
<p class="form-text text-muted small"><?php echo JText::_('INSTL_DATABASE_PASSWORD_DESC'); ?></p>
8583
</div>
8684
</div>
87-
<div class="form-group row align-items-center">
85+
<div class="form-group row">
8886
<div class="col-md-8 offset-md-2">
8987
<?php echo $this->form->getLabel('db_name'); ?>
90-
</div>
91-
<div class="col-md-8 offset-md-2">
9288
<?php echo $this->form->getInput('db_name'); ?>
9389
<p class="form-text text-muted small"><?php echo JText::_('INSTL_DATABASE_NAME_DESC'); ?></p>
9490
</div>

0 commit comments

Comments
 (0)