<dl>
<dt><label for="loginPassword">{lang}wcf.acp.updateServer.loginPassword{/lang}</label></dt>
<dd>
- <input type="password" id="loginPassword" name="loginPassword" value="{$loginPassword}" class="medium" autocomplete="off">
+ <input type="password" id="loginPassword" name="loginPassword" value="{$loginPassword}" class="medium" autocomplete="off"{if $action != 'add' && $loginUsername} placeholder="{lang}wcf.acp.updateServer.loginPassword.noChange{/lang}"{/if}>
<small>{lang}wcf.acp.updateServer.loginPassword.description{/lang}</small>
</dd>
</dl>
public function save() {
AbstractForm::save();
- // save server
- $this->objectAction = new PackageUpdateServerAction([$this->packageUpdateServerID], 'update', ['data' => array_merge($this->additionalFields, [
+ $data = [
'serverURL' => $this->serverURL,
- 'loginUsername' => $this->loginUsername,
- 'loginPassword' => $this->loginPassword
- ])]);
+ ];
+ if ($this->loginUsername != $this->updateServer->loginUsername || $this->loginPassword) {
+ $data['loginUsername'] = $this->loginUsername;
+ $data['loginPassword'] = $this->loginPassword;
+ }
+
+ // save server
+ $this->objectAction = new PackageUpdateServerAction([$this->packageUpdateServerID], 'update', ['data' => array_merge($this->additionalFields, $data)]);
$this->objectAction->executeAction();
$this->saved();
if (empty($_POST)) {
$this->serverURL = $this->updateServer->serverURL;
$this->loginUsername = $this->updateServer->loginUsername;
- $this->loginPassword = $this->updateServer->loginPassword;
}
}
<item name="wcf.acp.updateServer.lastErrorMessage"><![CDATA[Beim letzten Verbindungsversuch trat folgender Fehler auf:]]></item>
<item name="wcf.acp.updateServer.loginPassword"><![CDATA[Kennwort]]></item>
<item name="wcf.acp.updateServer.loginPassword.description"><![CDATA[Kennwort für Authentifizierung (optional)]]></item>
+ <item name="wcf.acp.updateServer.loginPassword.noChange"><![CDATA[(keine Änderung)]]></item>
<item name="wcf.acp.updateServer.loginUsername"><![CDATA[Benutzername]]></item>
<item name="wcf.acp.updateServer.loginUsername.description"><![CDATA[Benutzernamen für Authentifizierung (optional)]]></item>
<item name="wcf.acp.updateServer.packages"><![CDATA[Pakete]]></item>
<item name="wcf.acp.updateServer.lastErrorMessage"><![CDATA[Errors occurred on last connection attempt:]]></item>
<item name="wcf.acp.updateServer.loginPassword"><![CDATA[Password]]></item>
<item name="wcf.acp.updateServer.loginPassword.description"><![CDATA[Enter your authentication password (optional).]]></item>
+ <item name="wcf.acp.updateServer.loginPassword.noChange"><![CDATA[(no change)]]></item>
<item name="wcf.acp.updateServer.loginUsername"><![CDATA[Username]]></item>
<item name="wcf.acp.updateServer.loginUsername.description"><![CDATA[Enter your authentication username (optional).]]></item>
<item name="wcf.acp.updateServer.packages"><![CDATA[Packages]]></item>