-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving HTML/JS output to a layout to allow template overriding
- Loading branch information
Thomas Hunziker
committed
May 26, 2016
1 parent
49e416a
commit 4abda6a
Showing
6 changed files
with
138 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Plugin | ||
* @subpackage Installer.folderinstaller | ||
* | ||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
$app = JFactory::getApplication('administrator'); | ||
|
||
JFactory::getDocument()->addScriptDeclaration(' | ||
Joomla.submitbuttonfolder = function() | ||
{ | ||
var form = document.getElementById("adminForm"); | ||
// do field validation | ||
if (form.install_directory.value == "") | ||
{ | ||
alert("' . JText::_('PLG_INSTALLER_FOLDERINSTALLER_NO_INSTALL_PATH') . '"); | ||
} | ||
else | ||
{ | ||
jQuery("#loading").css("display", "block"); | ||
form.installtype.value = "folder" | ||
form.submit(); | ||
} | ||
}; | ||
'); | ||
?> | ||
<legend><?php echo JText::_('PLG_INSTALLER_FOLDERINSTALLER_TEXT'); ?></legend> | ||
<div class="control-group"> | ||
<label for="install_directory" class="control-label"><?php echo JText::_('PLG_INSTALLER_FOLDERINSTALLER_TEXT'); ?></label> | ||
<div class="controls"> | ||
<input type="text" id="install_directory" name="install_directory" class="span5 input_box" size="70" | ||
value="<?php echo $app->input->get('install_directory', $app->get('tmp_path')); ?>" /> | ||
</div> | ||
</div> | ||
<div class="form-actions"> | ||
<input type="button" class="btn btn-primary" id="installbutton_directory" | ||
value="<?php echo JText::_('PLG_INSTALLER_FOLDERINSTALLER_BUTTON'); ?>" onclick="Joomla.submitbuttonfolder()" /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Plugin | ||
* @subpackage Installer.packageinstaller | ||
* | ||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
JFactory::getDocument()->addScriptDeclaration(' | ||
Joomla.submitbuttonpackage = function() | ||
{ | ||
var form = document.getElementById("adminForm"); | ||
// do field validation | ||
if (form.install_package.value == "") | ||
{ | ||
alert("' . JText::_('PLG_INSTALLER_PACKAGEINSTALLER_NO_PACKAGE') . '"); | ||
} | ||
else | ||
{ | ||
jQuery("#loading").css("display", "block"); | ||
form.installtype.value = "upload" | ||
form.submit(); | ||
} | ||
}; | ||
'); | ||
?> | ||
<legend><?php echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_INSTALL_JOOMLA_EXTENSION'); ?></legend> | ||
<div class="control-group"> | ||
<label for="install_package" class="control-label"><?php echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_EXTENSION_PACKAGE_FILE'); ?></label> | ||
<div class="controls"> | ||
<input class="input_box" id="install_package" name="install_package" type="file" size="57" /> | ||
</div> | ||
</div> | ||
<div class="form-actions"> | ||
<button class="btn btn-primary" type="button" id="installbutton_package" onclick="Joomla.submitbuttonpackage()"> | ||
<?php echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_AND_INSTALL'); ?> | ||
</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Plugin | ||
* @subpackage Installer.urlinstaller | ||
* | ||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
JFactory::getDocument()->addScriptDeclaration(' | ||
Joomla.submitbuttonurl = function() | ||
{ | ||
var form = document.getElementById("adminForm"); | ||
// do field validation | ||
if (form.install_url.value == "" || form.install_url.value == "http://" || form.install_url.value == "https://") { | ||
alert("' . JText::_('PLG_INSTALLER_URLINSTALLER_NO_URL', true) . '"); | ||
} | ||
else | ||
{ | ||
jQuery("#loading").css("display", "block"); | ||
form.installtype.value = "url" | ||
form.submit(); | ||
} | ||
}; | ||
'); | ||
?> | ||
<legend><?php echo JText::_('PLG_INSTALLER_URLINSTALLER_TEXT'); ?></legend> | ||
<div class="control-group"> | ||
<label for="install_url" class="control-label"><?php echo JText::_('PLG_INSTALLER_URLINSTALLER_TEXT'); ?></label> | ||
<div class="controls"> | ||
<input type="text" id="install_url" name="install_url" class="span5 input_box" size="70" placeholder="https://"/> | ||
</div> | ||
</div> | ||
<div class="form-actions"> | ||
<input type="button" class="btn btn-primary" id="installbutton_url" | ||
value="<?php echo JText::_('PLG_INSTALLER_URLINSTALLER_BUTTON'); ?>" onclick="Joomla.submitbuttonurl()" />' | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters