From d86beb06f7996d0d225e5a494d189ca96ac60878 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Thu, 3 May 2018 23:07:48 +0200 Subject: [PATCH] Added fancy unit indicator to fields. --- src/NzbDrone.Api/ClientSchema/Field.cs | 1 + src/NzbDrone.Api/ClientSchema/SchemaBuilder.cs | 1 + .../Annotations/FieldDefinitionAttribute.cs | 3 ++- src/NzbDrone.Core/Indexers/SeedCriteriaSettings.cs | 4 ++-- src/UI/Content/form.less | 12 ++++++++++++ src/UI/Form/TextboxTemplate.hbs | 1 + 6 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Api/ClientSchema/Field.cs b/src/NzbDrone.Api/ClientSchema/Field.cs index 358669e70e..ff9f6aebd6 100644 --- a/src/NzbDrone.Api/ClientSchema/Field.cs +++ b/src/NzbDrone.Api/ClientSchema/Field.cs @@ -7,6 +7,7 @@ public class Field public int Order { get; set; } public string Name { get; set; } public string Label { get; set; } + public string Unit { get; set; } public string HelpText { get; set; } public string HelpLink { get; set; } public object Value { get; set; } diff --git a/src/NzbDrone.Api/ClientSchema/SchemaBuilder.cs b/src/NzbDrone.Api/ClientSchema/SchemaBuilder.cs index 70f0ce1da2..c2e4a43796 100644 --- a/src/NzbDrone.Api/ClientSchema/SchemaBuilder.cs +++ b/src/NzbDrone.Api/ClientSchema/SchemaBuilder.cs @@ -95,6 +95,7 @@ private static FieldMapping[] GetFieldMapping(Type type, string prefix, Func + {{#if unit}}{{unit}}{{/if}} {{> FormHelpPartial}}