posix checked check box for posix groups selected by default

This commit is contained in:
Adam Young 2010-12-23 14:26:12 -05:00
parent 0fc1d260c0
commit 553e08afa6
2 changed files with 9 additions and 4 deletions

View File

@ -83,7 +83,11 @@ function ipa_group_add_dialog(spec) {
that.add_field(ipa_text_widget({name:'cn', undo: false}));
that.add_field(ipa_text_widget({name:'description', undo: false}));
// TODO: Replace with i18n label
that.add_field(ipa_checkbox_widget({name:'posix', label:'Is this a POSIX group?', undo: false}));
that.add_field(ipa_checkbox_widget({
name:'posix',
label:'Is this a POSIX group?',
undo: false,
checked:'checked'}));
that.add_field(ipa_text_widget({name:'gidnumber', undo: false}));
that.add_dialog_init();

View File

@ -205,14 +205,15 @@ function ipa_text_widget(spec) {
function ipa_checkbox_widget(spec) {
spec = spec || {};
var is_checked = spec.checked || '';
var that = ipa_widget(spec);
that.create = function(container) {
$('<input/>', {
'type': 'checkbox',
'name': that.name
type: 'checkbox',
name: that.name,
checked : is_checked
}).appendTo(container);
if (that.undo) {