\
\
@@ -105,6 +106,21 @@ var create_group_tmpl =
user_creation_div + // from users-tab.js
'\
\
+
\
+
\
+
\
+
'
+ +tr("Allow users in this group to use the following views")+
+ ' '+tr("This will add to the group template the selected views so users beloing to the group are able to use them")+'\
+
\
+
\
+
\
+
\
+
'+
+ insert_views()
+ +'
\
+
\
+
\
\
\
\
@@ -427,6 +443,17 @@ Sunstone.addActions(group_actions);
Sunstone.addMainTab('groups-tab',groups_tab);
Sunstone.addInfoPanel("group_info_panel",group_info_panel);
+function insert_views(){
+ views_checks_str = ""
+ var views_array = config['available_views'];
+ for (var i = 0; i < views_array.length; i++)
+ {
+ views_checks_str = views_checks_str +
+ ' '+views_array[i]+' '
+ }
+ return views_checks_str;
+}
+
function groupElements(){
return getSelectedNodes(dataTable_groups);
}
@@ -1154,7 +1181,7 @@ function setupCreateGroupDialog(){
var name = $('#name',this).val();
var admin_group_name = null;
- var user_json = null;
+ var user_json = null;
if ( $('#admin_group', this).prop('checked') ){
admin_group_name = $('#admin_group_name', this).val();
@@ -1238,6 +1265,12 @@ function setupCreateGroupDialog(){
}
}
+ group_json['group']['views'] = [];
+
+ $.each($('[id^="group_view"]:checked', dialog), function(){
+ group_json['group']['views'].push($(this).val());
+ });
+
Sunstone.runAction("Group.create",group_json);
$create_group_dialog.foundation('reveal', 'close');