Able to create users without profile assignment
This commit is contained in:
parent
7bd7d190c5
commit
f2143545b3
|
@ -1388,11 +1388,16 @@ $(document).ready (function () {
|
||||||
|
|
||||||
$('#submit-crtbutton').click(function (e) {
|
$('#submit-crtbutton').click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var rows = $("#table_profiles tr").length;
|
if ($('input[name="is_admin"]:checked').val() == 1) {
|
||||||
if (rows <= 2) {
|
// Admin does not require profiles.
|
||||||
alert('<?php echo __('please add a profile'); ?>');
|
$('#user_profile_form').submit();
|
||||||
} else {
|
} else {
|
||||||
this.form.submit();
|
confirmDialog({
|
||||||
|
message: "<?php echo __('User will be created without profiles assigned and won\'t be able to log in, are you sure?'); ?>",
|
||||||
|
onAccept: function() {
|
||||||
|
$('#user_profile_form').submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue