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

second batch of module tmpl codestyle #17852

Closed
wants to merge 22 commits into from
Closed

Conversation

zero-24
Copy link
Contributor

@zero-24 zero-24 commented Sep 3, 2017

Summary of Changes

First batch of module tmpl codestyle

Testing Instructions

Please test and review the following frontend modules using the testing sampledata

  • mod_feed
  • mod_finder
  • mod_footer
  • mod_languages
  • mod_login

Expected result

Still works

Actual result

Works with codestyle problems

Documentation Changes Required

none

@zero-24 zero-24 changed the title seccond batch of module tmpl codestyle second batch of module tmpl codestyle Sep 3, 2017
<?php $lang = JFactory::getLanguage(); ?>
<?php $myrtl = $params->get('rssrtl'); ?>
<?php $direction = ' '; ?>
<?php $isRtl = $lang->isRtl(); ?>
Copy link
Contributor

@brianteeman brianteeman Sep 3, 2017

Choose a reason for hiding this comment

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

Not sure why the first three lines above are aligned on the = but the line below is not?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

they was aligned because they where PHP only code i have reset the aligned. (comming with the next commit)

<?php endif; ?>
<?php if ($params->get('dropdown', 1) && !$params->get('dropdownimage', 0)) : ?>
<form name="lang" method="post" action="<?php echo htmlspecialchars(JUri::current(), ENT_COMPAT, 'UTF-8'); ?>">
<select class="inputbox advancedSelect" onchange="document.location.replace(this.value);" >
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need the space before the > at the end?

@@ -27,7 +27,7 @@
<?php endif; ?>
<?php if ($params->get('dropdown', 1) && !$params->get('dropdownimage', 0)) : ?>
<form name="lang" method="post" action="<?php echo htmlspecialchars(JUri::current(), ENT_COMPAT, 'UTF-8'); ?>">
<select class="inputbox advancedSelect" onchange="document.location.replace(this.value);" >
<select class="inputbox advancedSelect" onchange="document.location.replace(this.value);">
<?php foreach ($list as $language) : ?>
<option dir=<?php echo $language->rtl ? '"rtl"' : '"ltr"'; ?> value="<?php echo $language->link; ?>" <?php echo $language->active ? 'selected="selected"' : ''; ?>>
Copy link
Contributor

Choose a reason for hiding this comment

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

Change to "<?php echo $language->rtl ? 'rtl' : 'ltr'; ?>"

<?php elseif ($myrtl == 0) : ?>
<?php $direction = ' redirect-ltr'; ?>
<?php elseif ($myrtl == 1): ?>
<?php $direction = ' redirect-ltr';?>
Copy link
Contributor

Choose a reason for hiding this comment

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

Add space ?>

@@ -29,7 +29,7 @@
<form name="lang" method="post" action="<?php echo htmlspecialchars(JUri::current(), ENT_COMPAT, 'UTF-8'); ?>">
<select class="inputbox advancedSelect" onchange="document.location.replace(this.value);">
<?php foreach ($list as $language) : ?>
<option dir=<?php echo $language->rtl ? '"rtl"' : '"ltr"'; ?> value="<?php echo $language->link; ?>" <?php echo $language->active ? 'selected="selected"' : ''; ?>>
<option dir=<?php echo $language->rtl ? 'rtl' : 'ltr'; ?> value="<?php echo $language->link; ?>" <?php echo $language->active ? 'selected="selected"' : ''; ?>>
Copy link
Contributor

@Quy Quy Sep 3, 2017

Choose a reason for hiding this comment

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

Missing beginning and ending "

?>

<?php // Show the form fields. ?>
<?php echo $output; ?>
<?php $show_advanced = $params->get('show_advanced'); ?>
<?php if ($show_advanced == 2) : ?>
<br />
Copy link
Contributor

Choose a reason for hiding this comment

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

Multiple lines below.

<?php echo JText::_('MOD_LOGIN_REMEMBER_ME'); ?>
</label>
<input id="modlgn-remember" type="checkbox" name="remember" class="inputbox" value="yes" />
</div>
<?php endif; ?>
<div id="form-login-submit" class="control-group">
<div class="controls">
<button type="submit" tabindex="0" name="Submit" class="btn btn-primary login-button"><?php echo JText::_('JLOGIN'); ?></button>
Copy link
Contributor

Choose a reason for hiding this comment

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

Multiple lines

@Quy
Copy link
Contributor

Quy commented Sep 4, 2017

<?php endif; ?>
<?php // Feed image ?>
<?php if ($iUrl && $params->get('rssimage', 1)) : ?>
<img src="<?php echo $iUrl; ?>" alt="<?php echo @$iTitle; ?>"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Add space before />

@@ -10,115 +10,80 @@
defined('_JEXEC') or die;
?>
Copy link
Contributor

Choose a reason for hiding this comment

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

Add line before ?> and delete line after ?>.

<div class="input-prepend input-append">
<span class="add-on">
<span class="icon-star hasTooltip" title="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>">
</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -28,12 +28,16 @@
<div class="input-prepend">
Copy link
Contributor

Choose a reason for hiding this comment

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

@Quy
Copy link
Contributor

Quy commented Sep 15, 2017

I have tested this item ✅ successfully on 6cbe566

Code review


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17852.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants