Skip to content

Commit

Permalink
Merge branch '4.3-dev' into transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
obuisard committed Dec 14, 2022
2 parents 3ee3635 + d08fbac commit 31c1f63
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 93 deletions.
2 changes: 2 additions & 0 deletions administrator/components/com_users/forms/mail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
type="text"
label="COM_USERS_MAIL_FIELD_SUBJECT_LABEL"
maxlength="150"
required="true"
/>

<field
Expand All @@ -54,6 +55,7 @@
label="COM_USERS_MAIL_FIELD_MESSAGE_LABEL"
cols="70"
rows="20"
required="true"
/>
</fieldset>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -70,7 +71,11 @@ protected function addToolbar()
Factory::getApplication()->getInput()->set('hidemainmenu', true);

ToolbarHelper::title(Text::_('COM_USERS_MASS_MAIL'), 'users massmail');
ToolbarHelper::custom('mail.send', 'envelope', '', 'COM_USERS_TOOLBAR_MAIL_SEND_MAIL', false);
$toolbar = Toolbar::getInstance();
$toolbar->standardButton('COM_USERS_TOOLBAR_MAIL_SEND_MAIL', 'COM_USERS_TOOLBAR_MAIL_SEND_MAIL', 'mail.send')
->icon('icon-envelope')
->formValidation(true);

ToolbarHelper::cancel('mail.cancel');
ToolbarHelper::divider();
ToolbarHelper::preferences('com_users');
Expand Down
82 changes: 32 additions & 50 deletions administrator/components/com_users/tmpl/mail/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,66 +15,48 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

Text::script('COM_USERS_MAIL_PLEASE_FILL_IN_THE_SUBJECT', true);
Text::script('COM_USERS_MAIL_PLEASE_SELECT_A_GROUP', true);
Text::script('COM_USERS_MAIL_PLEASE_FILL_IN_THE_MESSAGE', true);
/** @var Joomla\Component\Users\Administrator\View\Mail\HtmlView $this */

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_users.admin-users-mail');
$wa->useScript('keepalive')
->useScript('form.validate');

$comUserParams = ComponentHelper::getParams('com_users');
?>

