mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01:00
New: Frontend Placeholders from the Backend
This commit is contained in:
parent
6ca708f523
commit
69f5963f6f
4 changed files with 7 additions and 1 deletions
|
|
@ -68,6 +68,7 @@ function ProviderFieldFormGroup(props) {
|
||||||
label,
|
label,
|
||||||
helpText,
|
helpText,
|
||||||
helpLink,
|
helpLink,
|
||||||
|
placeholder,
|
||||||
value,
|
value,
|
||||||
type,
|
type,
|
||||||
advanced,
|
advanced,
|
||||||
|
|
@ -100,6 +101,7 @@ function ProviderFieldFormGroup(props) {
|
||||||
label={label}
|
label={label}
|
||||||
helpText={helpText}
|
helpText={helpText}
|
||||||
helpLink={helpLink}
|
helpLink={helpLink}
|
||||||
|
placeholder={placeholder}
|
||||||
value={value}
|
value={value}
|
||||||
values={getSelectValues(selectOptions)}
|
values={getSelectValues(selectOptions)}
|
||||||
errors={errors}
|
errors={errors}
|
||||||
|
|
@ -125,6 +127,7 @@ ProviderFieldFormGroup.propTypes = {
|
||||||
label: PropTypes.string,
|
label: PropTypes.string,
|
||||||
helpText: PropTypes.string,
|
helpText: PropTypes.string,
|
||||||
helpLink: PropTypes.string,
|
helpLink: PropTypes.string,
|
||||||
|
placeholder: PropTypes.string,
|
||||||
value: PropTypes.any,
|
value: PropTypes.any,
|
||||||
type: PropTypes.string.isRequired,
|
type: PropTypes.string.isRequired,
|
||||||
advanced: PropTypes.bool.isRequired,
|
advanced: PropTypes.bool.isRequired,
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ public FieldDefinitionAttribute(int order)
|
||||||
public string Section { get; set; }
|
public string Section { get; set; }
|
||||||
public HiddenType Hidden { get; set; }
|
public HiddenType Hidden { get; set; }
|
||||||
public PrivacyLevel Privacy { get; set; }
|
public PrivacyLevel Privacy { get; set; }
|
||||||
|
public string Placeholder { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
|
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ public class Field
|
||||||
public string SelectOptionsProviderAction { get; set; }
|
public string SelectOptionsProviderAction { get; set; }
|
||||||
public string Section { get; set; }
|
public string Section { get; set; }
|
||||||
public string Hidden { get; set; }
|
public string Hidden { get; set; }
|
||||||
|
public string Placeholder { get; set; }
|
||||||
|
|
||||||
public Field Clone()
|
public Field Clone()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,8 @@ private static FieldMapping[] GetFieldMapping(Type type, string prefix, Func<obj
|
||||||
Order = fieldAttribute.Order,
|
Order = fieldAttribute.Order,
|
||||||
Advanced = fieldAttribute.Advanced,
|
Advanced = fieldAttribute.Advanced,
|
||||||
Type = fieldAttribute.Type.ToString().FirstCharToLower(),
|
Type = fieldAttribute.Type.ToString().FirstCharToLower(),
|
||||||
Section = fieldAttribute.Section
|
Section = fieldAttribute.Section,
|
||||||
|
Placeholder = fieldAttribute.Placeholder
|
||||||
};
|
};
|
||||||
|
|
||||||
if (fieldAttribute.Type == FieldType.Select || fieldAttribute.Type == FieldType.TagSelect)
|
if (fieldAttribute.Type == FieldType.Select || fieldAttribute.Type == FieldType.TagSelect)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue