Skip to content

Commit

Permalink
Merge branch 'master' into fixIsHa
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-f authored Sep 6, 2022
2 parents ff1c11f + 243bffe commit 31254cb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

> Users must be able to say: “I had this issue, happy to know it's fixed”
- [Plugin/auth-saml] Certificate input support multiline (PR [#6403](https://github.com/vatesfr/xen-orchestra/pull/6403))

### Packages to release

> When modifying a package, add it here with its release type.
Expand All @@ -27,6 +29,8 @@
<!--packages-start-->

- xo-server-auth-saml patch
- xo-server patch
- xo-web patch

<!--packages-end-->
1 change: 1 addition & 0 deletions packages/xo-server-auth-saml/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const configurationSchema = {
type: 'string',
},
cert: {
$multiline: true,
title: 'Certificate',
description: "Copy/paste the identity provider's certificate",
type: 'string',
Expand Down
2 changes: 1 addition & 1 deletion packages/xo-server/src/xo-mixins/plugins.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class {
this._ajv = new Ajv({
strict: 'log',
useDefaults: true,
}).addVocabulary(['$type', 'enumNames'])
}).addVocabulary(['$multiline', '$type', 'enumNames'])
this._plugins = { __proto__: null }

this._pluginsMetadata = new PluginsMetadata({
Expand Down
5 changes: 3 additions & 2 deletions packages/xo-web/src/common/combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default class Combobox extends Component {
options: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.objectOf(PropTypes.string)]),
onChange: PropTypes.func.isRequired,
value: PropTypes.string.isRequired,
multiline: PropTypes.bool,
}

_handleChange = event => {
Expand All @@ -26,11 +27,11 @@ export default class Combobox extends Component {
}

render() {
const { options, ...props } = this.props
const { options, multiline = false, ...props } = this.props

props.className = 'form-control'
props.onChange = this._handleChange
const Input = <input {...props} />
const Input = multiline ? <textarea {...props} /> : <input {...props} />

if (isEmpty(options)) {
return Input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default class StringInput extends Component {
<Combobox
value={value !== undefined ? value : ''}
disabled={disabled}
multiline={schema.$multiline}
onChange={this._onChange}
options={schema.defaults}
placeholder={placeholder || schema.default}
Expand Down

0 comments on commit 31254cb

Please sign in to comment.