<form class="main-card p-4" action="<?php echo Route::_('index.php?option=com_users&view=mail'); ?>" name="adminForm" method="post" id="adminForm" aria-label="<?php echo Text::_('COM_USERS_MASSMAIL_FORM_NEW'); ?>">
<div class="row mt-2">
<div class="col-md-9">
<fieldset class="adminform">
<div class="form-group">
<?php echo $this->form->getLabel('subject'); ?>
<span class="input-group">
<?php if (!empty($comUserParams->get('mailSubjectPrefix'))) : ?>
<span class="input-group-text"><?php echo $comUserParams->get('mailSubjectPrefix'); ?></span>
<?php endif; ?>
<?php echo $this->form->getInput('subject'); ?>
</span>
</div>
<div class="form-group">
<?php echo $this->form->getLabel('message'); ?>
<?php echo $this->form->getInput('message'); ?>
<?php if (!empty($comUserParams->get('mailBodySuffix'))) : ?>
<div class="mt-1 card">
<div class="card-body">
<?php echo $comUserParams->get('mailBodySuffix'); ?>
</div>
</div>
<form action="<?php echo Route::_('index.php?option=com_users&view=mail'); ?>" name="adminForm" method="post" id="mail-form" aria-label="<?php echo Text::_('COM_USERS_MASSMAIL_FORM_NEW'); ?>" class="main-card p-4 form-validate">
<div class="row">
<div class="col-lg-9">
<div class="control-group">
<?php echo $this->form->getLabel('subject'); ?>
<span class="input-group">
<?php if (!empty($comUserParams->get('mailSubjectPrefix'))) : ?>
<span class="input-group-text"><?php echo $comUserParams->get('mailSubjectPrefix'); ?></span>
<?php endif; ?>
</div>
</fieldset>
<input type="hidden" name="task" value="">
<?php echo HTMLHelper::_('form.token'); ?>
</div>
<div class="col-md-3">
<div class="form-group">
<?php echo $this->form->getInput('recurse'); ?>
<?php echo $this->form->getLabel('recurse'); ?>
</div>
<div class="form-group">
<?php echo $this->form->getInput('mode'); ?>
<?php echo $this->form->getLabel('mode'); ?>
</div>
<div class="form-group">
<?php echo $this->form->getInput('disabled'); ?>
<?php echo $this->form->getLabel('disabled'); ?>
<?php echo $this->form->getInput('subject'); ?>
</span>
</div>
<div class="form-group">
<?php echo $this->form->getInput('bcc'); ?>
<?php echo $this->form->getLabel('bcc'); ?>
</div>
<div class="form-group">
<?php echo $this->form->getLabel('group'); ?>
<?php echo $this->form->getInput('group'); ?>
<div class="control-group">
<?php echo $this->form->getLabel('message'); ?>
<?php echo $this->form->getInput('message'); ?>
<?php if (!empty($comUserParams->get('mailBodySuffix'))) : ?>
<div class="mt-1 card">
<div class="card-body">
<?php echo $comUserParams->get('mailBodySuffix'); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
<div class="col-lg-3">
<?php echo $this->form->renderField('recurse'); ?>
<?php echo $this->form->renderField('mode'); ?>
<?php echo $this->form->renderField('disabled'); ?>
<?php echo $this->form->renderField('bcc'); ?>
<?php echo $this->form->renderField('group'); ?>
</div>
</div>
<input type="hidden" name="task" value="">
<?php echo HTMLHelper::_('form.token'); ?>
</form>
4 changes: 4 additions & 0 deletions administrator/language/en-GB/com_users.ini
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,13 @@ COM_USERS_MAIL_NO_USERS_COULD_BE_FOUND_IN_THIS_GROUP="No users could be found in
COM_USERS_MAIL_ONLY_YOU_COULD_BE_FOUND_IN_THIS_GROUP="You are the only user in this group."
COM_USERS_MAIL_PASSWORD_RESET_DESC="Sent to a user by the &quot;Forgot your password?&quot; link eg in a login form."
COM_USERS_MAIL_PASSWORD_RESET_TITLE="Users: Password Reset"
; Deprecated, will be removed with 5.0
COM_USERS_MAIL_PLEASE_FILL_IN_THE_FORM_CORRECTLY="Please fill in the form correctly."
; Deprecated, will be removed with 5.0
COM_USERS_MAIL_PLEASE_FILL_IN_THE_MESSAGE="Please enter a message"
; Deprecated, will be removed with 5.0
COM_USERS_MAIL_PLEASE_FILL_IN_THE_SUBJECT="Please enter a subject"
; Deprecated, will be removed with 5.0
COM_USERS_MAIL_PLEASE_SELECT_A_GROUP="Please select a Group"
COM_USERS_MAIL_REGISTRATION_ADMIN_NEW_NOTIFICATION_DESC="Notification to the admin that a new, activated account has been created."
COM_USERS_MAIL_REGISTRATION_ADMIN_NEW_NOTIFICATION_TITLE="Users: New account notification to admin"
Expand Down
34 changes: 0 additions & 34 deletions build/media_source/com_users/js/admin-users-mail.es6.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public function getMessageQueue()
public function getMVCFactory()
{
if (!$this->mvcFactory) {
$this->mvcFactory = new MVCFactory('Joomla\\CMS', $this);
$this->mvcFactory = new MVCFactory('Joomla\\CMS');
}

return $this->mvcFactory;
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Layout/FileLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ public function setIncludePaths($paths)
/**
* Set suffixes to search layouts
*
* @param mixed $suffixes String with a single suffix or 'auto' | 'none' or array of suffixes
* @param array $suffixes Array of suffixes to utilise
*
* @return self
*
Expand Down
12 changes: 6 additions & 6 deletions plugins/task/demotasks/src/Extension/DemoTasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ private function resumable(ExecuteTaskEvent $event): int
*
* @return integer The routine exit code.
*
* @since 4.1.0
* @throws Exception
* @since 4.1.0
* @throws \Exception
*/
private function sleep(ExecuteTaskEvent $event): int
{
Expand All @@ -152,8 +152,8 @@ private function sleep(ExecuteTaskEvent $event): int
*
* @return integer The routine exit code.
*
* @since 4.1.0
* @throws Exception
* @since 4.1.0
* @throws \Exception
*/
private function stressMemory(ExecuteTaskEvent $event): int
{
Expand All @@ -179,8 +179,8 @@ private function stressMemory(ExecuteTaskEvent $event): int
*
* @return integer The routine exit code.
*
* @since 4.1.0
* @throws Exception
* @since 4.1.0
* @throws \Exception
*/
private function stressMemoryRemoveLimit(ExecuteTaskEvent $event): int
{
Expand Down

0 comments on commit 31c1f63

Please sign in to comment.