|
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,49 @@ 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 |
122 | | - className="col-sm-12" |
123 | | - name="username" |
124 | | - type="text" |
125 | | - defaultValue={username} |
126 | | - onChange={(e) => (e.target.value |
127 | | - ? setUsername(e.target.value) |
128 | | - : setUsername(undefined))} |
129 | | - placeholder="edx@example.com" |
130 | | - /> |
| 120 | + <Form.Group> |
| 121 | + <Form.Label htmlFor="username">edX username or email</Form.Label> |
| 122 | + <Form.Control |
| 123 | + className="col-sm-12" |
| 124 | + name="username" |
| 125 | + defaultValue={username} |
| 126 | + onChange={(e) => (e.target.value |
| 127 | + ? setUsername(e.target.value) |
| 128 | + : setUsername(undefined))} |
| 129 | + placeholder="edx@example.com" |
| 130 | + /> |
| 131 | + </Form.Group> |
131 | 132 | </div> |
132 | 133 | <div className="col-sm-4"> |
133 | | - <label htmlFor="orgKey">Identity-providing institution</label> |
134 | | - <Input |
135 | | - className="col-sm-12" |
136 | | - name="orgKey" |
137 | | - type="select" |
138 | | - defaultValue={activeOrgKey} |
139 | | - options={getOrgKeyList()} |
140 | | - onChange={(e) => setActiveOrgKey(e.target.value)} |
141 | | - /> |
| 134 | + <Form.Group> |
| 135 | + <Form.Label htmlFor="orgKey">Identity-providing institution</Form.Label> |
| 136 | + <Form.Control |
| 137 | + className="col-sm-12" |
| 138 | + name="orgKey" |
| 139 | + type="select" |
| 140 | + defaultValue={activeOrgKey} |
| 141 | + onChange={(e) => setActiveOrgKey(e.target.value)} |
| 142 | + > |
| 143 | + { |
| 144 | + getOrgKeyList() |
| 145 | + .map(({ label, value, disabled }) => <option value={value} disabled={disabled}>{label}</option>) |
| 146 | + } |
| 147 | + </Form.Control> |
| 148 | + </Form.Group> |
142 | 149 | </div> |
143 | 150 | <div className="col-sm-4 pr-0"> |
144 | | - <label htmlFor="externalKey">Institution user key</label> |
145 | | - <Input |
146 | | - className="col-sm-12" |
147 | | - name="externalKey" |
148 | | - type="text" |
149 | | - defaultValue={externalUserKey} |
150 | | - onChange={(e) => (e.target.value |
151 | | - ? setExternalUserKey(e.target.value) |
152 | | - : setExternalUserKey(undefined))} |
153 | | - placeholder="ex. GTPersonDirectoryID for GT Students" |
154 | | - /> |
| 151 | + <Form.Group> |
| 152 | + <Form.Label htmlFor="externalKey">Institution user key</Form.Label> |
| 153 | + <Form.Control |
| 154 | + className="col-sm-12" |
| 155 | + name="externalKey" |
| 156 | + defaultValue={externalUserKey} |
| 157 | + onChange={(e) => (e.target.value |
| 158 | + ? setExternalUserKey(e.target.value) |
| 159 | + : setExternalUserKey(undefined))} |
| 160 | + placeholder="ex. GTPersonDirectoryID for GT Students" |
| 161 | + /> |
| 162 | + </Form.Group> |
155 | 163 | </div> |
156 | 164 | </div> |
157 | 165 | <Button type="submit" className="mt-4" onClick={submit}> |
|
0 commit comments