mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 10:50:24 +00:00
change select editor custom style (#7060)
* change select editor custom style * change add permission
This commit is contained in:
@@ -43,20 +43,26 @@ class SelectEditor extends React.Component {
|
||||
}
|
||||
|
||||
setOptions = () => {
|
||||
const { enableAddCustomPermission, options } = this.props;
|
||||
this.options = [];
|
||||
const options = this.props.options;
|
||||
for (let i = 0, length = options.length; i < length; i++) {
|
||||
let option = {};
|
||||
option.value = options[i];
|
||||
if (!options[i].length) { // it's ''. for example, intitution option in 'system admin - users' page can be ''.
|
||||
option.label = <div style={{ minHeight: '1em' }}></div>;
|
||||
} else {
|
||||
option.label = <div>{this.props.translateOption(options[i])}{ this.props.translateExplanation && <div className="permission-editor-explanation">{this.props.translateExplanation(options[i])}</div>}</div>;
|
||||
option.label = (
|
||||
<div>
|
||||
{this.props.translateOption(options[i])}
|
||||
{this.props.translateExplanation &&
|
||||
<div className="permission-editor-explanation">{this.props.translateExplanation(options[i])}</div>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
this.options.push(option);
|
||||
}
|
||||
|
||||
const { enableAddCustomPermission } = this.props;
|
||||
if (enableAddCustomPermission && !this.props.isWiki) {
|
||||
const option = {
|
||||
value: gettext('Add custom permission'),
|
||||
|
Reference in New Issue
Block a user