Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ CREATE TABLE IF NOT EXISTS `#__workflow_stages` (
--

INSERT INTO `#__workflow_stages` (`id`, `asset_id`, `ordering`, `workflow_id`, `published`, `title`, `description`, `condition`, `default`) VALUES
(1, 0, 1, 1, 1, 'Unpublished', '', 0, 0),
(2, 0, 2, 1, 1, 'Published', '', 1, 1),
(3, 0, 3, 1, 1, 'Trashed', '', -2, 0),
(4, 0, 4, 1, 1, 'Archived', '', 2, 0);
(1, 0, 1, 1, 1, 'JUNPUBLISHED', '', 0, 0),
(2, 0, 2, 1, 1, 'JPUBLISHED', '', 1, 1),
(3, 0, 3, 1, 1, 'JTRASHED', '', -2, 0),
(4, 0, 4, 1, 1, 'JARCHIVED', '', 2, 0);

--
-- Table structure for table `#__workflow_transitions`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ CREATE INDEX "#__workflow_stages_idx_default" ON "#__workflow_stages" ("default"
--

INSERT INTO "#__workflow_stages" ("id", "asset_id", "ordering", "workflow_id", "published", "title", "description", "condition", "default") VALUES
(1, 0, 1, 1, 1, 'Unpublished', '', 0, 0),
(2, 0, 2, 1, 1, 'Published', '', 1, 1),
(3, 0, 3, 1, 1, 'Trashed', '', -2, 0),
(4, 0, 4, 1, 1, 'Archived', '', 2, 0);
(1, 0, 1, 1, 1, 'JUNPUBLISHED', '', 0, 0),
(2, 0, 2, 1, 1, 'JPUBLISHED', '', 1, 1),
(3, 0, 3, 1, 1, 'JTRASHED', '', -2, 0),
(4, 0, 4, 1, 1, 'JARCHIVED', '', 2, 0);

--
-- Table structure for table "#__workflow_transitions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
$hasTransitions = count($transitions) > 0;

$default = [
JHtml::_('select.option', '', $this->escape($item->stage_title)),
JHtml::_('select.option', '', $this->escape(Text::_($item->stage_title))),
JHtml::_('select.option', '-1', '--------', ['disable' => true])
];

Expand Down Expand Up @@ -222,7 +222,7 @@
<span class="icon-<?php echo $icon; ?>"></span>
<?php endif; ?>
</div>
<div class="mr-auto"><?php echo $this->escape($item->stage_title); ?></div>
<div class="mr-auto"><?php echo $this->escape(Text::_($item->stage_title)); ?></div>
<?php if ($hasTransitions) : ?>
<div class="d-none">
<?php
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_workflow/forms/transition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
required="true"
sql_select="id as value, title as from_stage_id"
sql_from="#__workflow_stages"
translate="true"
>
<option value="-1">JALL</option>
</field>
Expand All @@ -35,6 +36,7 @@
required="true"
sql_select="id as value, title as to_stage_id"
sql_from="#__workflow_stages"
translate="true"
/>
<field
name="description"
Expand Down
8 changes: 4 additions & 4 deletions administrator/components/com_workflow/tmpl/stages/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
*/
defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Factory;
Expand Down Expand Up @@ -120,11 +120,11 @@
<th scope="row">
<?php if ($canEdit) : ?>
<?php $editIcon = '<span class="fa fa-pencil-square mr-2" aria-hidden="true"></span>'; ?>
<a href="<?php echo $edit; ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes($item->title)); ?>">
<?php echo $editIcon; ?><?php echo $item->title; ?>
<a href="<?php echo $edit; ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes(Text::_($item->title))); ?>">
<?php echo $editIcon; ?><?php echo $this->escape(Text::_($item->title)); ?>
</a>
<?php else: ?>
<?php echo $item->title; ?>
<?php echo $this->escape(Text::_($item->title)); ?>
<?php endif; ?>
</th>
<td class="text-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
HTMLHelper::_('behavior.tooltip');
HTMLHelper::_('behavior.multiselect');

$user = Factory::getUser();
$user = Factory::getUser();

$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
Expand Down Expand Up @@ -115,7 +115,7 @@
<th scope="row">
<?php if ($canEdit) : ?>
<?php $editIcon = '<span class="fa fa-pencil-square mr-2" aria-hidden="true"></span>'; ?>
<a href="<?php echo $edit; ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes($item->title)); ?>">
<a href="<?php echo $edit; ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes(Text::_($item->title))); ?>">
<?php echo $editIcon; ?><?php echo $item->title; ?>
</a>
<?php else: ?>
Expand All @@ -126,11 +126,11 @@
<?php if ($item->from_stage_id < 0) : ?>
<?php echo Text::_('JALL'); ?>
<?php else : ?>
<?php echo $item->from_stage; ?>
<?php echo $this->escape(Text::_($item->from_stage)); ?>
<?php endif; ?>
</td>
<td class="text-center">
<?php echo $this->escape($item->to_stage); ?>
<?php echo $this->escape(Text::_($item->to_stage)); ?>
</td>
<td class="text-right">
<?php echo $item->id; ?>
Expand Down
8 changes: 4 additions & 4 deletions installation/sql/mysql/joomla.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2010,10 +2010,10 @@ CREATE TABLE IF NOT EXISTS `#__workflow_stages` (
--

INSERT INTO `#__workflow_stages` (`id`, `asset_id`, `ordering`, `workflow_id`, `published`, `title`, `description`, `condition`, `default`) VALUES
(1, 57, 1, 1, 1, 'Unpublished', '', 0, 0),
(2, 58, 2, 1, 1, 'Published', '', 1, 1),
(3, 59, 3, 1, 1, 'Trashed', '', -2, 0),
(4, 60, 4, 1, 1, 'Archived', '', 2, 0);
(1, 57, 1, 1, 1, 'JUNPUBLISHED', '', '0', 0),
(2, 58, 2, 1, 1, 'JPUBLISHED', '', '1', 1),
(3, 59, 3, 1, 1, 'JTRASHED', '', '-2', 0),
(4, 60, 4, 1, 1, 'JARCHIVED', '', '2', 0);

--
-- Table structure for table `#__workflow_transitions`
Expand Down
8 changes: 4 additions & 4 deletions installation/sql/postgresql/joomla.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2013,10 +2013,10 @@ CREATE INDEX "#__workflow_stages_idx_default" ON "#__workflow_stages" ("default"
--

INSERT INTO "#__workflow_stages" ("id", "asset_id", "ordering", "workflow_id", "published", "title", "description", "condition", "default") VALUES
(1, 0, 1, 1, 1, 'Unpublished', '', 0, 0),
(2, 0, 2, 1, 1, 'Published', '', 1, 1),
(3, 0, 3, 1, 1, 'Trashed', '', -2, 0),
(4, 0, 4, 1, 1, 'Archived', '', 2, 0);
(1, 0, 1, 1, 1, 'JUNPUBLISHED', '', 0, 0),
(2, 0, 2, 1, 1, 'JPUBLISHED', '', 1, 1),
(3, 0, 3, 1, 1, 'JTRASHED', '', -2, 0),
(4, 0, 4, 1, 1, 'JARCHIVED', '', 2, 0);

SELECT setval('#__workflow_stages_id_seq', 5, false);

Expand Down
8 changes: 5 additions & 3 deletions libraries/src/Form/Field/TransitionField.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Workflow\Workflow;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\Utilities\ArrayHelper;

FormHelper::loadFieldClass('list');
Expand Down Expand Up @@ -68,7 +70,7 @@ public function setup(\SimpleXMLElement $element, $value, $group = null)
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of HTMLHelper options.
*
* @since __DEPLOY_VERSION__
*/
Expand Down Expand Up @@ -134,13 +136,13 @@ function ($item) use ($user, $extension)

$workflowName = $db->setQuery($query)->loadResult();

$default = [\JHtml::_('select.option', '', $workflowName)];
$default = [HTMLHelper::_('select.option', '', Text::_($workflowName))];

$options = array_merge(parent::getOptions(), $items);

if (count($options))
{
$default[] = \JHtml::_('select.option', '-1', '--------', ['disable' => true]);
$default[] = HTMLHelper::_('select.option', '-1', '--------', ['disable' => true]);
}

// Merge with defaults
Expand Down
4 changes: 3 additions & 1 deletion libraries/src/Form/Field/WorkflowstageField.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\GroupedlistField;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

/**
* Workflow Stages field.
Expand Down Expand Up @@ -124,7 +126,7 @@ protected function getGroups()
$workflowStages[$workflowStageKey] = array();
}

$workflowStages[$workflowStageKey][] = HTMLHelper::_('select.option', $stage->workflow_stage_id, $stage->workflow_stage_title);
$workflowStages[$workflowStageKey][] = HTMLHelper::_('select.option', $stage->workflow_stage_id, Text::_($stage->workflow_stage_title));
}

// Merge any additional options in the XML definition.
Expand Down