diff --git a/b2share/modules/schemas/validate.py b/b2share/modules/schemas/validate.py index 5cde8499f9..000dda1b66 100644 --- a/b2share/modules/schemas/validate.py +++ b/b2share/modules/schemas/validate.py @@ -54,6 +54,7 @@ # the properties which are defined must have this structure "title": {"type": "string"}, "description": {"type": "string"}, + "unit": {"type": "string"}, "type": { "enum": ["boolean", "integer", "number", "string", "array"] }, diff --git a/webui/app/css/app.css b/webui/app/css/app.css index 8cc7b8ab3c..e52be1c1c0 100644 --- a/webui/app/css/app.css +++ b/webui/app/css/app.css @@ -807,10 +807,22 @@ a.navbar-brand { color: #333; } +.schema-field { + font-weight: bold; +} + +.schema-field span:nth-child(2) { + color: grey; +} + .required.property { color: #F45D00; } +.required.property span:nth-child(2) { + color: #FF9D63; +} + /*****************************************************************************/ /* help and about pages */ diff --git a/webui/src/components/editrecord.jsx b/webui/src/components/editrecord.jsx index 2a024b6b18..f6f6de4136 100644 --- a/webui/src/components/editrecord.jsx +++ b/webui/src/components/editrecord.jsx @@ -384,8 +384,16 @@ const EditRecord = React.createClass({
- {title} - - {title?" :: ":""} - {id} - {schema.get('isRequired') ? " (required)":false} - -
-{schema.get('description')}
-+ {title} + {schema.get('unit') ? ' (' + schema.get('unit') + ')' : false } + + {title ? " :: " : ""} + {id} + {schema.get('isRequired') ? " (required)" : false} + +
+{schema.get('description')}
+