|
1 | 1 | import React, { useEffect, useState, useCallback } from 'react'; |
2 | 2 | import { useLocation, useNavigate } from 'react-router-dom'; |
3 | 3 | import { |
4 | | - Alert, Col, Row, Button, Input, |
| 4 | + Alert, Col, Row, Button, Form, |
5 | 5 | } from '@openedx/paragon'; |
6 | 6 | import { getSsoRecords } from '../../users/data/api'; |
7 | 7 | import EnrollmentDetails from './EnrollmentDetails'; |
@@ -117,41 +117,46 @@ export default function ProgramInspector() { |
117 | 117 | <form> |
118 | 118 | <div className="d-flex"> |
119 | 119 | <div className="col-sm-4 pl-0"> |
120 | | - <label htmlFor="username">edX username or email</label> |
121 | | - <Input |
| 120 | + <Form.Group> |
| 121 | + <Form.Label htmlFor="username">edX username or email</Form.Label> |
| 122 | + <From.Control |
122 | 123 | className="col-sm-12" |
123 | 124 | name="username" |
124 | | - type="text" |
125 | 125 | defaultValue={username} |
126 | 126 | onChange={(e) => (e.target.value |
127 | 127 | ? setUsername(e.target.value) |
128 | 128 | : setUsername(undefined))} |
129 | 129 | placeholder="edx@example.com" |
130 | 130 | /> |
| 131 | + </Form.Group> |
131 | 132 | </div> |
132 | 133 | <div className="col-sm-4"> |
133 | | - <label htmlFor="orgKey">Identity-providing institution</label> |
134 | | - <Input |
| 134 | + <Form.Group> |
| 135 | + <Form.Label htmlFor="orgKey">Identity-providing institution</Form.Label> |
| 136 | + <Form.Control |
135 | 137 | className="col-sm-12" |
136 | 138 | name="orgKey" |
137 | 139 | type="select" |
138 | 140 | defaultValue={activeOrgKey} |
139 | | - options={getOrgKeyList()} |
140 | 141 | onChange={(e) => setActiveOrgKey(e.target.value)} |
141 | | - /> |
| 142 | + > |
| 143 | + {getOrgKeyList().map(({ label, value, disabled }) => <option value={value} disabled={disabled}>{label}</option> )} |
| 144 | + </Form.Control> |
| 145 | + </Form.Group> |
142 | 146 | </div> |
143 | 147 | <div className="col-sm-4 pr-0"> |
144 | | - <label htmlFor="externalKey">Institution user key</label> |
145 | | - <Input |
| 148 | + <Form.Group> |
| 149 | + <Form.Label htmlFor="externalKey">Institution user key</Form.Label> |
| 150 | + <From.Control |
146 | 151 | className="col-sm-12" |
147 | 152 | name="externalKey" |
148 | | - type="text" |
149 | 153 | defaultValue={externalUserKey} |
150 | 154 | onChange={(e) => (e.target.value |
151 | 155 | ? setExternalUserKey(e.target.value) |
152 | 156 | : setExternalUserKey(undefined))} |
153 | 157 | placeholder="ex. GTPersonDirectoryID for GT Students" |
154 | 158 | /> |
| 159 | + </Form.Group> |
155 | 160 | </div> |
156 | 161 | </div> |
157 | 162 | <Button type="submit" className="mt-4" onClick={submit}> |
|
0 commit comments