Skip to content

Commit

Permalink
chore: marge supplémentaire sur le formulaire des personnes
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Nov 29, 2024
1 parent a51aab4 commit 006c771
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 52 deletions.
2 changes: 0 additions & 2 deletions front/src/components/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ function ArrayFieldTemplate (properties) {
const addItemTitle = properties.uiSchema['ui:add-item-title'] ?? 'form.addItem.title'
const removeItemTitle = properties.uiSchema['ui:remove-item-title'] ?? 'form.removeItem.title'
const title = properties.uiSchema['ui:title']

const inlineRemoveButton = properties.schema?.items?.type === 'string' || !removeItemTitle
return (
<fieldset className={clsx(styles.fieldset, styles.array)} key={properties.key}>
Expand Down Expand Up @@ -153,7 +152,6 @@ function FieldTemplate (properties) {
const label = properties.schema.$id
? properties.label[properties.schema.$id]
: properties.label
console.log('FieldTemplate', {id, properties, children})
return (
<div className={classNames} style={style}>
{displayLabel && <label htmlFor={id}>
Expand Down
15 changes: 7 additions & 8 deletions front/src/components/form.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
> fieldset {
> button {
font-weight: bold;
margin: 0.5rem 0;
}
}
}
Expand Down Expand Up @@ -108,12 +107,16 @@
> * {
width: 100%;
}

&.person {
margin-top: 1rem;
}
}

&.field-string,
&.field-boolean {
label {
padding-bottom: 0.15rem;
padding-bottom: 0.15rem;
}
}

Expand Down Expand Up @@ -160,11 +163,11 @@
}
}
}

.array-item.keywords {
display: flex;
align-items: center;

> .field-string {
flex: 1;
}
Expand Down Expand Up @@ -230,10 +233,6 @@
}
}

.array {
gap: 1.5rem;
}

.comboboxReadonlyField {
margin-right: .5em;
}
Expand Down
62 changes: 20 additions & 42 deletions front/src/schemas/article-ui-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"authors": {
"ui:add-item-title": "form.addPerson.title",
"items": {
"ui:classNames": "person",
"ui:autocomplete": "IsidoreAuthorSearch",
"surname": {
"ui:title": "article.metadata.people.surname"
Expand All @@ -126,7 +127,8 @@
"ui:title": "article.metadata.people.affiliations"
},
"biography": {
"ui:title": "article.metadata.people.biography"
"ui:title": "article.metadata.people.biography",
"ui:widget": "textarea"
},
"email": {
"ui:title": "article.metadata.people.email"
Expand Down Expand Up @@ -226,6 +228,7 @@
"keywords": {
"ui:add-item-title": "article.metadata.keywords.addItem",
"ui:remove-item-title": "article.metadata.keywords.removeItem",
"ui:className": "keywords",
"items": {
"ui:label": false,
"ui:className": "keywords"
Expand Down Expand Up @@ -270,6 +273,7 @@
"issueDirectors": {
"ui:add-item-title": "form.addPerson.title",
"items": {
"ui:classNames": "person",
"surname": {
"ui:title": "article.metadata.people.surname"
},
Expand All @@ -280,42 +284,8 @@
"ui:title": "article.metadata.people.affiliations"
},
"biography": {
"ui:title": "article.metadata.people.biography"
},
"email": {
"ui:title": "article.metadata.people.email"
},
"orcid": {
"ui:title": "article.metadata.people.orcid"
},
"viaf": {
"ui:title": "article.metadata.people.viaf"
},
"foaf": {
"ui:title": "article.metadata.people.foaf"
},
"isni": {
"ui:title": "article.metadata.people.isni"
},
"wikidata": {
"ui:title": "article.metadata.people.wikidata"
}
}
},
"director": {
"ui:add-item-title": "form.addPerson.title",
"items": {
"surname": {
"ui:title": "article.metadata.people.surname"
},
"forename": {
"ui:title": "article.metadata.people.forename"
},
"affiliations": {
"ui:title": "article.metadata.people.affiliations"
},
"biography": {
"ui:title": "article.metadata.people.biography"
"ui:title": "article.metadata.people.biography",
"ui:widget": "textarea"
},
"email": {
"ui:title": "article.metadata.people.email"
Expand All @@ -340,6 +310,7 @@
"transcribers": {
"ui:add-item-title": "form.addPerson.title",
"items": {
"ui:classNames": "person",
"surname": {
"ui:title": "article.metadata.people.surname"
},
Expand All @@ -350,7 +321,8 @@
"ui:title": "article.metadata.people.affiliations"
},
"biography": {
"ui:title": "article.metadata.people.biography"
"ui:title": "article.metadata.people.biography",
"ui:widget": "textarea"
},
"email": {
"ui:title": "article.metadata.people.email"
Expand Down Expand Up @@ -387,6 +359,7 @@
"translators": {
"ui:add-item-title": "form.addPerson.title",
"items": {
"ui:classNames": "person",
"surname": {
"ui:title": "article.metadata.people.surname"
},
Expand All @@ -397,7 +370,8 @@
"ui:title": "article.metadata.people.affiliations"
},
"biography": {
"ui:title": "article.metadata.people.biography"
"ui:title": "article.metadata.people.biography",
"ui:widget": "textarea"
},
"email": {
"ui:title": "article.metadata.people.email"
Expand Down Expand Up @@ -426,6 +400,7 @@
"reviewers": {
"ui:add-item-title": "form.addPerson.title",
"items": {
"ui:classNames": "person",
"surname": {
"ui:title": "article.metadata.people.surname"
},
Expand All @@ -436,7 +411,8 @@
"ui:title": "article.metadata.people.affiliations"
},
"biography": {
"ui:title": "article.metadata.people.biography"
"ui:title": "article.metadata.people.biography",
"ui:widget": "textarea"
},
"email": {
"ui:title": "article.metadata.people.email"
Expand Down Expand Up @@ -484,6 +460,7 @@
"ui:widget": "textarea"
},
"keywords": {
"ui:className": "keywords",
"ui:title": "article.metadata.keywords",
"ui:add-item-title": "article.metadata.keywords.addItem",
"ui:remove-item-title": "article.metadata.keywords.removeItem",
Expand All @@ -506,7 +483,7 @@
"journalDirectors": {
"ui:add-item-title": "form.addPerson.title",
"items": {
"ui:autocomplete": "IsidoreAuthorSearch",
"ui:classNames": "person",
"surname": {
"ui:title": "article.metadata.people.surname"
},
Expand All @@ -517,7 +494,8 @@
"ui:title": "article.metadata.people.affiliations"
},
"biography": {
"ui:title": "article.metadata.people.biography"
"ui:title": "article.metadata.people.biography",
"ui:widget": "textarea"
},
"email": {
"ui:title": "article.metadata.people.email"
Expand Down

0 comments on commit 006c771

Please sign in to comment.