Skip to content

Commit

Permalink
Fix remove jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bucher committed Feb 21, 2024
1 parent 4ab9dfc commit 2576e1f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import $ from 'jquery';
import React from 'react';

Check failure on line 1 in webpack/components/ApplicationDefinition/ApplicationDefinition.js

View workflow job for this annotation

GitHub Actions / test_js (14)

File has too many lines (492). Maximum allowed is 300
import PropTypes from 'prop-types';
import {
Expand Down
8 changes: 6 additions & 2 deletions webpack/components/ApplicationInstance/ApplicationInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,13 @@ class ApplicationInstance extends React.Component {
const { validateResult, validateMsg } = this.validateParameters();

if (validateResult == false) {
$('input[type="submit"][name="commit"]').attr('disabled', true);
document
.querySelector('input[type="submit"][name="commit"]')
.setAttribute('disabled', true);
} else {
$('input[type="submit"][name="commit"]').attr('disabled', false);
document
.querySelector('input[type="submit"][name="commit"]')
.setAttribute('disabled', false);
}

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import $ from 'jquery';
import React from 'react';
import PropTypes from 'prop-types';
import * as sort from 'sortabular';
Expand Down
9 changes: 6 additions & 3 deletions webpack/components/SyncGitRepo/SyncGitRepo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Button from 'patternfly-react';
import $ from 'jquery';
import CommonForm from 'foremanReact/components/common/forms/CommonForm';
import { translate as __ } from 'foremanReact/common/I18n';
import ScmTypeSelector from './components/ScmTypeSelector';
Expand Down Expand Up @@ -93,9 +92,13 @@ class SyncGitRepo extends React.Component {
const { validateResult, validateMsg } = this.validateParameters();

if (validateResult === false) {
$('input[type="submit"][name="commit"]').attr('disabled', true);
document
.querySelector('input[type="submit"][name="commit"]')
.setAttribute('disabled', true);
} else {
$('input[type="submit"][name="commit"]').attr('disabled', false);
document
.querySelector('input[type="submit"][name="commit"]')
.setAttribute('disabled', false);
}

return (
Expand Down

0 comments on commit 2576e1f

Please sign in to comment.