<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_formea
 *
 * @copyright   Copyright (C) 2010-2025 Feseur Sdn Bhd. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @version     1.3.0
 */

use Joomla\CMS\Language\Text;

defined('_JEXEC') or die;
?>
<script type="text/javascript">
    function installPlugin() {
        var form = document.adminForm;
        if (form.plugin_package.value == "") {
            alert("<?php echo Text::_('COM_FORMEA_CHOOSE_VALIDATION_PLUGIN'); ?>");
            return;
        }
        form.setAttribute('enctype', 'multipart/form-data');
        form.task.value = 'validation.install';
        form.submit();
    }
</script>