Stable release of v3.2.0-beta1
Move beta to main repo. Fix #1053 so that the right and left tabs display correctly in Joomla 4&5.
This commit is contained in:
@ -12,13 +12,19 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::_('jquery.framework');
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('script', 'system/core.js', false, true);
|
||||
JHtml::_('behavior.keepalive');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
Html::_('jquery.framework');
|
||||
Html::_('bootstrap.tooltip');
|
||||
Html::_('script', 'system/core.js', false, true);
|
||||
Html::_('behavior.keepalive');
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<?php if ($this->hasPackage && ComponentbuilderHelper::checkArray($this->headerList)) : ?>
|
||||
<?php if ($this->hasPackage && ArrayHelper::check($this->headerList)) : ?>
|
||||
Joomla.continueImport = function()
|
||||
{
|
||||
var form = document.getElementById('adminForm');
|
||||
@ -35,7 +41,7 @@ JHtml::_('behavior.keepalive');
|
||||
// do field validation
|
||||
if (error)
|
||||
{
|
||||
alert("<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS', true); ?>");
|
||||
alert("<?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS', true); ?>");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -55,7 +61,7 @@ JHtml::_('behavior.keepalive');
|
||||
// do field validation
|
||||
if (form.import_package.value == "")
|
||||
{
|
||||
alert("<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_A_FILE', true); ?>");
|
||||
alert("<?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_A_FILE', true); ?>");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -75,7 +81,7 @@ JHtml::_('behavior.keepalive');
|
||||
|
||||
// do field validation
|
||||
if (form.import_directory.value == ""){
|
||||
alert("<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY', true); ?>");
|
||||
alert("<?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY', true); ?>");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -96,7 +102,7 @@ JHtml::_('behavior.keepalive');
|
||||
// do field validation
|
||||
if (form.import_url.value == "" || form.import_url.value == "http://")
|
||||
{
|
||||
alert("<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_ENTER_A_URL', true); ?>");
|
||||
alert("<?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_MSG_ENTER_A_URL', true); ?>");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -147,13 +153,13 @@ jQuery(document).ready(function($) {
|
||||
<?php endif;?>
|
||||
|
||||
|
||||
<?php if ($this->hasPackage && ComponentbuilderHelper::checkArray($this->headerList) && ComponentbuilderHelper::checkArray($this->headers)) : ?>
|
||||
<?php if ($this->hasPackage && ArrayHelper::check($this->headerList) && ArrayHelper::check($this->headers)) : ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
|
||||
<legend><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label class="control-label" ><h4><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_TABLE_COLUMNS'); ?></h4></label>
|
||||
<label class="control-label" ><h4><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_TABLE_COLUMNS'); ?></h4></label>
|
||||
<div class="controls">
|
||||
<label class="control-label" ><h4><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_FILE_COLUMNS'); ?></h4></label>
|
||||
<label class="control-label" ><h4><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_FILE_COLUMNS'); ?></h4></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php foreach($this->headerList as $name => $title): ?>
|
||||
@ -161,8 +167,8 @@ jQuery(document).ready(function($) {
|
||||
<label for="<?php echo $name; ?>" class="control-label" ><?php echo $title; ?></label>
|
||||
<div class="controls">
|
||||
<select name="<?php echo $name; ?>" id="vdm_<?php echo $name; ?>" required class="required input_box" >
|
||||
<option value=""><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
|
||||
<option value="IGNORE"><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_IGNORE_COLUMN'); ?></option>
|
||||
<option value=""><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
|
||||
<option value="IGNORE"><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_IGNORE_COLUMN'); ?></option>
|
||||
<?php foreach($this->headers as $value => $option): ?>
|
||||
<?php $selected = (strtolower($option) == strtolower ($title) || strtolower($option) == strtolower($name))? 'selected="selected"':''; ?>
|
||||
<option value="<?php echo ComponentbuilderHelper::htmlEscape($value); ?>" class="required" <?php echo $selected ?>><?php echo ComponentbuilderHelper::htmlEscape($option); ?></option>
|
||||
@ -172,62 +178,62 @@ jQuery(document).ready(function($) {
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="form-actions">
|
||||
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueImport()" />
|
||||
<input class="btn btn-primary" type="button" value="<?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueImport()" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="gettype" value="continue" />
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'upload')); ?>
|
||||
<?php echo Html::_('bootstrap.startTabSet', 'myTab', array('active' => 'upload')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'upload', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_UPLOAD', true)); ?>
|
||||
<?php echo Html::_('bootstrap.addTab', 'myTab', 'upload', Text::_('COM_COMPONENTBUILDER_IMPORT_FROM_UPLOAD', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<legend><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_package" class="control-label"><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE'); ?></label>
|
||||
<label for="import_package" class="control-label"><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE'); ?></label>
|
||||
<div class="controls">
|
||||
<input class="input_box" id="import_package" name="import_package" type="file" size="57" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_UPLOAD_BOTTON'); ?>" onclick="Joomla.submitbutton()" /> <small><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
<input class="btn btn-primary" type="button" value="<?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_UPLOAD_BOTTON'); ?>" onclick="Joomla.submitbutton()" /> <small><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php echo Html::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'directory', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_DIRECTORY', true)); ?>
|
||||
<?php echo Html::_('bootstrap.addTab', 'myTab', 'directory', Text::_('COM_COMPONENTBUILDER_IMPORT_FROM_DIRECTORY', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<legend><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_directory" class="control-label"><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_DIRECTORY'); ?></label>
|
||||
<label for="import_directory" class="control-label"><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_DIRECTORY'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="import_directory" name="import_directory" class="span5 input_box" size="70" value="<?php echo $this->state->get('import.directory'); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton3()" /> <small><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
<input type="button" class="btn btn-primary" value="<?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton3()" /> <small><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php echo Html::_('bootstrap.endTab'); ?>
|
||||
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'url', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_URL', true)); ?>
|
||||
<?php echo Html::_('bootstrap.addTab', 'myTab', 'url', Text::_('COM_COMPONENTBUILDER_IMPORT_FROM_URL', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<legend><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_url" class="control-label"><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_URL'); ?></label>
|
||||
<label for="import_url" class="control-label"><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_URL'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="import_url" name="import_url" class="span5 input_box" size="70" value="http://" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton4()" /> <small><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
<input type="button" class="btn btn-primary" value="<?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton4()" /> <small><?php echo Text::_('COM_COMPONENTBUILDER_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
<?php echo Html::_('bootstrap.endTab'); ?>
|
||||
<?php echo Html::_('bootstrap.endTabSet'); ?>
|
||||
<input type="hidden" name="gettype" value="upload" />
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="import_language_translations.import" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
<?php echo Html::_('form.token'); ?>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -12,7 +12,14 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Form\FormHelper;
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
|
||||
/**
|
||||
* Componentbuilder Import_language_translations Html View
|
||||
@ -33,7 +40,7 @@ class ComponentbuilderViewImport_language_translations extends HtmlView
|
||||
ComponentbuilderHelper::addSubmenu('import');
|
||||
}
|
||||
|
||||
$paths = new stdClass;
|
||||
$paths = new \stdClass;
|
||||
$paths->first = '';
|
||||
$state = $this->get('state');
|
||||
|
||||
@ -50,7 +57,7 @@ class ComponentbuilderViewImport_language_translations extends HtmlView
|
||||
}
|
||||
|
||||
// get the session object
|
||||
$session = JFactory::getSession();
|
||||
$session = Factory::getSession();
|
||||
// check if it has package
|
||||
$this->hasPackage = $session->get('hasPackage', false);
|
||||
$this->dataType = $session->get('dataType', false);
|
||||
@ -76,19 +83,19 @@ class ComponentbuilderViewImport_language_translations extends HtmlView
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_IMPORT_TITLE'), 'upload');
|
||||
ToolbarHelper::title(Text::_('COM_COMPONENTBUILDER_IMPORT_TITLE'), 'upload');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=import_language_translations');
|
||||
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
ToolbarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$this->help_url = ComponentbuilderHelper::getHelpUrl('import_language_translations');
|
||||
if (ComponentbuilderHelper::checkString($this->help_url))
|
||||
if (StringHelper::check($this->help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
|
||||
ToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user