mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] support display_text
This commit is contained in:
parent
98744a822d
commit
d34da9cc7e
2 changed files with 15 additions and 0 deletions
|
@ -339,12 +339,14 @@
|
|||
args[k].type = (typeof v.type !== 'undefined') ? v.type : 'string';
|
||||
args[k].inputType = 'text';
|
||||
args[k].isPassword = false;
|
||||
args[k].isDisplayText = false;
|
||||
args[k].required = (typeof v.optional !== 'undefined' && v.optional == "true") ? '' : 'required';
|
||||
args[k].attributes = "";
|
||||
args[k].helpText = "";
|
||||
args[k].helpLink = "";
|
||||
|
||||
|
||||
console.log(args[k]);
|
||||
// Multilingual label
|
||||
args[k].label = (typeof args[k].ask[y18n.locale] !== 'undefined') ?
|
||||
args[k].ask[y18n.locale] :
|
||||
|
@ -460,6 +462,11 @@
|
|||
args[k].isPassword = true;
|
||||
}
|
||||
|
||||
if (args[k].type == "display_text") {
|
||||
args[k].isDisplayText = true;
|
||||
args[k].label = args[k].label.split("\n");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,13 @@
|
|||
</div>
|
||||
{{#manifest.arguments.install}}
|
||||
<div class="form-group">
|
||||
{{#if isDisplayText}}
|
||||
<div class="col-sm-12">
|
||||
{{#label}}
|
||||
<p>{{.}}</p>
|
||||
{{/label}}
|
||||
</div>
|
||||
{{else}}
|
||||
<label for="{{name}}" class="col-sm-12">{{label}}</label>
|
||||
|
||||
|
||||
|
@ -68,6 +75,7 @@
|
|||
{{/if}}
|
||||
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/manifest.arguments.install}}
|
||||
<hr>
|
||||
|
|
Loading…
Reference in a new issue