Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix login form display in authfront.otp.
Browse files Browse the repository at this point in the history
  • Loading branch information
c12simple committed Mar 18, 2015
1 parent 5d93f1f commit 72b809f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/src/plugins/authfront.otp/class.OTP_LoginForm.js
Expand Up @@ -30,10 +30,9 @@ Class.create("OTP_LoginForm", {
if(!obj_loginform.down(("#add_otp_notion"))){
obj_loginform.insert({bottom:otpEnabled});
}

}
});
var enableModifyGUI = ajaxplorer.getPluginConfigs("authfront.otp")._object.MODIFY_LOGIN_SCREEN;
if(enableModifyGUI){
window.CASFORM = new OTP_LoginForm();
}
if(!enableModifyGUI){
window.OTPFORM = new OTP_LoginForm();
}
6 changes: 6 additions & 0 deletions core/src/plugins/authfront.otp/manifest.xml
Expand Up @@ -9,6 +9,7 @@
<client_settings>
<resources>
<i18n namespace="authfront.otp" path="plugins/authfront.otp/i18n"/>
<js className="OTP_LoginForm" file="plugins/authfront.otp/class.OTP_LoginForm.js" autoload="true"/>
</resources>
</client_settings>
<server_settings>
Expand All @@ -33,6 +34,11 @@
<script>
document.observe("ajaxplorer:afterApply-login", function(){
var f= modal.getForm();
var enableModifyGUI = ajaxplorer.getPluginConfigs("authfront.otp")._object.MODIFY_LOGIN_SCREEN;
if(!enableModifyGUI) return;
if(f.down('input[name="otp_code"]')){
return;
}
Expand Down

0 comments on commit 72b809f

Please sign in to comment.