57 lines
2.1 KiB
PHTML
57 lines
2.1 KiB
PHTML
<script>
|
|
COMMID.changePassword = function() {
|
|
return {
|
|
save: function() {
|
|
YAHOO.util.Connect.setForm("changePasswordForm");
|
|
YAHOO.util.Connect.asyncRequest(
|
|
"POST",
|
|
"profilegeneral/savepassword?userid=<?= $this->targetUser->id ?>",
|
|
{
|
|
success: function (responseObj) {COMMID.utils.replaceContent(responseObj, "accountInfo")},
|
|
failure: COMMID.utils.asyncFailed
|
|
},
|
|
null
|
|
);
|
|
},
|
|
|
|
cancel: function() {
|
|
var transaction = YAHOO.util.Connect.asyncRequest(
|
|
'GET',
|
|
'profilegeneral/accountinfo?userid=' + <?= $this->targetUser->id ?>,
|
|
{
|
|
success: function (responseObj) {COMMID.utils.replaceContent(responseObj, "accountInfo")},
|
|
failure: COMMID.utils.asyncFailed
|
|
}
|
|
);
|
|
}
|
|
}
|
|
}();
|
|
</script>
|
|
<form name="changePasswordForm" class="formGrid" >
|
|
<?= $this->changePasswordForm->password1 ?>
|
|
<?= $this->changePasswordForm->password2 ?>
|
|
<div class="yui-gf">
|
|
<div class="yui-u first"> </div>
|
|
<div class="yui-u">
|
|
<input type="button" id="save" value="<?= $this->translate('Save') ?>" onclick="COMMID.changePassword.save()" />
|
|
<input type="button" id="cancel" value="<?= $this->translate('Cancel') ?>" onclick="COMMID.changePassword.cancel()" />
|
|
<script type="text/javascript">
|
|
var oButton = new YAHOO.widget.Button(
|
|
"save",
|
|
{
|
|
type : "push",
|
|
onclick : {fn: COMMID.changePassword.save}
|
|
}
|
|
);
|
|
var oButton = new YAHOO.widget.Button(
|
|
"cancel",
|
|
{
|
|
type : "push",
|
|
onclick : {fn: COMMID.changePassword.cancel}
|
|
}
|
|
);
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</form>
|