| <?xml version="1.0" encoding="UTF-8" ?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| --> |
| <library> |
| |
| <class name="resetPassword" extends="labelExplorerBox" labelid="325" |
| docking="true" resizeable="false" closable="false" |
| width="360" x="350" height="160"> |
| |
| <handler name="onclose"> |
| if (this.childObj!=null) this.childObj.close(); |
| </handler> |
| |
| <handler name="oninit"> |
| var pressEnter = new LzDelegate(this, "sendValues"); |
| lz.Keys.callOnKeyCombo(pressEnter, ["enter"]); |
| this.getUserByHash.doCall(); |
| </handler> |
| |
| <netRemoteCallHib name="getUserByHash" funcname="userservice.getUserByHash" |
| remotecontext="$once{ canvas.thishib }" activeErrorHandler="true" > |
| <netparam><method name="getValue"> return canvas.sessionId;</method></netparam> |
| <netparam><method name="getValue"> return canvas.resetHash;</method></netparam> |
| <handler name="ondata" args="value"> |
| <![CDATA[ |
| //if ($debug) Debug.write("getUserByHash: ",value); |
| //The onResult-Handler will be called be the rtmpconnection |
| if (value<0) { |
| parent.close(); |
| } else { |
| parent.username.setAttribute('text',value.login); |
| lz.Focus.setFocus(parent.pass1,true); |
| } |
| ]]> |
| </handler> |
| </netRemoteCallHib> |
| |
| <method name="sendValues"> |
| <![CDATA[ |
| if (this.pass1.getText()!=this.pass1.getText()){ |
| new lz.rpcErrorDialog(canvas.main_content._content.inner,{errorid:-6}); |
| } else if (this.pass1.getText().length<4) { |
| new lz.rpcErrorDialog(canvas.main_content._content.inner,{errorid:-7}); |
| } else { |
| this.resetPassByHash.doCall(); |
| } |
| ]]> |
| </method> |
| |
| <netRemoteCallHib name="resetPassByHash" funcname="userservice.resetPassByHash" |
| remotecontext="$once{ canvas.thishib }" activeErrorHandler="true" |
| isCallBackHandler="true" > |
| <attribute name="tempValue" value="0" type="number" /> |
| <netparam><method name="getValue"> return canvas.sessionId;</method></netparam> |
| <netparam><method name="getValue"> return canvas.resetHash;</method></netparam> |
| <netparam><method name="getValue"> return parent.parent.pass1.getText();</method></netparam> |
| <handler name="ondata" args="value"> |
| //The onResult-Handler will be called be the rtmpconnection |
| //if ($debug) Debug.write(value); |
| this.tempValue = value; |
| </handler> |
| <handler name="sendCallBack"> |
| if (this.tempValue==-8) { |
| if ($debug) Debug.write("success"); |
| var authLogin = new lz.checkLoginData(canvas.main_content._content.inner); |
| authLogin.username.setAttribute('text',parent.username.getText()); |
| authLogin.userpass.setAttribute('text',parent.pass1.getText()); |
| parent.close(); |
| } |
| </handler> |
| </netRemoteCallHib> |
| |
| <labelText labelid="326" width="200" y="24" x="2"/> |
| <labelText name="username" y="24" x="140" width="170" /> |
| |
| <labelText labelid="328" width="200" y="54" x="2"/> |
| <customEdittext password="true" name="pass1" y="54" x="140" width="170" /> |
| |
| <labelText labelid="329" width="200" y="84" x="2"/> |
| <customEdittext password="true" name="pass2" y="84" x="140" width="170" /> |
| |
| <simpleLabelButton name="_btn" labelid="327" width="120" x="230" |
| y="$once{ parent.height-40 }" onclick="parent.sendValues()" /> |
| |
| </class> |
| |
| </library> |