Skip to content

Commit

Permalink
#9753 [stable-3_3_0] Add jquery-validation to composer from npm
Browse files Browse the repository at this point in the history
  • Loading branch information
blesildaramirez committed Jul 10, 2024
1 parent ff3a112 commit 9dbfc07
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
4 changes: 2 additions & 2 deletions classes/template/PKPTemplateManager.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -616,10 +616,10 @@ function registerJSLibrary() {
// properly by our build script
$this->addJavaScript(
'jqueryValidate',
$baseUrl . '/lib/pkp/js/lib/jquery/plugins/validate/jquery.validate.min.js',
$baseUrl . '/lib/pkp/lib/vendor/jquery/validation/dist/jquery.validate.min.js',
$args
);
$jqvLocalePath = 'lib/pkp/js/lib/jquery/plugins/validate/localization/messages_';
$jqvLocalePath = 'lib/pkp/lib/vendor/jquery/validation/dist/localization/messages_';
foreach ($localeChecks as $localeCheck) {
if (file_exists($jqvLocalePath . $localeCheck .'.js')) {
$this->addJavaScript('jqueryValidateLocale', $baseUrl . '/' . $jqvLocalePath . $localeCheck . '.js', $args);
Expand Down
14 changes: 13 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"cweagans/composer-patches": "^1.7",
"composer/semver": "*",
"php81_bc/strftime": "^0.5.0",
"jquery/ui": "1.13.3"
"jquery/ui": "1.13.3",
"jquery/validation": "1.19.5"
},
"require-dev": {
"phpunit/phpunit": "~9",
Expand Down Expand Up @@ -56,6 +57,17 @@
"type": "tar"
}
}
},
{
"type": "package",
"package": {
"name": "jquery/validation",
"version": "1.19.5",
"dist": {
"url": "https://registry.npmjs.org/jquery-validation/-/jquery-validation-1.19.5.tgz",
"type": "tar"
}
}
}
],
"extra": {
Expand Down
11 changes: 10 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9dbfc07

Please sign in to comment.