Skip to content

Commit

Permalink
Revert "[New Feature] Multilingual: Propagating existing associations…
Browse files Browse the repository at this point in the history
… if desired (#21321)" (#21408)

This reverts commit 8bacca9.
  • Loading branch information
Michael Babker authored and ReLater committed Sep 1, 2018
1 parent 82042bf commit f5027d4
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 704 deletions.
88 changes: 0 additions & 88 deletions administrator/components/com_categories/controllers/ajax.json.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ protected function preprocessForm(JForm $form, $data, $group = 'content')
$field->addAttribute('new', 'true');
$field->addAttribute('edit', 'true');
$field->addAttribute('clear', 'true');
$field->addAttribute('propagate', 'true');
}

$form->load($addform, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

defined('JPATH_BASE') or die;

use Joomla\CMS\Language\LanguageHelper;

/**
* Supports a modal category picker.
*
Expand Down Expand Up @@ -44,13 +42,10 @@ protected function getInput()
$extension = (string) JFactory::getApplication()->input->get('extension', 'com_content');
}

$allowNew = ((string) $this->element['new'] == 'true');
$allowEdit = ((string) $this->element['edit'] == 'true');
$allowClear = ((string) $this->element['clear'] != 'false');
$allowSelect = ((string) $this->element['select'] != 'false');
$allowPropagate = ((string) $this->element['propagate'] == 'true');

$languages = LanguageHelper::getContentLanguages(array(0, 1));
$allowNew = ((string) $this->element['new'] == 'true');
$allowEdit = ((string) $this->element['edit'] == 'true');
$allowClear = ((string) $this->element['clear'] != 'false');
$allowSelect = ((string) $this->element['select'] != 'false');

// Load language.
JFactory::getLanguage()->load('com_categories', JPATH_ADMINISTRATOR);
Expand Down Expand Up @@ -83,8 +78,6 @@ function jSelectCategory_" . $this->id . "(id, title, object) {
}
");

JText::script('JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED');

$scriptSelect[$this->id] = true;
}
}
Expand Down Expand Up @@ -186,23 +179,6 @@ function jSelectCategory_" . $this->id . "(id, title, object) {
. '</a>';
}

// Propagate category button
if ($allowPropagate && count($languages) > 2)
{
// Strip off language tag at the end
$tagLength = (int) strlen($this->element['language']);
$callbackFunctionStem = substr("jSelectCategory_" . $this->id, 0, -$tagLength);

$html .= '<a'
. ' class="btn hasTooltip' . ($value ? '' : ' hidden') . '"'
. ' id="' . $this->id . '_propagate"'
. ' href="#"'
. ' title="' . JHtml::tooltipText('JGLOBAL_ASSOCIATIONS_PROPAGATE_TIP') . '"'
. ' onclick="Joomla.propagateAssociation(\'' . $this->id . '\', \'' . $callbackFunctionStem . '\');">'
. '<span class="icon-refresh" aria-hidden="true"></span>' . JText::_('JGLOBAL_ASSOCIATIONS_PROPAGATE_BUTTON')
. '</a>';
}

$html .= '</span>';

// Select category modal.
Expand Down
87 changes: 0 additions & 87 deletions administrator/components/com_contact/controllers/ajax.json.php

This file was deleted.

1 change: 0 additions & 1 deletion administrator/components/com_contact/models/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,6 @@ protected function preprocessForm(JForm $form, $data, $group = 'content')
$field->addAttribute('new', 'true');
$field->addAttribute('edit', 'true');
$field->addAttribute('clear', 'true');
$field->addAttribute('propagate', 'true');
}

$form->load($addform, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

defined('JPATH_BASE') or die;

use Joomla\CMS\Language\LanguageHelper;

/**
* Supports a modal contact picker.
*
Expand All @@ -35,13 +33,10 @@ class JFormFieldModal_Contact extends JFormField
*/
protected function getInput()
{
$allowNew = ((string) $this->element['new'] == 'true');
$allowEdit = ((string) $this->element['edit'] == 'true');
$allowClear = ((string) $this->element['clear'] != 'false');
$allowSelect = ((string) $this->element['select'] != 'false');
$allowPropagate = ((string) $this->element['propagate'] == 'true');

$languages = LanguageHelper::getContentLanguages(array(0, 1));
$allowNew = ((string) $this->element['new'] == 'true');
$allowEdit = ((string) $this->element['edit'] == 'true');
$allowClear = ((string) $this->element['clear'] != 'false');
$allowSelect = ((string) $this->element['select'] != 'false');

// Load language
JFactory::getLanguage()->load('com_contact', JPATH_ADMINISTRATOR);
Expand Down Expand Up @@ -74,8 +69,6 @@ function jSelectContact_" . $this->id . "(id, title, object) {
}
");

JText::script('JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED');

$scriptSelect[$this->id] = true;
}
}
Expand Down Expand Up @@ -175,23 +168,6 @@ function jSelectContact_" . $this->id . "(id, title, object) {
. '</a>';
}

// Propagate contact button
if ($allowPropagate && count($languages) > 2)
{
// Strip off language tag at the end
$tagLength = (int) strlen($this->element['language']);
$callbackFunctionStem = substr("jSelectContact_" . $this->id, 0, -$tagLength);

$html .= '<a'
. ' class="btn hasTooltip' . ($value ? '' : ' hidden') . '"'
. ' id="' . $this->id . '_propagate"'
. ' href="#"'
. ' title="' . JHtml::tooltipText('JGLOBAL_ASSOCIATIONS_PROPAGATE_TIP') . '"'
. ' onclick="Joomla.propagateAssociation(\'' . $this->id . '\', \'' . $callbackFunctionStem . '\');">'
. '<span class="icon-refresh" aria-hidden="true"></span>' . JText::_('JGLOBAL_ASSOCIATIONS_PROPAGATE_BUTTON')
. '</a>';
}

$html .= '</span>';

// Select contact modal
Expand Down
86 changes: 0 additions & 86 deletions administrator/components/com_content/controllers/ajax.json.php

This file was deleted.

0 comments on commit f5027d4

Please sign in to comment.