diff --git a/interface/web/admin/form/users.tform.php b/interface/web/admin/form/users.tform.php index 1aab0a42985bb8b28932393366e4de14d67f8aa2..bc77087e2852c71d10f416e559b23291ab86b243 100644 --- a/interface/web/admin/form/users.tform.php +++ b/interface/web/admin/form/users.tform.php @@ -94,6 +94,11 @@ while ($file = @readdir($handle)) { } } +$otp_method_list = array( + 'none' => 'none', + 'email' => 'email', +); + //* Load themes $themes_list = array(); $handle = @opendir(ISPC_THEMES_PATH); @@ -254,6 +259,25 @@ $form['tabs']['users'] = array ( 'rows' => '', 'cols' => '' ), + 'otp_type' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'otp_auth_empty'), + 1 => array ( 'type' => 'REGEX', + 'regex' => '/^[a-z0-9\_]{0,64}$/', + 'errmsg'=> 'otp_auth_regex'), + ), + 'regex' => '', + 'errmsg' => '', + 'default' => '', + 'value' => $otp_method_list, + 'separator' => '', + 'width' => '30', + 'maxlength' => '255', + 'rows' => '', + 'cols' => '' + ), 'language' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', diff --git a/interface/web/admin/lib/lang/en_users.lng b/interface/web/admin/lib/lang/en_users.lng index 88fa9430d3837b06fff7ee78535e1cd227e3f44f..855146d171063b86d81b3b2835090e266d9f5a1a 100644 --- a/interface/web/admin/lib/lang/en_users.lng +++ b/interface/web/admin/lib/lang/en_users.lng @@ -38,4 +38,5 @@ $wb['startmodule_empty'] = 'Startmodule empty.'; $wb['startmodule_regex'] = 'Invalid chars in Startmodule.'; $wb['app_theme_empty'] = 'App theme empty.'; $wb['app_theme_regex'] = 'Invalid chars in App theme.'; +$wb['otp_auth_txt'] = '2-Factor Authentication'; ?> diff --git a/interface/web/admin/templates/users_user_edit.htm b/interface/web/admin/templates/users_user_edit.htm index 234f40f25ef0a11cac4d20389061ad388bd71efa..9451b4b1000b3d2072babc62c547c2fa3f78000a 100644 --- a/interface/web/admin/templates/users_user_edit.htm +++ b/interface/web/admin/templates/users_user_edit.htm @@ -28,6 +28,15 @@ <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> </div> </div> + <div class="form-group"> + <label for="2fa" class="col-sm-3 control-label">{tmpl_var name='otp_auth_txt'}</label> + <div class="col-sm-9"> + <select name="otp_type" id="otp_type" class="form-control"> + {tmpl_var name='otp_type'} + </select> + </div> + </div> + <div class="form-group"> <label class="col-sm-3 control-label">{tmpl_var name='modules_txt'}</label> <div class="col-sm-9">