diff --git a/app/assets/javascripts/app/controllers/_ui_element/_application_ui_element.coffee b/app/assets/javascripts/app/controllers/_ui_element/_application_ui_element.coffee
index 3af11c406..cc272b47f 100644
--- a/app/assets/javascripts/app/controllers/_ui_element/_application_ui_element.coffee
+++ b/app/assets/javascripts/app/controllers/_ui_element/_application_ui_element.coffee
@@ -54,6 +54,7 @@ class App.UiElement.ApplicationUiElement
else
order = _.sortBy(
_.keys(selection), (item) ->
+ return '' if !selection[item] || !selection[item].toString
selection[item].toString().toLowerCase()
)
for key in order
@@ -218,10 +219,16 @@ class App.UiElement.ApplicationUiElement
value = valueOrigin
if value is null || value is undefined
value = ''
+ recordValue = record.value
+ if recordValue is null || recordValue is undefined
+ recordValue = ''
+ recordName = record.name
+ if recordName is null || recordName is undefined
+ recordName = ''
if typeof value is 'string' || typeof value is 'number' || typeof value is 'boolean'
- if record.value.toString() is value.toString() || record.name.toString() is value.toString()
+ if recordValue.toString() is value.toString() || recordName.toString() is value.toString()
return true
- else if ( value && record.value && _.include(value, record.value) ) || ( value && record.name && _.include(value, record.name) )
+ else if ( value && recordValue && _.include(value, recordValue) ) || ( value && recordName && _.include(value, recordName) )
return true
false
diff --git a/app/assets/javascripts/app/views/object_manager/attribute.jst.eco b/app/assets/javascripts/app/views/object_manager/attribute.jst.eco
index 0d8c8a92b..fccb4c6e8 100644
--- a/app/assets/javascripts/app/views/object_manager/attribute.jst.eco
+++ b/app/assets/javascripts/app/views/object_manager/attribute.jst.eco
@@ -1,5 +1,6 @@
-
+
<%- @T('Here you define which authorization has access to the attribute.') %>
+
diff --git a/app/assets/javascripts/app/views/object_manager/edit.jst.eco b/app/assets/javascripts/app/views/object_manager/edit.jst.eco
deleted file mode 100644
index c48e54894..000000000
--- a/app/assets/javascripts/app/views/object_manager/edit.jst.eco
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
input settings
-
textarea settings
-
date time settings
-
date settings
-
select settings
-
tree selection settings
-
checkbox settings
-
boolean settings
-
richtext settings
-
-
-
\ No newline at end of file
diff --git a/app/assets/javascripts/app/views/object_manager/screens.jst.eco b/app/assets/javascripts/app/views/object_manager/screens.jst.eco
index ebf8f3dbd..dc31fd3d6 100644
--- a/app/assets/javascripts/app/views/object_manager/screens.jst.eco
+++ b/app/assets/javascripts/app/views/object_manager/screens.jst.eco
@@ -2,7 +2,7 @@
- <%- @T('Role') %>
+ | <%- @T('Permissions') %>
| <%- @T('Screen') %>
| <%- @T('Options') %>
|
@@ -24,7 +24,6 @@
<% end %>
<% end %>
<% end %>
-
\ No newline at end of file
diff --git a/public/assets/tests/form.js b/public/assets/tests/form.js
index eabd55252..56b811c28 100644
--- a/public/assets/tests/form.js
+++ b/public/assets/tests/form.js
@@ -1265,3 +1265,36 @@ test("object manager form 3", function() {
deepEqual(params, test_params, 'form param check')
});
+
+test("form select with empty option list", function() {
+
+ $('#forms').append('
form select with empty option list
')
+ var el = $('#form14')
+ var defaults = {}
+ new App.ControllerForm({
+ el: el,
+ model: {
+ configure_attributes: [
+ { name: 'select1', display: 'Select1', tag: 'select', null: true, default: '', options: {}, relation: '', maxlength: 255 },
+ { name: 'select2', display: 'Select2', tag: 'select', null: true, default: '', options: {}, relation: '', maxlength: 255, nulloption: true },
+ { name: 'select3', display: 'Select3', tag: 'select', null: true, default: '', options: { undefined: 'A', null: 'B'} },
+ { name: 'select4', display: 'Select4', tag: 'select', null: true, default: '', options: { 'A': undefined, 'B': null} },
+ { name: 'select5', display: 'Select5', tag: 'select', null: true, default: 'A', options: { 'A': undefined, 'B': null} },
+ { name: 'select6', display: 'Select6', tag: 'select', null: true, default: undefined, options: { 'A': undefined, 'B': null} },
+ ],
+ },
+ params: defaults,
+ autofocus: true
+ });
+
+ params = App.ControllerForm.params(el)
+ test_params = {
+ select2: '',
+ select3: 'undefined',
+ select4: 'B',
+ select5: 'A',
+ select6: 'B',
+ }
+ deepEqual(params, test_params)
+
+});
diff --git a/script/build/test_db_config.sh b/script/build/test_db_config.sh
index c2f829151..c7ad6eb7c 100755
--- a/script/build/test_db_config.sh
+++ b/script/build/test_db_config.sh
@@ -53,22 +53,22 @@ if [ "$RDB" == 'postgresql' ]; then
echo " pool: 50" >> $DBFILE
echo " timeout: 5000" >> $DBFILE
echo " encoding: utf8" >> $DBFILE
- echo " username: root" >> $DBFILE
- echo " password: pass" >> $DBFILE
+ echo " username: gitlab-runner" >> $DBFILE
+ echo " password:" >> $DBFILE
echo "test:" >> $DBFILE
echo " adapter: postgresql" >> $DBFILE
echo " database: $DB_TEST" >> $DBFILE
echo " pool: 50" >> $DBFILE
echo " timeout: 5000" >> $DBFILE
echo " encoding: utf8" >> $DBFILE
- echo " username: root" >> $DBFILE
- echo " password: pass" >> $DBFILE
+ echo " username: gitlab-runner" >> $DBFILE
+ echo " password:" >> $DBFILE
echo "development:" >> $DBFILE
echo " adapter: postgresql" >> $DBFILE
echo " database: $DB_DEVELOPMENT" >> $DBFILE
echo " pool: 50" >> $DBFILE
echo " timeout: 5000" >> $DBFILE
echo " encoding: utf8" >> $DBFILE
- echo " username: root" >> $DBFILE
- echo " password: pass" >> $DBFILE
+ echo " username: gitlab-runner" >> $DBFILE
+ echo " password:" >> $DBFILE
fi
\ No newline at end of file