<fieldset>
<legend>{lang}wcf.acp.updateServer.data{/lang}</legend>
- <div id="serverDiv" class="formElement{if $errorField == 'server'} formError{/if}">
+ <div id="serverDiv" class="formElement{if $errorField == 'serverURL'} formError{/if}">
<div class="formFieldLabel">
- <label for="server">{lang}wcf.acp.updateServer.server{/lang}</label>
+ <label for="serverURL">{lang}wcf.acp.updateServer.serverURL{/lang}</label>
</div>
<div class="formField">
- <input type="text" id="server" name="server" value="{$server}" class="inputText" />
- {if $errorField == 'server'}
+ <input type="text" id="serverURL" name="serverURL" value="{$serverURL}" class="inputText" />
+ {if $errorField == 'serverURL'}
<p class="innerError">
{if $errorType == 'empty'}{lang}wcf.global.error.empty{/lang}{/if}
- {if $errorType == 'notValid'}{lang}wcf.acp.updateServer.server.error.notValid{/lang}{/if}
+ {if $errorType == 'notValid'}{lang}wcf.acp.updateServer.serverURL.error.notValid{/lang}{/if}
</p>
{/if}
</div>
- <div id="serverHelpMessage" class="formFieldDesc hidden">
- <p>{lang}wcf.acp.updateServer.server.description{/lang}</p>
+ <div id="serverURLHelpMessage" class="formFieldDesc hidden">
+ <p>{lang}wcf.acp.updateServer.serverURL.description{/lang}</p>
</div>
</div>
<script type="text/javascript">//<![CDATA[
- inlineHelp.register('server');
+ inlineHelp.register('serverURL');
//]]></script>
<div id="loginUsernameDiv" class="formElement">
<table class="tableList">
<thead>
<tr class="tableHead">
- <th class="columnPackageUpdateServerID{if $sortField == 'packageUpdateServerID'} active{/if}" colspan="2"><p><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=packageUpdateServerID&sortOrder={if $sortField == 'packageUpdateServerID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.packageUpdateServerID{/lang}{if $sortField == 'packageUpdateServerID'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></p></th>
- <th class="columnServer{if $sortField == 'server'} active{/if}"><p><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=server&sortOrder={if $sortField == 'server' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.server{/lang}{if $sortField == 'server'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></p></th>
- <th class="columnPackages{if $sortField == 'packages'} active{/if}"><p><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=packages&sortOrder={if $sortField == 'packages' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.packages{/lang}{if $sortField == 'packages'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></p></th>
- <th class="columnStatus{if $sortField == 'status'} active{/if}"><p><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=status&sortOrder={if $sortField == 'status' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.status{/lang}{if $sortField == 'status'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></p></th>
- <th class="columnErrorText{if $sortField == 'errorMessage'} active{/if}"><p><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=errorMessage&sortOrder={if $sortField == 'errorMessage' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.errorMessage{/lang}{if $sortField == 'errorMessage'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></p></th>
- <th class="columnTimestamp{if $sortField == 'lastUpdateTime'} active{/if}"><p><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=lastUpdateTime&sortOrder={if $sortField == 'lastUpdateTime' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.lastUpdateTime{/lang}{if $sortField == 'lastUpdateTime'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></p></th>
+ <th class="columnPackageUpdateServerID{if $sortField == 'packageUpdateServerID'} active{/if}" colspan="2"><div><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=packageUpdateServerID&sortOrder={if $sortField == 'packageUpdateServerID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.packageUpdateServerID{/lang}{if $sortField == 'packageUpdateServerID'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></div></th>
+ <th class="columnServer{if $sortField == 'serverURL'} active{/if}"><div><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=serverURL&sortOrder={if $sortField == 'serverURL' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.serverURL{/lang}{if $sortField == 'serverURL'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></div></th>
+ <th class="columnPackages{if $sortField == 'packages'} active{/if}"><div><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=packages&sortOrder={if $sortField == 'packages' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.packages{/lang}{if $sortField == 'packages'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></div></th>
+ <th class="columnStatus{if $sortField == 'status'} active{/if}"><div><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=status&sortOrder={if $sortField == 'status' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.status{/lang}{if $sortField == 'status'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></div></th>
+ <th class="columnErrorText{if $sortField == 'errorMessage'} active{/if}"><div><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=errorMessage&sortOrder={if $sortField == 'errorMessage' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.errorMessage{/lang}{if $sortField == 'errorMessage'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></div></th>
+ <th class="columnTimestamp{if $sortField == 'lastUpdateTime'} active{/if}"><div><a href="index.php?page=UpdateServerList&pageNo={@$pageNo}&sortField=lastUpdateTime&sortOrder={if $sortField == 'lastUpdateTime' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.updateServer.lastUpdateTime{/lang}{if $sortField == 'lastUpdateTime'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}S.png" alt="" />{/if}</a></div></th>
{if $additionalHeadColumns|isset}{@$additionalHeadColumns}{/if}
</tr>
</thead>
<tbody>
{foreach from=$updateServers item=updateServer}
- <tr class="updateServerRow">
+ <tr class="updateServerRow {cycle values="container-1,container-2"}">
<td class="columnIcon">
- <img src="{@RELATIVE_WCF_DIR}icon/{if !$updateServer->disabled}enabled{else}disabled{/if}S.png" alt="" title="{lang}wcf.acp.updateServer.{if !$updateServer->disabled}disable{else}enable{/if}{/lang}" data-objectID="{@$updateServer->packageUpdateServerID}" data-disableMessage="{lang}wcf.acp.updateServer.disable{/lang}" data-enableMessage="{lang}wcf.acp.updateServer.enable{/lang}" class="toggleButton" />
+ <img src="{@RELATIVE_WCF_DIR}icon/{if !$updateServer->disabled}enabled{else}disabled{/if}S.png" alt="" class="toggleButton" title="{lang}wcf.acp.updateServer.{if !$updateServer->disabled}disable{else}enable{/if}{/lang}" data-objectID="{@$updateServer->packageUpdateServerID}" data-disableMessage="{lang}wcf.acp.updateServer.disable{/lang}" data-enableMessage="{lang}wcf.acp.updateServer.enable{/lang}" />
<a href="index.php?form=UpdateServerEdit&packageUpdateServerID={@$updateServer->packageUpdateServerID}{@SID_ARG_2ND}"><img src="{@RELATIVE_WCF_DIR}icon/editS.png" alt="" title="{lang}wcf.acp.updateServer.edit{/lang}" /></a>
- <img src="{@RELATIVE_WCF_DIR}icon/deleteS.png" alt="" title="{lang}wcf.acp.updateServer.delete{/lang}" data-objectID="{@$updateServer->packageUpdateServerID}" data-confirmMessage="{lang}wcf.acp.updateServer.delete.sure{/lang}" class="deleteButton" />
+ <img src="{@RELATIVE_WCF_DIR}icon/deleteS.png" alt="" title="{lang}wcf.acp.updateServer.delete{/lang}" class="deleteButton" data-objectID="{@$updateServer->packageUpdateServerID}" data-confirmMessage="{lang}wcf.acp.updateServer.delete.sure{/lang}" />
{if $additionalButtons[$updateServer->packageUpdateServerID]|isset}{@$additionalButtons[$updateServer->packageUpdateServerID]}{/if}
</td>
- <td class="columnID"><p>{@$updateServer->packageUpdateServerID}</p></td>
- <td class="columnText"><p><a href="index.php?form=UpdateServerEdit&packageUpdateServerID={@$updateServer->packageUpdateServerID}{@SID_ARG_2ND}">{@$updateServer->serverURL}</a></p></td>
- <td class="columnText smallFont"><p>{#$updateServer->packages}</p></td>
- <td class="columnText smallFont" style="color: {if $updateServer->status == 'online'}green{else}red{/if}"><p>{@$updateServer->status}</p></td>
- <td class="columnText smallFont"><p title="{@$updateServer->errorMessage}">{@$updateServer->errorMessage|truncate:"30"}</p></td>
- <td class="columnDate smallFont"><p>{if $updateServer->lastUpdateTime}{@$updateServer->lastUpdateTime|time}{/if}</p></td>
+ <td class="columnID">{@$updateServer->packageUpdateServerID}</td>
+ <td class="columnText">
+ <a href="index.php?form=UpdateServerEdit&packageUpdateServerID={@$updateServer->packageUpdateServerID}{@SID_ARG_2ND}">
+ {@$updateServer->serverURL}
+ </a>
+ </td>
+ <td class="columnText smallFont">
+ {#$updateServer->packages}
+ </td>
+ <td class="columnText smallFont" style="color: {if $updateServer->status == 'online'}green{else}red{/if}">
+ {@$updateServer->status}
+ </td>
+ <td class="columnText smallFont">
+ <div title="{@$updateServer->errorMessage}">
+ {@$updateServer->errorMessage|truncate:"30"}
+ </div>
+ </td>
+ <td class="columnDate smallFont">
+ {if $updateServer->lastUpdateTime}{@$updateServer->lastUpdateTime|time}{/if}
+ </td>
{if $additionalColumns[$updateServer->packageUpdateServerID]|isset}{@$additionalColumns[$updateServer->packageUpdateServerID]}{/if}
</tr>
* server url
* @var string
*/
- public $server = '';
+ public $serverURL = '';
/**
* server login username
public function readFormParameters() {
parent::readFormParameters();
- if (isset($_POST['server'])) $this->server = StringUtil::trim($_POST['server']);
+ if (isset($_POST['serverURL'])) $this->serverURL = StringUtil::trim($_POST['serverURL']);
if (isset($_POST['loginUsername'])) $this->loginUsername = $_POST['loginUsername'];
if (isset($_POST['loginPassword'])) $this->loginPassword = $_POST['loginPassword'];
}
public function validate() {
parent::validate();
- if (empty($this->server)) {
- throw new UserInputException('server');
+ if (empty($this->serverURL)) {
+ throw new UserInputException('serverURL');
}
- if (!PackageUpdateServer::isValidServerURL($this->server)) {
- throw new UserInputException('server', 'notValid');
+ if (!PackageUpdateServer::isValidServerURL($this->serverURL)) {
+ throw new UserInputException('serverURL', 'notValid');
}
}
// save server
$updateServerAction = new PackageUpdateServerAction(array(), 'create', array('data' => array(
- 'server' => $this->server,
+ 'serverURL' => $this->serverURL,
'loginUsername' => $this->loginUsername,
'loginPassword' => $this->loginPassword
)));
$this->saved();
// reset values
- $this->server = $this->loginUsername = $this->loginPassword = '';
+ $this->serverURL = $this->loginUsername = $this->loginPassword = '';
// show success message
WCF::getTPL()->assign('success', true);
parent::assignVariables();
WCF::getTPL()->assign(array(
- 'server' => $this->server,
+ 'serverURL' => $this->serverURL,
'loginUsername' => $this->loginUsername,
'loginPassword' => $this->loginPassword,
'action' => 'add'
<item name="wcf.acp.updateServer.list.available"><![CDATA[Insgesamt {#$items} Server eingetragen]]></item>
<item name="wcf.acp.updateServer.packageUpdateServerID"><![CDATA[Server-ID]]></item>
<item name="wcf.acp.updateServer.packages"><![CDATA[Pakete]]></item>
- <item name="wcf.acp.updateServer.server"><![CDATA[Adresse]]></item>
- <item name="wcf.acp.updateServer.server.description"><![CDATA[Gib die Adresse (URL) zu einem Paketserver an.]]></item>
- <item name="wcf.acp.updateServer.server.error.notValid"><![CDATA[Die eingetragene Adresse ist ungültig.]]></item>
+ <item name="wcf.acp.updateServer.serverURL"><![CDATA[Adresse]]></item>
+ <item name="wcf.acp.updateServer.serverURL.description"><![CDATA[Gib die Adresse (URL) zu einem Paketserver an.]]></item>
+ <item name="wcf.acp.updateServer.serverURL.error.notValid"><![CDATA[Die eingetragene Adresse ist ungültig.]]></item>
<item name="wcf.acp.updateServer.status"><![CDATA[Status]]></item>
<item name="wcf.acp.updateServer.timestamp"><![CDATA[Letzter Zugriff]]></item>
<item name="wcf.acp.updateServer.view"><![CDATA[Verfügbare Update-Server]]></item>
<item name="wcf.acp.updateServer.list.available"><![CDATA[Insgesamt {#$items} Server eingetragen]]></item>
<item name="wcf.acp.updateServer.packageUpdateServerID"><![CDATA[Server-ID]]></item>
<item name="wcf.acp.updateServer.packages"><![CDATA[Pakete]]></item>
- <item name="wcf.acp.updateServer.server"><![CDATA[Adresse]]></item>
- <item name="wcf.acp.updateServer.server.description"><![CDATA[Geben Sie die Adresse (URL) zu einem Paketserver an.]]></item>
- <item name="wcf.acp.updateServer.server.error.notValid"><![CDATA[Die eingetragene Adresse ist ungültig.]]></item>
+ <item name="wcf.acp.updateServer.serverURL"><![CDATA[Adresse]]></item>
+ <item name="wcf.acp.updateServer.serverURL.description"><![CDATA[Geben Sie die Adresse (URL) zu einem Paketserver an.]]></item>
+ <item name="wcf.acp.updateServer.serverURL.error.notValid"><![CDATA[Die eingetragene Adresse ist ungültig.]]></item>
<item name="wcf.acp.updateServer.status"><![CDATA[Status]]></item>
<item name="wcf.acp.updateServer.timestamp"><![CDATA[Letzter Zugriff]]></item>
<item name="wcf.acp.updateServer.view"><![CDATA[Verfügbare Update-Server]]></item>
<item name="wcf.acp.updateServer.list.available"><![CDATA[{#$items} server available]]></item>
<item name="wcf.acp.updateServer.packageUpdateServerID"><![CDATA[Server id]]></item>
<item name="wcf.acp.updateServer.packages"><![CDATA[Packages]]></item>
- <item name="wcf.acp.updateServer.server"><![CDATA[Address]]></item>
- <item name="wcf.acp.updateServer.server.description"><![CDATA[Please enter the URL to a package server.]]></item>
- <item name="wcf.acp.updateServer.server.error.notValid"><![CDATA[The entered address is invalid.]]></item>
+ <item name="wcf.acp.updateServer.serverURL"><![CDATA[Address]]></item>
+ <item name="wcf.acp.updateServer.serverURL.description"><![CDATA[Please enter the URL to a package server.]]></item>
+ <item name="wcf.acp.updateServer.serverURL.error.notValid"><![CDATA[The entered address is invalid.]]></item>
<item name="wcf.acp.updateServer.status"><![CDATA[Status]]></item>
<item name="wcf.acp.updateServer.timestamp"><![CDATA[Last access]]></item>
<item name="wcf.acp.updateServer.view"><![CDATA[Available update server]]></item>