Skip to content

[4.0] Change 'Module Class Suffix' to 'Module Class'#18300

Merged
wilsonge merged 3 commits intojoomla:4.0-devfrom
ciar4n:mod-class-sfx
Oct 10, 2017
Merged

[4.0] Change 'Module Class Suffix' to 'Module Class'#18300
wilsonge merged 3 commits intojoomla:4.0-devfrom
ciar4n:mod-class-sfx

Conversation

@ciar4n
Copy link
Contributor

@ciar4n ciar4n commented Oct 10, 2017

Pull Request for Issue #16894 .

Summary of Changes

Inline with #17026 this PR changes 'Module Class Suffix' to 'Module Class'

Testing Instructions

Add class to module using the 'Module Class' field (no space). Check frontend and ensure class has been added correctly.

Eg.
<div class="card yourClass">

Expected result

Actual result

Documentation Changes Required

Yes

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.0-dev labels Oct 10, 2017
COM_MODULES_FIELD_CLIENT_ID_LABEL="Module Location"
COM_MODULES_FIELD_CONTENT_LABEL="Text"
COM_MODULES_FIELD_MODULE_LABEL="Module Type"
COM_MODULES_FIELD_MODULECLASS_SFX_LABEL="Module Class Suffix"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we leave this string constant as is please? Huge numbers of modules use this. I know it kinda sucks as a descriptive thing - but it's also going to cause stupid pain

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense.. done

// Temporarily store header class in variable
$headerClass = $params->get('header_class');
$headerClass = $headerClass ? ' class="' . htmlspecialchars($headerClass, ENT_COMPAT, 'UTF-8') . '"' : '';
$headerClass = $headerClass ? ' class=" ' . htmlspecialchars($headerClass, ENT_COMPAT, 'UTF-8') . '"' : '';
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to add a space here.

$headerClass = $headerClass ? ' class=" ' . htmlspecialchars($headerClass, ENT_COMPAT, 'UTF-8') . '"' : '';

if (!empty ($module->content)) : ?>
<<?php echo $moduleTag; ?> class="moduletable<?php echo htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8') . $moduleClass; ?>">
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a space here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @Quy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants