Update translate

This commit is contained in:
Gregory Lirent 2024-04-20 22:52:08 +03:00
parent f2f096d8a5
commit 7c08f846a5
Signed by: lirent
GPG Key ID: F616BE337EFFEE77

View File

@ -54,7 +54,7 @@ const dateFormatter = v => {
return `${year}-${month}-${day}T${hour}:${minute}`;
};
const registrationTokenFilters = [<BooleanInput source="valid" alwaysOn />];
const registrationTokenFilters = [<BooleanInput label="resources.registration_tokens.fields.valid" source="valid" alwaysOn />];
export const RegistrationTokenList = props => (
<List
@ -65,11 +65,12 @@ export const RegistrationTokenList = props => (
perPage={500}
>
<Datagrid rowClick="edit">
<TextField source="token" sortable={false} />
<NumberField source="uses_allowed" sortable={false} />
<NumberField source="pending" sortable={false} />
<NumberField source="completed" sortable={false} />
<TextField label="resources.registration_tokens.fields.token" source="token" sortable={false} />
<NumberField label="resources.registration_tokens.fields.uses_allowed" source="uses_allowed" sortable={false} />
<NumberField label="resources.registration_tokens.fields.pending" source="pending" sortable={false} />
<NumberField label="resources.registration_tokens.fields.completed" source="completed" sortable={false} />
<DateField
label="resources.registration_tokens.fields.expiry_time"
source="expiry_time"
showTime
options={date_format}
@ -90,23 +91,29 @@ export const RegistrationTokenCreate = props => (
}
>
<TextInput
label="resources.registration_tokens.fields.token"
source="token"
autoComplete="off"
validate={validateToken}
resettable
/>
<NumberInput
label="resources.registration_tokens.fields.length"
source="length"
validate={validateLength}
helperText="resources.registration_tokens.helper.length"
step={1}
/>
<NumberInput
label="resources.registration_tokens.fields.uses_allowed"
source="uses_allowed"
validate={validateUsesAllowed}
step={1}
/>
<DateTimeInput source="expiry_time" parse={dateParser} />
<DateTimeInput
label="resources.registration_tokens.fields.expiry_time"
source="expiry_time"
parse={dateParser} />
</SimpleForm>
</Create>
);
@ -114,15 +121,17 @@ export const RegistrationTokenCreate = props => (
export const RegistrationTokenEdit = props => (
<Edit {...props}>
<SimpleForm>
<TextInput source="token" disabled />
<NumberInput source="pending" disabled />
<NumberInput source="completed" disabled />
<TextInput label="resources.registration_tokens.fields.token" source="token" disabled />
<NumberInput label="resources.registration_tokens.fields.pending" source="pending" disabled />
<NumberInput label="resources.registration_tokens.fields.completed" source="completed" disabled />
<NumberInput
label="resources.registration_tokens.fields.uses_allowed"
source="uses_allowed"
validate={validateUsesAllowed}
step={1}
/>
<DateTimeInput
label="resources.registration_tokens.fields.expiry_time"
source="expiry_time"
parse={dateParser}
format={dateFormatter}