mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:36:38 +02:00
Optional labels
This commit is contained in:
parent
4c3f32782a
commit
e7ecf1cd6f
1 changed files with 8 additions and 4 deletions
|
@ -25,7 +25,9 @@ var viewHelpers = {
|
|||
+ " trigger-change' data-short-name='" + setting.name + "' name='" + setting_name + "' "
|
||||
|
||||
if (setting.type === 'checkbox') {
|
||||
if (setting.label) {
|
||||
form_group += "<label class='" + label_class + "'>" + setting.label + "</label>"
|
||||
}
|
||||
form_group += "<div class='checkbox" + (isLocked ? " disabled" : "") + "'>"
|
||||
form_group += "<label for='" + setting_name + "'>"
|
||||
form_group += "<input type='checkbox'" + common_attrs + (setting_value ? "checked" : "") + (isLocked ? " disabled" : "") + "/>"
|
||||
|
@ -36,7 +38,9 @@ var viewHelpers = {
|
|||
} else {
|
||||
input_type = _.has(setting, 'type') ? setting.type : "text"
|
||||
|
||||
if (setting.label) {
|
||||
form_group += "<label for='" + setting_name + "' class='" + label_class + "'>" + setting.label + "</label>";
|
||||
}
|
||||
|
||||
if (setting.type === 'select') {
|
||||
form_group += "<select class='form-control' data-hidden-input='" + setting_name + "'>'"
|
||||
|
@ -208,7 +212,7 @@ $('body').on('click', '.save-button', function(e){
|
|||
function makeTable(setting, setting_name, setting_value) {
|
||||
var isArray = !_.has(setting, 'key')
|
||||
|
||||
var html = "<label class='control-label'>" + setting.label + "</label>"
|
||||
var html = (setting.label) ? "<label class='control-label'>" + setting.label + "</label>" : ""
|
||||
html += "<span class='help-block'>" + setting.help + "</span>"
|
||||
html += "<table class='table table-bordered' data-short-name='" + setting.name + "' name='" + setting_name + (isArray ? "[]" : "")
|
||||
+ "' data-setting-type='" + (isArray ? 'array' : 'hash') + "'>"
|
||||
|
|
Loading…
Reference in a new issue