Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer/upgrader templates revision - part 1 #4791

Merged
merged 4 commits into from
Jul 14, 2018
Merged

Installer/upgrader templates revision - part 1 #4791

merged 4 commits into from
Jul 14, 2018

Conversation

Gwenwyfar
Copy link
Contributor

@Gwenwyfar Gwenwyfar commented Jun 23, 2018

Getting started on these two, the templates here will need more work than the other ones on the html level. This is just mild formatting, next up will be removing the inline styles/table layout. This revision will also make both adaptive.

Signed-off-by: Gwenwyfar <gwenwyfar@simplemachines.org>
Signed-off-by: Gwenwyfar <gwenwyfar@simplemachines.org>
Signed-off-by: Gwenwyfar <gwenwyfar@simplemachines.org>
Signed-off-by: Gwenwyfar <gwenwyfar@simplemachines.org>
@Gwenwyfar
Copy link
Contributor Author

And that's most of all formatting for upgrader done for. The remaining for installer will come later.

<meta charset="', isset($txt['lang_character_set']) ? $txt['lang_character_set'] : 'UTF-8', '">
<meta name="robots" content="noindex">
<title>', $txt['smf_installer'], '</title>
<link rel="stylesheet" href="Themes/default/css/index.css?alp21">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?alp21 needs to be dynamic check loadCSSFile function (same applies the next line as well).

@@ -2127,30 +2129,32 @@ function template_chmod_files()
<td width="26%" valign="top" class="textbox"><label for="ftp_server">', $txt['ftp_server'], ':</label></td>
<td>
<div style="float: ', $txt['lang_rtl'] == false ? 'right' : 'left', '; margin-', $txt['lang_rtl'] == false ? 'right' : 'left', ': 1px;"><label for="ftp_port" class="textbox"><strong>', $txt['ftp_port'], ':&nbsp;</strong></label> <input type="text" size="3" name="ftp_port" id="ftp_port" value="', $incontext['ftp']['port'], '" /></div>
<input type="text" size="30" name="ftp_server" id="ftp_server" value="', $incontext['ftp']['server'], '" style="width: 70%;" />
<input type="text" size="30" name="ftp_server" id="ftp_server" value="', $incontext['ftp']['server'], '" style="width: 70%;">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline width should be moved to install.css (ignoring the following input's inline style).

@@ -2202,7 +2206,7 @@ function template_database_settings()
<tr id="db_server_contain">
<td width="20%" valign="top" class="textbox"><label for="db_server_input">', $txt['db_settings_server'], ':</label></td>
<td>
<input type="text" name="db_server" id="db_server_input" value="', $incontext['db']['server'], '" size="30" /><br>
<input type="text" name="db_server" id="db_server_input" value="', $incontext['db']['server'], '" size="30"><br>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Input sizes should be consistent and predefined for all (ignoring rest size issues).

@@ -2378,15 +2382,15 @@ function template_populate_database()
if (!empty($incontext['failures']))
{
echo '
<div style="color: red;">', $txt['error_db_queries'], '</div>
<ul>';
<div style="color: red;">', $txt['error_db_queries'], '</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All main colors should be predefined in index.css, if not should be added (ignoring rest inline-coloring).

@@ -76,7 +76,7 @@

// The helper is crucial. Include it first thing.
if (!file_exists($upgrade_path . '/upgrade-helper.php'))
die('upgrade-helper.php not found where it was expected: ' . $upgrade_path . '/upgrade-helper.php! Make sure you have uploaded ALL files from the upgrade package. The upgrader cannot continue.');
die('upgrade-helper.php not found where it was expected: ' . $upgrade_path . '/upgrade-helper.php! Make sure you have uploaded ALL files from the upgrade package. The upgrader cannot continue.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you added extra tab here? I think its unnecessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look more closely ;)

******************************************************************************/
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Templates are below this point
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should follow SMF's comment standard in here. While I understand the reasoning consistency should be fixed.

Copy link
Contributor Author

@Gwenwyfar Gwenwyfar Jun 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are going by overall consistency the whole section is not consistent, and it is also non-existent in installer. Maybe removing it is a better choice, or leave an inline comment on both files.

<div class="smalltext" style="padding: 5px; text-align: center;"><br>', $txt['upgrade_time_elapsed'], ':
<span id="mins_elapsed">', $mins, '</span> ', $txt['upgrade_time_mins'], ', <span id="secs_elapsed">', $seconds, '</span> ', $txt['upgrade_time_secs'], '.
</div>';
<br> <br> <br> <br> <br>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be converted to margin instead of many following br's.


if (!empty($upcontext['continue']))
echo '
<input type="submit" id="contbutt" name="contbutt" value="', $txt['upgrade_continue'], '"', $upcontext['continue'] == 2 ? ' disabled' : '', ' class="button">';
<input type="submit" id="contbutt" name="contbutt" value="', $txt['upgrade_continue'], '"', $upcontext['continue'] == 2 ? ' disabled' : '', ' class="button">';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'name' values should be removed as they are obsolete.

@Gwenwyfar
Copy link
Contributor Author

Gwenwyfar commented Jun 26, 2018

I'm not adding any new changes to this PR. It is what it is: mostly formatting. I'll have some of those suggestions in mind for the next one(s) :)

@jdarwood007
Copy link
Member

PR was tested and I don't see anything broken and the PR is ok.

@Gwenwyfar Will you be able to fix up the remaining issues Antes mentioned in a future PR?

@Gwenwyfar
Copy link
Contributor Author

Yes, I already have some changes in local for part 2. Just splitting them so we don't have a giant PR to review.

@jdarwood007 jdarwood007 merged commit 98fee78 into SimpleMachines:release-2.1 Jul 14, 2018
@Gwenwyfar Gwenwyfar deleted the installer-upgrader branch July 14, 2018 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants