Skip to content

[RM] Не скрывается поле language в пакетной обработке и столбец Язык в списке #315

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

Open
MSGroupFM opened this issue Apr 18, 2025 · 0 comments
Labels
bug Something isn't working RadicalMart

Comments

@MSGroupFM
Copy link

MSGroupFM commented Apr 18, 2025

В HtmlView есть код:

if ($this->getLayout() !== 'modal')
		{
			// Add title and toolbar
			$this->addToolbar();

			// Load batch form
			$this->batchForm = $this->get('BatchForm');

			// Remove language filter is not Multilanguage
			if (!Multilanguage::isEnabled())
			{
				unset($this->activeFilters['language']);
				$this->filterForm->removeField('language', 'filter');
				$this->batchForm->removeField('language');
			}
		}

Но поскольку в batch_*.xml language это не поле, а fields:

<fieldset name="language" label="JFIELD_LANGUAGE_LABEL">
		<fields name="language">
			<field name="code" type="contentlanguage"
				   label="JFIELD_LANGUAGE_LABEL"
				   default="">
				<option value="">JOPTION_SELECT_LANGUAGE</option>
				<option value="*">JALL</option>
			</field>
			<field name="action" type="radio"
				   label="COM_RADICALMART_ACTION"
				   showon="code!:"
				   default="set">
				<option value="set">COM_RADICALMART_ACTION_SET</option>
				<option value="create">COM_RADICALMART_ACTION_CREATE_ASSOCIATION</option>
			</field>
		</fields>
	</fieldset>

Нужно использовать

$this->batchForm->removeGroup('language');

В выводе списков в Админпанели еще нет проверки <?php if (Multilanguage::isEnabled()) : ?>

@Septdir Septdir added the bug Something isn't working label Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working RadicalMart
Projects
None yet
Development

No branches or pull requests

2 participants