mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #3668: Add no_empty option to select generator
This commit is contained in:
parent
d48cdf6376
commit
cdee2c8f3b
@ -8175,6 +8175,7 @@ function sg_rule_to_st(rule){
|
||||
@param opts.tooltip
|
||||
@param opts.options array of options for the select
|
||||
@param opts.custom boolean, provide a text input for a custom value (default: false)
|
||||
@param opts.no_empty_option do not provide an empty option
|
||||
@return {string}
|
||||
*/
|
||||
function generateValueSelect(opts){
|
||||
@ -8190,7 +8191,9 @@ function generateValueSelect(opts){
|
||||
str += '<div class="custom_select_div large-12 columns">'+
|
||||
'<select name="' + opts.id + '_select" class="custom_select">';
|
||||
|
||||
str += '<option id="" name="" value=""></option>';
|
||||
if (!opts.no_empty_option) {
|
||||
str += '<option id="" name="" value=""></option>';
|
||||
}
|
||||
|
||||
$.each(opts.options, function(index, option){
|
||||
str += '<option value="' + option + '">' + option + '</option>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user