-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change back occurences of registration_version to less intrusive chec…
…kbox
- Loading branch information
Showing
7 changed files
with
18 additions
and
26 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
12 changes: 2 additions & 10 deletions
12
app/webpacker/components/CompetitionForm/FormSections/Admin.js
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 |
---|---|---|
@@ -1,25 +1,17 @@ | ||
import React from 'react'; | ||
import { InputBoolean, InputSelect } from '../../wca/FormBuilder/input/FormInputs'; | ||
import { InputBoolean } from '../../wca/FormBuilder/input/FormInputs'; | ||
import { useStore } from '../../../lib/providers/StoreProvider'; | ||
import SubSection from '../../wca/FormBuilder/SubSection'; | ||
import { useFormObject } from '../../wca/FormBuilder/provider/FormObjectProvider'; | ||
|
||
const registrationVersions = [{ | ||
key: 'v1', value: 'v1', text: 'Version 1', | ||
}, { | ||
key: 'v2', value: 'v2', text: 'Version 2', | ||
}]; | ||
|
||
export default function Admin() { | ||
const { isAdminView, isPersisted, canChangeRegistrationSystem } = useStore(); | ||
const { admin: { registrationVersion } } = useFormObject(); | ||
if (!isPersisted || !isAdminView) return null; | ||
|
||
return ( | ||
<SubSection section="admin"> | ||
<InputBoolean id="isConfirmed" /> | ||
<InputBoolean id="isVisible" /> | ||
<InputSelect id="registrationVersion" options={registrationVersions} value={registrationVersions.find((x) => x.value === registrationVersion)} disabled={!canChangeRegistrationSystem} /> | ||
<InputBoolean id="usesNewRegistrationSystem" disabled={!canChangeRegistrationSystem} /> | ||
</SubSection> | ||
); | ||
} |
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
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