mirror of
https://github.com/strapi/strapi.git
synced 2025-12-25 22:23:10 +00:00
Finish design and dynamic show policies section
This commit is contained in:
parent
0866a5e484
commit
f6acc00875
@ -51,6 +51,12 @@ class InputCheckbox extends React.Component { // eslint-disable-line react/prefe
|
||||
this.setState({ showBackground: !this.state.showBackground });
|
||||
this.props.setNewInputSelected(this.props.name);
|
||||
this.context.setInputPoliciesPath(this.props.name);
|
||||
|
||||
if (this.state.showBackground) {
|
||||
this.context.resetShouldDisplayPoliciesHint();
|
||||
} else {
|
||||
this.context.setShouldDisplayPolicieshint();
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
@ -87,6 +93,7 @@ class InputCheckbox extends React.Component { // eslint-disable-line react/prefe
|
||||
|
||||
InputCheckbox.contextTypes = {
|
||||
onChange: PropTypes.func.isRequired,
|
||||
resetShouldDisplayPoliciesHint: PropTypes.func.isRequired,
|
||||
setInputPoliciesPath: PropTypes.func.isRequired,
|
||||
setShouldDisplayPolicieshint: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
@ -32,7 +32,7 @@ class Policies extends React.Component { // eslint-disable-line react/prefer-sta
|
||||
{!this.props.shouldDisplayPoliciesHint ? (
|
||||
<Input
|
||||
customBootstrapClass="col-md-12"
|
||||
label="users-permissions.Policies.InputSelect.empty"
|
||||
label="users-permissions.Policies.InputSelect.label"
|
||||
name={this.props.inputSelectName}
|
||||
onChange={this.handleChange}
|
||||
selectOptions={this.props.selectOptions}
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: 1.1rem;
|
||||
padding-top: 1rem;
|
||||
font-size: 18px;
|
||||
font-weight: 900;
|
||||
|
||||
@ -108,9 +108,12 @@
|
||||
|
||||
"Plugins.header.title": "Permissions",
|
||||
"Plugins.header.description": "Only actions bound by a route are listed below.",
|
||||
|
||||
"Policies.InputSelect.empty": "None",
|
||||
"Policies.InputSelect.label": "Allow to perform this action for:",
|
||||
"Policies.header.hint": "Select the application's actions or the plugin's actions and put your mouse over to display the bounded route",
|
||||
"Policies.header.title": "Advanced settings",
|
||||
|
||||
"PopUpForm.button.cancel": "Cancel",
|
||||
"PopUpForm.button.save": "Save",
|
||||
"PopUpForm.header.add.providers": "Add New Provider",
|
||||
|
||||
@ -111,8 +111,10 @@
|
||||
"Plugins.header.description": "Sont listés uniquement les actions associées à une route.",
|
||||
|
||||
"Policies.InputSelect.empty": "Aucune",
|
||||
"Policies.InputSelect.label": "Autorisez cette action pour :",
|
||||
"Policies.header.hint": "Sélectionnez ...",
|
||||
"Policies.header.tile": "Paramètres avancés",
|
||||
|
||||
"popUpForm.button.cancel": "Annuler",
|
||||
"popUpForm.button.save": "Sauvegarder",
|
||||
"popUpForm.header.add.providers": "Ajouter un Nouveau Provider",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user