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) {
|
||||
e.preventDefault();
|
||||
var rows = $("#table_profiles tr").length;
|
||||
if (rows <= 2) {
|
||||
alert('<?php echo __('please add a profile'); ?>');
|
||||
if ($('input[name="is_admin"]:checked').val() == 1) {
|
||||
// Admin does not require profiles.
|
||||
$('#user_profile_form').submit();
|
||||
} 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