Skip to content

Commit

Permalink
Merge branch 'KelvinTegelaar:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
BNWEIN authored Jun 23, 2024
2 parents b85450d + 5dd3559 commit 012ce84
Show file tree
Hide file tree
Showing 4 changed files with 232 additions and 70 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

18 changes: 12 additions & 6 deletions src/components/forms/RFFComponents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,19 +470,25 @@ RFFCFormSelect.propTypes = {
export function Condition({ when, is, children, like, regex }) {
return (
<>
{is && (
{is !== undefined && (
<Field name={when} subscription={{ value: true }}>
{({ input: { value } }) => (value === is ? children : null)}
{({ input: { value } }) => {
return value === is ? children : null
}}
</Field>
)}
{like && (
{like !== undefined && (
<Field name={when} subscription={{ value: true }}>
{({ input: { value } }) => (value.includes(like) ? children : null)}
{({ input: { value } }) => {
return value.includes(like) ? children : null
}}
</Field>
)}
{regex && (
{regex !== undefined && (
<Field name={when} subscription={{ value: true }}>
{({ input: { value } }) => (value.match(regex) ? children : null)}
{({ input: { value } }) => {
return value.match(regex) ? children : null
}}
</Field>
)}
</>
Expand Down
9 changes: 8 additions & 1 deletion src/views/email-exchange/spamfilter/DeploySpamfilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'
import { CippWizard } from 'src/components/layout'
import { WizardTableField } from 'src/components/tables'
import PropTypes from 'prop-types'
import { RFFCFormSelect, RFFCFormTextarea } from 'src/components/forms'
import { RFFCFormSelect, RFFCFormTextarea, RFFCFormInput } from 'src/components/forms'
import { useLazyGenericGetRequestQuery, useLazyGenericPostRequestQuery } from 'src/store/api/app'
import { OnChange } from 'react-final-form-listeners'

Expand Down Expand Up @@ -151,6 +151,11 @@ const SpamFilterAdd = () => {
/>
</CCol>
</CRow>
<CRow>
<CCol>
<RFFCFormInput name="Priority" label="SpamFilter priority" placeholder={'0'} />
</CCol>
</CRow>
<hr className="my-4" />
<WhenFieldChanges field="TemplateList" set="PowerShellCommand" />
</CippWizard.Page>
Expand Down Expand Up @@ -179,6 +184,8 @@ const SpamFilterAdd = () => {
</CCallout>
<h5 className="mb-0">Rule Settings</h5>
<CCallout color="info">{props.values.PowerShellCommand}</CCallout>
<h5 className="mb-0">Priority</h5>
<CCallout color="info">{props.values.Priority}</CCallout>
</CCol>
</CRow>
</>
Expand Down
Loading

0 comments on commit 012ce84

Please sign in to comment.