Changeset 25089 for extensions/Password_Policy/admin
- Timestamp:
- Oct 23, 2013, 5:24:35 PM (11 years ago)
- Location:
- extensions/Password_Policy/admin
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Password_Policy/admin/PP_admin.php
r25050 r25089 34 34 35 35 36 if (isset($_POST['submit']) and isset($_POST['PP_Password_Enforced']) and isset($_POST['PP_AdminPassword_Enforced']) and isset($_POST['PP_PwdReset'])) 36 // +----------------------------------------------------------+ 37 // | FCK Editor for email text fields | 38 // +----------------------------------------------------------+ 39 $toolbar = 'Basic'; 40 $width = '750px'; 41 $height = '300px'; 42 $areas = array(); 43 array_push($areas,'PP_CustomLockMsg'); 44 45 if (function_exists('set_fckeditor_instance')) 46 { 47 $fcke_config = unserialize($conf['FCKEditor']); 48 foreach($areas as $area) 37 49 { 50 if (!isset($fcke_config[$area])) 51 { 52 $fcke_config[$area] = false; 53 } 54 } 55 $conf['FCKEditor'] = serialize($fcke_config); 56 57 set_fckeditor_instance($areas, $toolbar, $width, $height); 58 } 59 60 61 if (isset($_POST['submit']) and isset($_POST['PP_Password_Enforced']) and isset($_POST['PP_AdminPassword_Enforced']) and isset($_POST['PP_PwdReset']) and isset($_POST['PP_LogFailedPassw'])) 62 { 63 $_POST['PP_CustomLockMsg'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['PP_CustomLockMsg']))); 38 64 // Save global PP configuration 39 65 // ----------------------------- … … 43 69 $newconf_PP['ADMINPASSWENF'] = (isset($_POST['PP_AdminPassword_Enforced']) ? $_POST['PP_AdminPassword_Enforced'] : 'false'); 44 70 $newconf_PP['PWDRESET'] = (isset($_POST['PP_PwdReset']) ? $_POST['PP_PwdReset'] : 'false'); 71 $newconf_PP['LOGFAILBLOCK'] = (isset($_POST['PP_LogFailedPassw']) ? $_POST['PP_LogFailedPassw'] : 'false'); 72 $newconf_PP['NBLOGFAIL'] = (isset($_POST['PP_NbFailedPassw']) ? $_POST['PP_NbFailedPassw'] : '0'); 73 $newconf_PP['USRLOCKEDTXT'] = (isset($_POST['PP_CustomLockMsg']) ? $_POST['PP_CustomLockMsg'] : l10n('PP_User_Account_Locked_Txt')); 45 74 46 75 $conf['PasswordPolicy'] = serialize($newconf_PP); … … 82 111 'PP_PWDRESET_FALSE' => $conf_PP['PWDRESET']=='false' ? 'checked="checked"' : '' , 83 112 'PP_PASSWORD_TEST_SCORE' => $PP_Password_Test_Score, 113 'PP_LOGFAILEDPASSW_TRUE' => $conf_PP['LOGFAILBLOCK']=='true' ? 'checked="checked"' : '' , 114 'PP_LOGFAILEDPASSW_FALSE' => $conf_PP['LOGFAILBLOCK']=='false' ? 'checked="checked"' : '' , 115 'PP_NBLOGFAIL' => $conf_PP['NBLOGFAIL'], 116 'PP_USRLOCKEDTXT' => $conf_PP['USRLOCKEDTXT'] 84 117 ) 85 118 ); -
extensions/Password_Policy/admin/template/PP_admin.tpl
r25050 r25089 4 4 {combine_css path= $PP_PATH|@cat:'admin/template/pp.css'} 5 5 6 <script type="text/javascript"> 6 {footer_script}{literal} 7 7 jQuery().ready(function() 8 {ldelim} 8 { 9 jQuery("#PP_LoginAttempts_true").click(function() { 10 jQuery("#PP_USRLOCKEDTXT").show("slow"); 11 }); 12 jQuery("#PP_LoginAttempts_false").click(function() { 13 jQuery("#PP_USRLOCKEDTXT").hide("slow"); 14 }); 15 16 9 17 jQuery('.cluetip').cluetip( 10 { ldelim}11 width: 5 00,18 { 19 width: 550, 12 20 splitTitle: '|' 13 {rdelim}); 14 {rdelim}); 15 </script> 21 }); 22 }); 23 {/literal}{/footer_script} 24 16 25 17 26 <div class="titrePage"> … … 69 78 </label> 70 79 </li> 80 81 <li> 82 <label class="cluetip" title="{'PP_LoginAttempts'|translate}|{'PP_LoginAttempts_d'|translate}"> 83 {'PP_LoginAttempts'|@translate} 84 </label> 85 86 <label for="PP_LoginAttempts_false"><input id="PP_LoginAttempts_false" value="false" {$PP_LOGFAILEDPASSW_FALSE} name="PP_LogFailedPassw" type="radio"/> 87 {'PP_Disable'|@translate} 88 </label> 89 <label for="PP_LoginAttempts_true"><input id="PP_LoginAttempts_true" value="true" {$PP_LOGFAILEDPASSW_TRUE} name="PP_LogFailedPassw" type="radio"/> 90 {'PP_Enable'|@translate} 91 </label> 92 </li> 93 94 <ul> 95 <li id="PP_USRLOCKEDTXT" {if $PP_LOGFAILEDPASSW_FALSE} style="display: none"{/if}> 96 <label class="cluetip" title="{'PP_Max number of failed attempts'|translate}|{'PP_Max number of failed attempts_d'|translate}"> 97 {'PP_Max number of failed attempts'|@translate} <input type="text" name="PP_NbFailedPassw" value="{$PP_NBLOGFAIL}" size="5" style="text-align: center;"/> 98 </label> 99 <br /> 100 <label class="cluetip" title="{'PP_UserLocked_Custom_Txt'|translate}|{'PP_UserLocked_Custom_Txt_d'|translate}"> 101 {'PP_UserLocked_Custom_Txt'|@translate} 102 </label> 103 <textarea class="pp_textfields" name="PP_CustomLockMsg" id="PP_CustomLockMsg" rows="10" {$TAG_INPUT_ENABLED}>{$PP_USRLOCKEDTXT}</textarea> 104 {if 'FCK_PATH'|@defined} 105 <div style="text-align:right;"> 106 <a href="#" onClick="toogleEditor('PP_CustomLockMsg'); return false;">FCK Editor On/Off</a> 107 </div> 108 {/if} 109 </li> 110 </ul> 71 111 </ul> 72 112 -
extensions/Password_Policy/admin/template/pp.css
r25028 r25089 17 17 margin-bottom: 5px; 18 18 } 19 20 textarea.pp_textfields 21 { 22 width: 70%; 23 }
Note: See TracChangeset
for help on using the changeset viewer.