1 <?php // no direct access
2 defined('_JEXEC') or die('Restricted access'); ?>
3 <script language="javascript" type="text/javascript">
5 function submitbutton( pressbutton ) {
6 var form = document.userform;
7 var r = new RegExp("[<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i");
9 if (pressbutton == 'cancel') {
10 form.task.value = 'cancel';
15 // do field validation
16 if (form.name.value == "") {
17 alert( "<?php echo JText::_( 'Please enter your name.', true );?>" );
18 } else if (form.email.value == "") {
19 alert( "<?php echo JText::_( 'Please enter a valid e-mail address.', true );?>" );
20 } else if (((form.password.value != "") || (form.password2.value != "")) && (form.password.value != form.password2.value)){
21 alert( "<?php echo JText::_( 'REGWARN_VPASS2', true );?>" );
22 } else if (r.exec(form.password.value)) {
23 alert( "<?php printf( JText::_( 'VALID_AZ09', true ), JText::_( 'Password', true ), 4 );?>" );
30 <form action="index.php" method="post" name="userform">
32 <div class="Post-tl"></div>
33 <div class="Post-tr"><div></div></div>
34 <div class="Post-bl"><div></div></div>
35 <div class="Post-br"><div></div></div>
36 <div class="Post-tc"><div></div></div>
37 <div class="Post-bc"><div></div></div>
38 <div class="Post-cl"><div></div></div>
39 <div class="Post-cr"><div></div></div>
40 <div class="Post-cc"></div>
41 <div class="Post-body">
42 <div class="Post-inner">
44 <?php if ($this->params->def('show_page_title', 1)): ?>
45 <h2 class="PostHeaderIcon-wrapper"> <span class="PostHeader">
46 <span class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"><?php echo $this->escape($this->params->get('page_title')); ?></span>
51 <div class="PostContent">
53 <table cellpadding="5" cellspacing="0" border="0" width="100%">
56 <label for="username">
57 <?php echo JText::_( 'User Name' ); ?>:
61 <span id="username"><?php echo $this->user->get('username');?></span>
67 <?php echo JText::_( 'Your Name' ); ?>:
71 <input class="inputbox" type="text" id="name" name="name" value="<?php echo $this->user->get('name');?>" size="40" />
77 <?php echo JText::_( 'email' ); ?>:
81 <input class="inputbox" type="text" id="email" name="email" value="<?php echo $this->user->get('email');?>" size="40" />
84 <?php if($this->user->get('password')) : ?>
87 <label for="password">
88 <?php echo JText::_( 'Password' ); ?>:
92 <input class="inputbox" type="password" id="password" name="password" value="" size="40" />
97 <label for="password2">
98 <?php echo JText::_( 'Verify Password' ); ?>:
102 <input class="inputbox" type="password" id="password2" name="password2" size="40" />
107 <?php if(isset($this->params)) : echo $this->params->render( 'params' ); endif; ?>
108 <button class="button" type="submit" onclick="submitbutton( this.form );return false;"><?php echo JText::_('Save'); ?></button>
110 <input type="hidden" name="username" value="<?php echo $this->user->get('username');?>" />
111 <input type="hidden" name="id" value="<?php echo $this->user->get('id');?>" />
112 <input type="hidden" name="gid" value="<?php echo $this->user->get('gid');?>" />
113 <input type="hidden" name="option" value="com_user" />
114 <input type="hidden" name="task" value="save" />
115 <?php echo JHTML::_( 'form.token' ); ?>
118 <div class="cleared"></div>