Frontend Placeholders from the Backend

(cherry picked from commit 69f5963f6f1e80e3f598bdb13792b7413fcc13b1)
This commit is contained in:
Robin Dadswell 2021-11-14 21:49:21 +00:00 committed by Mark McDowall
parent 94b5d23094
commit 720fc2818f
4 changed files with 8 additions and 1 deletions

View File

@ -65,6 +65,7 @@ function ProviderFieldFormGroup(props) {
label,
helpText,
helpLink,
placeholder,
value,
type,
advanced,
@ -97,6 +98,7 @@ function ProviderFieldFormGroup(props) {
label={label}
helpText={helpText}
helpLink={helpLink}
placeholder={placeholder}
value={value}
values={getSelectValues(selectOptions)}
errors={errors}
@ -122,6 +124,7 @@ ProviderFieldFormGroup.propTypes = {
label: PropTypes.string.isRequired,
helpText: PropTypes.string,
helpLink: PropTypes.string,
placeholder: PropTypes.string,
value: PropTypes.any,
type: PropTypes.string.isRequired,
advanced: PropTypes.bool.isRequired,

View File

@ -23,6 +23,7 @@ namespace NzbDrone.Core.Annotations
public string Section { get; set; }
public HiddenType Hidden { get; set; }
public PrivacyLevel Privacy { get; set; }
public string Placeholder { get; set; }
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]

View File

@ -19,6 +19,8 @@ namespace Sonarr.Http.ClientSchema
public string Section { get; set; }
public string Hidden { get; set; }
public PrivacyLevel Privacy { get; set; }
public string Placeholder { get; set; }
public Field Clone()
{
return (Field)MemberwiseClone();

View File

@ -119,7 +119,8 @@ namespace Sonarr.Http.ClientSchema
Advanced = fieldAttribute.Advanced,
Type = fieldAttribute.Type.ToString().FirstCharToLower(),
Section = fieldAttribute.Section,
Privacy = fieldAttribute.Privacy
Privacy = fieldAttribute.Privacy,
Placeholder = fieldAttribute.Placeholder
};
if (fieldAttribute.Type == FieldType.Select || fieldAttribute.Type == FieldType.TagSelect)