mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2026-08-21 10:42:50 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39c19238dd | ||
|
|
3f14a3ada4 |
+47
@@ -0,0 +1,47 @@
|
|||||||
|
// This file is part of React-Invenio-Deposit
|
||||||
|
// Copyright (C) 2020 CERN.
|
||||||
|
// Copyright (C) 2020 Northwestern University.
|
||||||
|
// Copyright (C) 2021 Graz University of Technology.
|
||||||
|
//
|
||||||
|
// React-Invenio-Deposit is free software; you can redistribute it and/or modify it
|
||||||
|
// under the terms of the MIT License; see LICENSE file for more details.
|
||||||
|
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
|
import { FieldLabel, TextField } from 'react-invenio-forms';
|
||||||
|
|
||||||
|
export class PublisherField extends Component {
|
||||||
|
render() {
|
||||||
|
const { fieldPath, label, labelIcon, placeholder, required } = this.props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<TextField
|
||||||
|
fieldPath={fieldPath}
|
||||||
|
helpText={
|
||||||
|
'The publisher is used to formulate the citation, if you are plannig to mint a new DOI this publisher will be cited.'
|
||||||
|
}
|
||||||
|
label={
|
||||||
|
<FieldLabel htmlFor={fieldPath} icon={labelIcon} label={label} />
|
||||||
|
}
|
||||||
|
placeholder={placeholder}
|
||||||
|
required={required}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PublisherField.propTypes = {
|
||||||
|
fieldPath: PropTypes.string.isRequired,
|
||||||
|
label: PropTypes.string,
|
||||||
|
labelIcon: PropTypes.string,
|
||||||
|
placeholder: PropTypes.string,
|
||||||
|
required: PropTypes.bool,
|
||||||
|
};
|
||||||
|
|
||||||
|
PublisherField.defaultProps = {
|
||||||
|
fieldPath: 'metadata.publisher',
|
||||||
|
label: 'Publisher',
|
||||||
|
labelIcon: 'building outline',
|
||||||
|
placeholder: 'Enter publisher name',
|
||||||
|
};
|
||||||
+2
-2
@@ -33,7 +33,6 @@ import {
|
|||||||
LanguagesField,
|
LanguagesField,
|
||||||
PublishButton,
|
PublishButton,
|
||||||
PublicationDateField,
|
PublicationDateField,
|
||||||
PublisherField,
|
|
||||||
ResourceTypeField,
|
ResourceTypeField,
|
||||||
SaveButton,
|
SaveButton,
|
||||||
SubjectsField,
|
SubjectsField,
|
||||||
@@ -44,6 +43,7 @@ import {
|
|||||||
} from "react-invenio-deposit";
|
} from "react-invenio-deposit";
|
||||||
import { AccordionField } from "react-invenio-forms";
|
import { AccordionField } from "react-invenio-forms";
|
||||||
import { DoiMint } from "./DoiMint";
|
import { DoiMint } from "./DoiMint";
|
||||||
|
import { PublisherField } from "./PublisherField";
|
||||||
|
|
||||||
export class RDMDepositForm extends Component {
|
export class RDMDepositForm extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -448,7 +448,7 @@ export class RDMDepositForm extends Component {
|
|||||||
/>
|
/>
|
||||||
<DatesField options={this.vocabularies.metadata.dates} />
|
<DatesField options={this.vocabularies.metadata.dates} />
|
||||||
<VersionField />
|
<VersionField />
|
||||||
<PublisherField />
|
<PublisherField required/>
|
||||||
<br />
|
<br />
|
||||||
</AccordionField>
|
</AccordionField>
|
||||||
{/**TODO: uncomment to use FundingField*/}
|
{/**TODO: uncomment to use FundingField*/}
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ This file is imported by ``invenio_theme_tugraz.__init__``,
|
|||||||
and parsed by ``setup.py``.
|
and parsed by ``setup.py``.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "1.9.4"
|
__version__ = "1.9.5"
|
||||||
|
|||||||
Reference in New Issue
Block a user