API & Client - refactor registration activation - #15

This commit is contained in:
Sam
2019-11-13 21:46:24 +01:00
parent 1398c7ff4a
commit 7ffcaad332
13 changed files with 45 additions and 128 deletions

View File

@ -28,26 +28,17 @@ export default function Config({ appConfig, message, t, updateIsInEdition }) {
<tbody>
<tr>
<th scope="row">
{t('administration:Enable registration')}:
</th>
<td>
{appConfig.registration
? t('common:yes')
: t('common:no')}
</td>
</tr>
<tr>
<th scope="row">
{t('administration:Max. number of active users')}:
{t(
// eslint-disable-next-line max-len
'administration:Max. number of active users (if 0, no limitation)'
)}
:
</th>
<td>{appConfig.max_users}</td>
</tr>
<tr>
<th scope="row">
{t(
'administration:Max. size of ' + 'uploaded files'
)}
:
{t('administration:Max. size of uploaded files')}:
</th>
<td>{getFileSize(appConfig.max_single_file_size)}</td>
</tr>

View File

@ -73,28 +73,16 @@ class AdminApplication extends React.Component {
updateIsInEdition()
}}
>
<div className="form-group row">
<label
className="col-sm-6 col-form-label"
htmlFor="registration"
>
{t('administration:Enable registration')}:
</label>
<input
className="col-sm-5"
id="registration"
name="registration"
type="checkbox"
checked={formData.registration}
onChange={e => this.handleFormChange(e)}
/>
</div>
<div className="form-group row">
<label
className="col-sm-6 col-form-label"
htmlFor="max_users"
>
{t('administration:Max. number of active users')}:
{t(
// eslint-disable-next-line max-len
'administration:Max. number of active users (if 0, no limitation)'
)}
:
</label>
<input
className="col-sm-5"