86 lines
4.5 KiB
HTML
86 lines
4.5 KiB
HTML
<% var disabled = locked ? 'disabled' : '' %>
|
|
<% var ns = "cluster_page.settings_tab." + groupName + "." %>
|
|
<% var groupMetadata = settings.metadata || {} %>
|
|
|
|
<% if (groupMetadata.toggleable) { %>
|
|
<legend class="openstack-settings">
|
|
<label class="toggleable">
|
|
<div class="tumbler">
|
|
<div class="parameter-control">
|
|
<div class="custom-tumbler">
|
|
<input type="checkbox" class="disable-section" name="<%- groupName %>.enabled" />
|
|
<!-- [if !IE |(gte IE 9)]> --><span> </span><!-- <![endif] -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<%- $.t(ns + 'label', {defaultValue: groupMetadata.label || groupName}) %>
|
|
</label>
|
|
</legend>
|
|
<% } else { %>
|
|
<legend class="openstack-settings"><%- $.t(ns + 'label', {defaultValue: groupMetadata.label || groupName}) %></legend>
|
|
<% } %>
|
|
<div class="settings-group table-wrapper" data-settings-group="<%- groupName %>">
|
|
<% var sortedSettings = _.sortBy(_.keys(settings), function(setting) {return settings[setting].weight;}); %>
|
|
<% _.each(sortedSettings, function(settingName) { %>
|
|
<% var setting = settings[settingName]; %>
|
|
<% if (setting.type == 'checkbox') { %>
|
|
<div class="table-colspan setting-container">
|
|
<label class="parameter-box clearfix">
|
|
<div class="parameter-control">
|
|
<div class="custom-tumbler">
|
|
<input type="checkbox" name="<%- groupName + '.' + settingName %>" <%= disabled %> />
|
|
<!-- [if !IE |(gte IE 9)]> --><span> </span><!-- <![endif] -->
|
|
</div>
|
|
</div>
|
|
<div class="openstack-sub-title parameter-name"><%- $.t(ns + settingName + '.label', {defaultValue: setting.label}) %></div>
|
|
<div class="global-description description"><%- $.t(ns + settingName + '.description', {defaultValue: setting.description}) %></div>
|
|
</label>
|
|
</div>
|
|
<% } else if (setting.type == 'dropdown') { %>
|
|
<div class="parameter-box clearfix tablerow-wrapper setting-container">
|
|
<div class="openstack-sub-title parameter-name"><%- $.t(ns + settingName + '.label', {defaultValue: setting.label}) %></div>
|
|
<div class="parameter-control">
|
|
<select name="<%- groupName + '.' + settingName %>" <%= disabled %>>
|
|
<% _.each(setting.values, function(option) { %>
|
|
<option value="<%- option.data %>"><%- option.label %></option>
|
|
<% }) %>
|
|
</select>
|
|
</div>
|
|
<div class="parameter-description description">
|
|
<%- setting.description ? $.t(ns + settingName + '.description', {defaultValue: setting.description}) : '' %>
|
|
</div>
|
|
<div class="parameter-description validation-error"></div>
|
|
</div>
|
|
<% } else if (setting.type == 'radio') { %>
|
|
<div class="table-colspan setting-container">
|
|
<legend class="openstack-sub-title"><%- $.t(ns + settingName + '.label', {defaultValue: setting.label}) %></legend>
|
|
<% _.each(setting.values, function(option) { %>
|
|
<label class="parameter-box clearfix">
|
|
<div class="parameter-control">
|
|
<div class="custom-tumbler">
|
|
<input type="radio" name="<%- groupName + '.' + settingName %>" value="<%- option.data %>" <%= disabled %> />
|
|
<!-- [if !IE |(gte IE 9)]> --><span> </span><!-- <![endif] -->
|
|
</div>
|
|
</div>
|
|
<div class="parameter-name"><%- $.t(ns + settingName + '.values.' + option.data + '.label', {defaultValue: option.label}) %></div>
|
|
<div class="global-description description">
|
|
<%- $.t(ns + settingName + '.values.' + option.data + '.description', {defaultValue: option.description || ' '}) %>
|
|
</div>
|
|
</label>
|
|
<% }) %>
|
|
</div>
|
|
<% } else if (setting.type != 'hidden' && settingName != 'metadata') { %>
|
|
<div class="parameter-box clearfix tablerow-wrapper setting-container">
|
|
<div class="openstack-sub-title parameter-name"><%- $.t(ns + settingName + '.label', {defaultValue: setting.label}) %></div>
|
|
<div class="parameter-control">
|
|
<input type="<%= setting.type %>" name="<%- groupName + '.' + settingName %>" value="" <%= disabled %> />
|
|
</div>
|
|
<div class="parameter-description description">
|
|
<%- setting.description ? $.t(ns + settingName + '.description', {defaultValue: setting.description}) : '' %>
|
|
</div>
|
|
<div class="parameter-description validation-error"></div>
|
|
</div>
|
|
<% } %>
|
|
<% }) %>
|
|
</div>
|