rbrindley: branch 2.0 r4921 - /branches/2.0/config/password.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Tue Jun 23 12:42:44 CDT 2009
Author: rbrindley
Date: Tue Jun 23 12:42:41 2009
New Revision: 4921
URL: http://svn.asterisk.org/svn-view/asterisk-gui?view=rev&rev=4921
Log:
- Added the following to the Password page
- <html>, <head>, <title>, and "Content-Type" <meta>
- moved js to the bottom
Modified:
branches/2.0/config/password.html
Modified: branches/2.0/config/password.html
URL: http://svn.asterisk.org/svn-view/asterisk-gui/branches/2.0/config/password.html?view=diff&rev=4921&r1=4920&r2=4921
==============================================================================
--- branches/2.0/config/password.html (original)
+++ branches/2.0/config/password.html Tue Jun 23 12:42:41 2009
@@ -18,101 +18,107 @@
* at the top of the source tree.
*
-->
-<script src="js/jquery.js"></script>
-<script src="js/astman.js"></script>
-<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
-<style type="text/css">
+<html>
+<head>
+ <title>Change Password</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
-</style>
-<script>
+ <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
+ <style type="text/css"></style>
+</head>
+<body bgcolor="EFEFEF">
+ <div class="iframeTitleBar">
+ Change Password
+ <span style="cursor: pointer; cursor: hand;" onclick="window.location.reload();" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
+ </div>
-var DOM_newpass ;
-var DOM_newpass_rep ;
-var CURRENT_Username = top.cookies.get('username');
+ <center><div id="tabbedMenu"></div></center>
+ <div class='lite_Heading'> Change Password </div>
-var compare_passwords = function(event){
- if(event.keyCode == 13){
- UpdatePassword();
- return false;
+ <table cellpadding=2 cellspacing=2 border=0 align=center>
+ <tr> <td colspan=2 height=5></td> </tr>
+ <tr> <td align=right>Enter New Password:</td>
+ <td> <input type="password" id="newpass" size=16 onkeyup="compare_passwords(event)" field_name='Password' validation='alphanumeric'> </td>
+ </tr>
+ <tr> <td align=right>Retype New Password:</td>
+ <td> <input type="password" id="newpass_rep" size=16 onkeyup="compare_passwords(event)" field_name='Password' validation='alphanumeric'> </td>
+ </tr>
+ <tr> <td align=center colspan=2 height=50 valign=middle>
+ <span class='guiButtonEdit' onclick='UpdatePassword();'>Update</span>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+
+ <script src="js/jquery.js"></script>
+ <script src="js/astman.js"></script>
+ <script>
+
+ var DOM_newpass ;
+ var DOM_newpass_rep ;
+ var CURRENT_Username = top.cookies.get('username');
+
+ var compare_passwords = function(event){
+ if(event.keyCode == 13){
+ UpdatePassword();
+ return false;
+ }
+
+ if( DOM_newpass.value.length < 4 ){
+ ASTGUI.feedback( { msg:'Password should be at least 4 characters !', showfor:2 });
+ }else if ( DOM_newpass.value == DOM_newpass_rep.value){
+ ASTGUI.feedback({ msg:'Passwords Match !', showfor:2 });
+ }else{
+ ASTGUI.feedback({msg:'Passwords do not match !', showfor:2 });
+ }
+ };
+
+ var UpdatePassword = function(){
+ if ( !ASTGUI.validateFields( [ DOM_newpass] ) ){
+ return ;
+ }
+ if( DOM_newpass.value != DOM_newpass_rep.value ){
+ ASTGUI.feedback({ msg:'Passwords do not match !', showfor:2 });
+ DOM_newpass.focus(); return true;
+ };
+ if( DOM_newpass.value.length < 4 ){
+ ASTGUI.feedback({ msg:'Password should be at least 4 characters !', showfor:2 });
+ DOM_newpass.focus(); return true;
+ };
+
+ var u = new listOfSynActions('manager.conf') ;
+ u.new_action('update', CURRENT_Username, 'secret', DOM_newpass.value);
+ u.callActions();
+
+ ASTGUI.feedback( { msg:"Password Updated Successfully", showfor:3 });
+ alert("Password Updated Successfully!! \n\n You will now be redirected to the login page \n You must relogin using your new password") ;
+ var f = makeSyncRequest({ action :'logoff'});
+
+ parent.window.location.reload();
+ };
+
+
+ var localajaxinit = function(){
+ top.document.title = "Change Password" ;
+
+ var t = [
+ {url:'preferences.html', desc:'General Preferences' } ,
+ {url:'language.html', desc:'Language' } ,
+ {url:'#', desc:'Change Password', selected:true }
+ ];
+
+ if(parent.sessionData.PLATFORM.isAA50 ) {
+ t.push({url:'reset_defaults.html', desc: 'Factory Reset' });
+ }
+ t.push( {url:'reboot.html', desc:'Reboot' } );
+ t.push( {url:'flipadvanced.html', desc:'Advanced Options' } );
+ ASTGUI.tabbedOptions( _$('tabbedMenu'), t );
+ DOM_newpass = _$('newpass');
+ DOM_newpass_rep = _$('newpass_rep');
+ DOM_newpass.focus();
}
- if( DOM_newpass.value.length < 4 ){
- ASTGUI.feedback( { msg:'Password should be at least 4 characters !', showfor:2 });
- }else if ( DOM_newpass.value == DOM_newpass_rep.value){
- ASTGUI.feedback({ msg:'Passwords Match !', showfor:2 });
- }else{
- ASTGUI.feedback({msg:'Passwords do not match !', showfor:2 });
- }
-};
-
-var UpdatePassword = function(){
- if ( !ASTGUI.validateFields( [ DOM_newpass] ) ){
- return ;
- }
- if( DOM_newpass.value != DOM_newpass_rep.value ){
- ASTGUI.feedback({ msg:'Passwords do not match !', showfor:2 });
- DOM_newpass.focus(); return true;
- };
- if( DOM_newpass.value.length < 4 ){
- ASTGUI.feedback({ msg:'Password should be at least 4 characters !', showfor:2 });
- DOM_newpass.focus(); return true;
- };
-
- var u = new listOfSynActions('manager.conf') ;
- u.new_action('update', CURRENT_Username, 'secret', DOM_newpass.value);
- u.callActions();
-
- ASTGUI.feedback( { msg:"Password Updated Successfully", showfor:3 });
- alert("Password Updated Successfully!! \n\n You will now be redirected to the login page \n You must relogin using your new password") ;
- var f = makeSyncRequest({ action :'logoff'});
-
- parent.window.location.reload();
-};
-
-
-var localajaxinit = function(){
- top.document.title = "Change Password" ;
-
- var t = [
- {url:'preferences.html', desc:'General Preferences' } ,
- {url:'language.html', desc:'Language' } ,
- {url:'#', desc:'Change Password', selected:true }
- ];
-
- if(parent.sessionData.PLATFORM.isAA50 ) {
- t.push({url:'reset_defaults.html', desc: 'Factory Reset' });
- }
- t.push( {url:'reboot.html', desc:'Reboot' } );
- t.push( {url:'flipadvanced.html', desc:'Advanced Options' } );
- ASTGUI.tabbedOptions( _$('tabbedMenu'), t );
- DOM_newpass = _$('newpass');
- DOM_newpass_rep = _$('newpass_rep');
- DOM_newpass.focus();
-}
-
-</script>
-<body bgcolor="EFEFEF">
-<div class="iframeTitleBar">
- Change Password
- <span style="cursor: pointer; cursor: hand;" onclick="window.location.reload();" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
-</div>
-
-<center><div id="tabbedMenu"></div></center>
-<div class='lite_Heading'> Change Password </div>
-
-<table cellpadding=2 cellspacing=2 border=0 align=center>
- <tr> <td colspan=2 height=5></td> </tr>
- <tr> <td align=right>Enter New Password:</td>
- <td> <input type="password" id="newpass" size=16 onkeyup="compare_passwords(event)" field_name='Password' validation='alphanumeric'> </td>
- </tr>
- <tr> <td align=right>Retype New Password:</td>
- <td> <input type="password" id="newpass_rep" size=16 onkeyup="compare_passwords(event)" field_name='Password' validation='alphanumeric'> </td>
- </tr>
- <tr> <td align=center colspan=2 height=50 valign=middle>
- <span class='guiButtonEdit' onclick='UpdatePassword();'>Update</span>
- </td>
- </tr>
-</table>
-
-</div>
+ </script>
</body>
+</html>
More information about the asterisk-gui-commits
mailing list