Commit c54df7ed authored by Sebastian Diez's avatar Sebastian Diez

Merge branch 'develop' into 75-use-namespaces-and-new-class-names-in-the-tasks

parents c5032fe3 5c421d74
Pipeline #943 passed with stages
in 2 minutes and 14 seconds
...@@ -13,13 +13,14 @@ stages: ...@@ -13,13 +13,14 @@ stages:
build: build:
stage: build stage: build
image: composer
variables: variables:
GIT_STRATEGY: "clone" GIT_STRATEGY: "clone"
GIT_SUBMODULE_STRATEGY: "recursive" GIT_SUBMODULE_STRATEGY: "recursive"
script: script:
- ./.gitlab-ci/scripts/composer.sh config store-auths false - composer config store-auths false
- ./.gitlab-ci/scripts/composer.sh config http-basic.git-t3o.typo3.org gitlab-ci-token ${CI_BUILD_TOKEN} - composer config http-basic.git-t3o.typo3.org gitlab-ci-token ${CI_BUILD_TOKEN}
- ./.gitlab-ci/scripts/composer.sh install - composer install
artifacts: artifacts:
paths: paths:
- ./ - ./
...@@ -39,7 +40,6 @@ layout: ...@@ -39,7 +40,6 @@ layout:
paths: paths:
- ./ - ./
expire_in: '7d' expire_in: '7d'
environment: ${CI_BUILD_REF_NAME}
dependencies: dependencies:
- build - build
except: except:
...@@ -52,7 +52,7 @@ layout: ...@@ -52,7 +52,7 @@ layout:
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | ssh-add - - echo "$SSH_PRIVATE_KEY" | ssh-add -
script: script:
- ./.gitlab-ci/scripts/deployer.sh -f/src/.gitlab-ci/deployer/deploy.php deploy ${CI_BUILD_REF_NAME} - VERSION=4.0.0-alpine ./.gitlab-ci/scripts/deployer.sh -f/src/.gitlab-ci/deployer/deploy.php deploy ${CI_BUILD_REF_NAME}
when: manual when: manual
dependencies: dependencies:
- layout - layout
......
plugin.tx_ter_pi1 {
pid =
reviewersFrontendUsergroupUid =
adminFrontendUsergroupUid = 2
mirrorsFrontendUsergroupUid =
}
plugin.tx_ter_pi1 { plugin.tx_ter_pi1 {
pid = pid = {plugin.tx_ter_pi1.pid}
reviewersFrontendUsergroupUid = reviewersFrontendUsergroupUid = {plugin.tx_ter_pi1.reviewersFrontendUsergroupUid}
adminFrontendUsergroupUid = adminFrontendUsergroupUid = {plugin.tx_ter_pi1.adminFrontendUsergroupUid}
mirrorsFrontendUsergroupUid = mirrorsFrontendUsergroupUid = {plugin.tx_ter_pi1.mirrorsFrontendUsergroupUid}
} }
\ No newline at end of file
...@@ -57,6 +57,9 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr ...@@ -57,6 +57,9 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr
$this->extensionRepository = $this->objectManager->get(\T3o\TerFe2\Domain\Repository\ExtensionRepository::class); $this->extensionRepository = $this->objectManager->get(\T3o\TerFe2\Domain\Repository\ExtensionRepository::class);
$this->versionRepository = $this->objectManager->get(\T3o\TerFe2\Domain\Repository\VersionRepository::class); $this->versionRepository = $this->objectManager->get(\T3o\TerFe2\Domain\Repository\VersionRepository::class);
$this->userRepository = $this->objectManager->get(\TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository::class); $this->userRepository = $this->objectManager->get(\TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository::class);
$querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface::class);
$querySettings->setRespectStoragePage(false);
$this->userRepository->setDefaultQuerySettings($querySettings);
} }
/** /**
...@@ -69,9 +72,10 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr ...@@ -69,9 +72,10 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr
public function indexAction($uploaded = FALSE) public function indexAction($uploaded = FALSE)
{ {
// get extensions by user if a user is logged in // get extensions by user if a user is logged in
if (!empty($this->frontendUser)) { if ($GLOBALS['TSFE']->fe_user->user['uid']) {
$extensions = $this->extensionRepository->findByFrontendUser($this->frontendUser['username']); $this->frontendUser = $this->userRepository->findByUid($GLOBALS['TSFE']->fe_user->user['uid']);
$expiringExtensions = $this->extensionRepository->findByFrontendUserAndExpiring($this->frontendUser['username']); $extensions = $this->extensionRepository->findByFrontendUser($this->frontendUser->getUsername());
$expiringExtensions = $this->extensionRepository->findByFrontendUserAndExpiring($this->frontendUser->getUsername());
$this->view->assign('extensions', $extensions); $this->view->assign('extensions', $extensions);
$this->view->assign('expiringExtensions', $expiringExtensions); $this->view->assign('expiringExtensions', $expiringExtensions);
$this->view->assign('uploaded', $uploaded); $this->view->assign('uploaded', $uploaded);
...@@ -103,7 +107,7 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr ...@@ -103,7 +107,7 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr
// Create extension model // Create extension model
$extension = $this->objectManager->get(\T3o\TerFe2\Domain\Model\Extension::class); $extension = $this->objectManager->get(\T3o\TerFe2\Domain\Model\Extension::class);
$extension->setExtKey($extensionKey); $extension->setExtKey($extensionKey);
$extension->setFrontendUser($this->frontendUser['username']); $extension->setFrontendUser($this->frontendUser->getUsername());
$this->extensionRepository->add($extension); $this->extensionRepository->add($extension);
$this->addFlashMessage( $this->addFlashMessage(
...@@ -267,10 +271,10 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr ...@@ -267,10 +271,10 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr
{ {
// check if the extension belongs to the current user // check if the extension belongs to the current user
if ($this->securityRole->isReviewer() or $extension->getFrontendUser() == $this->userRepository->findCurrent()) { if ($this->securityRole->isReviewer() || $extension->getFrontendUser() === $this->frontendUser->getUsername()) {
$this->view->assign('extension', $extension); $this->view->assign('extension', $extension);
$this->view->assign('loggedIn', $this->userRepository->findCurrent()); $this->view->assign('loggedIn', (bool)$this->frontendUser);
} else { } else {
$this->addFlashMessage($this->translate('registerkey.notyourextension'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR); $this->addFlashMessage($this->translate('registerkey.notyourextension'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
$this->redirect('index', 'Registerkey'); $this->redirect('index', 'Registerkey');
......
...@@ -152,16 +152,16 @@ class ExtensionRepository extends \T3o\TerFe2\Domain\Repository\AbstractReposito ...@@ -152,16 +152,16 @@ class ExtensionRepository extends \T3o\TerFe2\Domain\Repository\AbstractReposito
/** /**
* *
* @param string $frontendUser * @param string $frontendUser
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage Objects * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
*/ */
public function findByFrontendUser($frontendUser) public function findByFrontendUser($frontendUser)
{ {
$query = $this->createQuery(); $query = $this->createQuery();
$query->setOrderings( $query->setOrderings(
array('extKey' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING) ['extKey' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING]
); );
$query->matching($query->equals('frontendUser', $frontendUser));
$this->match($query, $query->like('frontendUser', $frontendUser));
return $query->execute(); return $query->execute();
} }
......
...@@ -246,9 +246,10 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider ...@@ -246,9 +246,10 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider
return array(); return array();
} }
$states = tx_em_Tools::getDefaultState(NULL); $extensionModel = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
$states = $extensionModel->getDefaultState(null);
$states = array_flip($states); $states = array_flip($states);
$categories = tx_em_Tools::getDefaultCategory(NULL); $categories = Tx_TerFe2_Utility_Category::getDefaultCategories(null);
$categories = array_flip($categories); $categories = array_flip($categories);
$extensions = array(); $extensions = array();
......
...@@ -71,6 +71,7 @@ class Role implements \TYPO3\CMS\Core\SingletonInterface ...@@ -71,6 +71,7 @@ class Role implements \TYPO3\CMS\Core\SingletonInterface
*/ */
public function isAdmin() public function isAdmin()
{ {
return true;
if (empty($this->settings['terAdminGroupUid'])) { if (empty($this->settings['terAdminGroupUid'])) {
return FALSE; return FALSE;
} }
......
...@@ -72,7 +72,8 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task ...@@ -72,7 +72,8 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
LEFT JOIN tx_terfe2_domain_model_extension ON tx_terfe2_domain_model_extension.uid = tx_terfe2_domain_model_version.extension', LEFT JOIN tx_terfe2_domain_model_extension ON tx_terfe2_domain_model_extension.uid = tx_terfe2_domain_model_version.extension',
'ext_key = "' . $extData['extensionkey'] . '" AND version_string = "' . $extData['version'] . '" AND tx_terfe2_domain_model_extension.deleted = 0 AND tx_terfe2_domain_model_version.deleted = 0' 'ext_key = "' . $extData['extensionkey'] . '" AND version_string = "' . $extData['version'] . '" AND tx_terfe2_domain_model_extension.deleted = 0 AND tx_terfe2_domain_model_version.deleted = 0'
); );
$states = tx_em_Tools::getDefaultState(NULL); $extensionModel = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
$states = $extensionModel->getDefaultState(null);
if ($versionRec['versionUid'] && $versionRec['state'] != $extData['state']) { if ($versionRec['versionUid'] && $versionRec['state'] != $extData['state']) {
if (!array_key_exists($extData['state'], $states)) { if (!array_key_exists($extData['state'], $states)) {
$extData['state'] = 'n/a'; $extData['state'] = 'n/a';
...@@ -132,8 +133,8 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task ...@@ -132,8 +133,8 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
'tx_terfe2_domain_model_version 'tx_terfe2_domain_model_version
LEFT JOIN tx_terfe2_domain_model_extension ON tx_terfe2_domain_model_extension.uid = tx_terfe2_domain_model_version.extension', LEFT JOIN tx_terfe2_domain_model_extension ON tx_terfe2_domain_model_extension.uid = tx_terfe2_domain_model_version.extension',
'NOT tx_terfe2_domain_model_version.deleted 'NOT tx_terfe2_domain_model_version.deleted
AND tx_terfe2_domain_model_version.version_string = "' . mysql_real_escape_string($extData['version']) . '" AND tx_terfe2_domain_model_version.version_string = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['version'], '') . '"
AND tx_terfe2_domain_model_extension.ext_key = "' . mysql_real_escape_string($extData['extensionkey']) . '"' AND tx_terfe2_domain_model_extension.ext_key = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['extensionkey'], '') . '"'
); );
return (boolean)$GLOBALS['TYPO3_DB']->sql_num_rows($res); return (boolean)$GLOBALS['TYPO3_DB']->sql_num_rows($res);
} }
...@@ -148,7 +149,7 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task ...@@ -148,7 +149,7 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
$extRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow( $extRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
'uid', 'uid',
'tx_terfe2_domain_model_extension', 'tx_terfe2_domain_model_extension',
'NOT deleted AND ext_key = "' . mysql_real_escape_string($extData['extensionkey']) . '"' 'NOT deleted AND ext_key = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['extensionkey'], '') . '"'
); );
if ($extRec) { if ($extRec) {
return $extRec['uid']; return $extRec['uid'];
...@@ -201,8 +202,9 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task ...@@ -201,8 +202,9 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
*/ */
public function createVersion($extUid, $extData) public function createVersion($extUid, $extData)
{ {
$states = tx_em_Tools::getDefaultState(NULL); $extensionModel = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
$categories = tx_em_Tools::getDefaultCategory(NULL); $states = $extensionModel->getDefaultState(null);
$categories = Tx_TerFe2_Utility_Category::getDefaultCategories(null);
$insertVersion = array( $insertVersion = array(
'pid' => $this->pid, 'pid' => $this->pid,
...@@ -346,10 +348,10 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task ...@@ -346,10 +348,10 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
'uid', 'uid',
'tx_terfe2_domain_model_author', 'tx_terfe2_domain_model_author',
'NOT deleted 'NOT deleted
AND username = "' . mysql_real_escape_string($extData['lastuploadbyusername']) . '" AND username = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['lastuploadbyusername'], '') . '"
AND name = "' . mysql_real_escape_string($extData['authorname']) . '" AND name = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authorname'], '') . '"
AND email = "' . mysql_real_escape_string($extData['authoremail']) . '" AND email = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authoremail'], '') . '"
AND company = "' . mysql_real_escape_string($extData['authorcompany']) . '"' AND company = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authorcompany'], '') . '"'
); );
if ($authorRec['uid']) { if ($authorRec['uid']) {
return $authorRec['uid']; return $authorRec['uid'];
...@@ -387,7 +389,7 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task ...@@ -387,7 +389,7 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
$userRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow( $userRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
'uid', 'uid',
'fe_users', 'fe_users',
'username = "' . mysql_real_escape_string($username) . '"' 'username = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($username, '') . '"'
); );
if ($userRec['uid']) { if ($userRec['uid']) {
return $userRec['uid']; return $userRec['uid'];
......
...@@ -141,10 +141,11 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -141,10 +141,11 @@ class ImportExtensionsFromQueueTask extends Task
{ {
$res = $this->getDatabaseConnection()->exec_SELECTquery( $res = $this->getDatabaseConnection()->exec_SELECTquery(
'tx_terfe2_domain_model_version.uid', 'tx_terfe2_domain_model_version.uid',
'tx_terfe2_domain_model_version LEFT JOIN tx_terfe2_domain_model_extension ON tx_terfe2_domain_model_extension.uid = tx_terfe2_domain_model_version.extension', 'tx_terfe2_domain_model_version
'NOT tx_terfe2_domain_model_version.deleted LEFT JOIN tx_terfe2_domain_model_extension ON tx_terfe2_domain_model_extension.uid = tx_terfe2_domain_model_version.extension',
AND tx_terfe2_domain_model_version.version_string = "' . $this->getDatabaseConnection()->quoteStr($extData['version'], 'tx_terfe2_domain_model_version') . '" 'NOT tx_terfe2_domain_model_version.deleted
AND tx_terfe2_domain_model_extension.ext_key = "' . $this->getDatabaseConnection()->quoteStr($extData['extensionkey'], 'tx_terfe2_domain_model_extension') . '"' AND tx_terfe2_domain_model_version.version_string = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['version'], '') . '"
AND tx_terfe2_domain_model_extension.ext_key = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['extensionkey'], '') . '"'
); );
return (boolean)$this->getDatabaseConnection()->sql_num_rows($res); return (boolean)$this->getDatabaseConnection()->sql_num_rows($res);
...@@ -160,7 +161,7 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -160,7 +161,7 @@ class ImportExtensionsFromQueueTask extends Task
$extRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow( $extRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
'uid', 'uid',
'tx_terfe2_domain_model_extension', 'tx_terfe2_domain_model_extension',
'NOT deleted AND ext_key = "' . $this->getDatabaseConnection()->quoteStr($extData['extensionkey'], 'tx_terfe2_domain_model_extension') . '"' 'NOT deleted AND ext_key = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['extensionkey'], '') . '"'
); );
if ($extRec) { if ($extRec) {
return $extRec['uid']; return $extRec['uid'];
...@@ -345,7 +346,7 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -345,7 +346,7 @@ class ImportExtensionsFromQueueTask extends Task
$extRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow( $extRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
'uid', 'uid',
'tx_terfe2_domain_model_extension', 'tx_terfe2_domain_model_extension',
'ext_key = "' . $this->getDatabaseConnection()->quoteStr($extKey, 'tx_terfe2_domain_model_extension') . '" AND NOT deleted' 'ext_key = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extKey, '') . '" AND NOT deleted'
); );
if ($extRec['uid']) { if ($extRec['uid']) {
return $extRec['uid']; return $extRec['uid'];
...@@ -374,10 +375,11 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -374,10 +375,11 @@ class ImportExtensionsFromQueueTask extends Task
$authorRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow( $authorRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
'uid', 'uid',
'tx_terfe2_domain_model_author', 'tx_terfe2_domain_model_author',
'NOT deleted AND username = "' . $this->getDatabaseConnection()->quoteStr($extData['lastuploadbyusername'], 'tx_terfe2_domain_model_author') . '" 'NOT deleted
AND name = "' . $this->getDatabaseConnection()->quoteStr($extData['authorname'], 'tx_terfe2_domain_model_author') . '" AND username = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['lastuploadbyusername'], '') . '"
AND email = "' . $this->getDatabaseConnection()->quoteStr($extData['authoremail'], 'tx_terfe2_domain_model_author') . '" AND name = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authorname'], '') . '"
AND company = "' . $this->getDatabaseConnection()->quoteStr($extData['authorcompany'], 'tx_terfe2_domain_model_author') . '"' AND email = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authoremail'], '') . '"
AND company = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authorcompany'], '') . '"'
); );
if ($authorRec['uid']) { if ($authorRec['uid']) {
return $authorRec['uid']; return $authorRec['uid'];
...@@ -416,7 +418,7 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -416,7 +418,7 @@ class ImportExtensionsFromQueueTask extends Task
$userRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow( $userRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
'uid', 'uid',
'fe_users', 'fe_users',
'username = "' . $this->getDatabaseConnection()->quoteStr($username, 'fe_users') . '"' 'username = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($username, '') . '"'
); );
if ($userRec['uid']) { if ($userRec['uid']) {
return $userRec['uid']; return $userRec['uid'];
......
...@@ -109,19 +109,19 @@ plugin.tx_terfe2 { ...@@ -109,19 +109,19 @@ plugin.tx_terfe2 {
pages { pages {
# cat=TER Frontend/settings/5500; type=int+; label=Detail PID: PID of extension detail view # cat=TER Frontend/settings/5500; type=int+; label=Detail PID: PID of extension detail view
extensionDetailPID = 23 extensionDetailPID = 3
# cat=TER Frontend/settings/5510; type=int+; label=Manage Keys PID: PID of manage keys view # cat=TER Frontend/settings/5510; type=int+; label=Manage Keys PID: PID of manage keys view
manageKeysPID = 118 manageKeysPID = 9
# cat=TER Frontend/settings/5520; type=int+; label=Upload Version PID: PID of version upload view # cat=TER Frontend/settings/5520; type=int+; label=Upload Version PID: PID of version upload view
uploadVersionPID = 602 uploadVersionPID = 10
} }
} }
persistence { persistence {
# cat=TER Frontend/persistence/6000; type=int+; label=Storage PID: General storage PID for the TER Frontend Index # cat=TER Frontend/persistence/6000; type=int+; label=Storage PID: General storage PID for the TER Frontend Index
storagePid = 0 storagePid = 2
} }
view { view {
......
<div class="tx_terfe2"> <div class="tx_terfe2">
<div class="tx_terfe2_messages"> <f:flashMessages />
<f:flashMessages /> <div class="tx_terfe2_content">
</div> <f:render section="main"/>
<div class="tx_terfe2_content"> </div>
<f:render section="main"/>
</div>
</div> </div>
<f:form.errors> <f:form.validationResults>
<div class="error"> <f:if condition="{validationResults.flattenedErrors}">
{error.message} <f:for each="{validationResults.flattenedErrors}" as="errors" key="propertyPath">
<f:if condition="{error.propertyName}"> <li>{propertyPath}
<p> <ul>
<strong>{error.propertyName}</strong>: <f:for each="{errors}" as="error">
<f:for each="{error.errors}" as="errorDetail"> <li>{error.code}: {error}</li>
{errorDetail.message} </f:for>
</f:for> </ul>
</p> </li>
</f:if> </f:for>
</div> </f:if>
</f:form.errors> </f:form.validationResults>
\ No newline at end of file
<f:layout name="Default"/> <f:layout name="Default" />
<f:section name="main"> <f:section name="main">
<f:if condition="{isLoggedIn}"> <f:if condition="{isLoggedIn}">
<f:then> <f:then>
<h2> <h1 class="mt-3">
<f:translate key="edit_extension"/> <f:translate key="edit_extension" />
{extension.extKey} {extension.extKey}
</h2> </h1>
<f:form method="post" action="update" controller="Extension" name="extension" object="{extension}"> <f:form class="form-horizontal" method="post" action="update" controller="Extension" name="extension" object="{extension}">
<f:render partial="FormErrors"/> <f:render partial="FormErrors" />
<div class="b-form"> <div class="form-group row">
<label for="forgeLink" class="col-3 col-form-label">
<f:translate key="tx_terfe2_domain_model_extension.forge_link" />
</label>
<div class="col-9">
<f:form.textfield class="form-control" id="forgeLink" property="forgeLink" additionalAttributes="{placeholder:'http://forge.typo3.org/projects/your-project'}" />
</div>
</div>
<div class="b-form-row"> <div class="form-group row">
<label for="forgeLink"> <label for="repositoryUrl" class="col-3 col-form-label">
<f:translate key="tx_terfe2_domain_model_extension.forge_link"/> <f:translate key="tx_terfe2_domain_model_extension.repository_url" />
</label> </label>
<div class="b-form-inputs"> <div class="col-9">
<f:form.textfield size="40" id="forgeLink" property="forgeLink" <f:form.textfield class="form-control" id="repositoryUrl" property="repositoryUrl" additionalAttributes="{placeholder:'http://external.repository.org/your-project'}" />
additionalAttributes="{placeholder:'http://forge.typo3.org/projects/your-project'}"/> </div>
</div> </div>
</div>
<div class="form-group row">
<label for="externalManual" class="col-3 col-form-label">
<f:translate key="tx_terfe2_domain_model_extension.external_manual" />
</label>
<div class="col-9">
<f:form.textfield class="form-control" id="externalManual" property="externalManual" additionalAttributes="{placeholder:'http://external.domain.org/external-manual'}" />
</div>
</div>
<div class="b-form-row"> <div class="form-group row">
<label for="repositoryUrl"> <label for="paypalUrl" class="col-3 col-form-label">
<f:translate key="tx_terfe2_domain_model_extension.repository_url"/> <f:translate key="tx_terfe2_domain_model_extension.donate_url" />
</label> </label>
<div class="b-form-inputs"> <div class="col-9">
<f:form.textfield size="40" id="repositoryUrl" property="repositoryUrl" <f:form.textfield class="form-control" id="paypalUrl" property="paypalUrl" additionalAttributes="{placeholder:'http://paypal.com/your-url'}" />
additionalAttributes="{placeholder:'http://external.repository.org/your-project'}"/> </div>
</div> </div>
</div>
<div class="b-form-row"> <div class="form-group row">
<label for="externalManual"> <label for="flattrUsername" class="col-3 col-form-label">
<f:translate key="tx_terfe2_domain_model_extension.external_manual"/> flattr username<br />
</label> <span class="small"><f:link.external uri="http://wiki.typo3.org/How_to_add_flattr_to_TER" target="_blank">[How to set up flattr]</f:link.external></span>
<div class="b-form-inputs"> </label>
<f:form.textfield size="40" id="externalManual" property="externalManual" <div class="col-9">
additionalAttributes="{placeholder:'http://external.domain.org/external-manual'}"/> <f:form.textfield class="form-control" id="flattrUsername" property="flattrUsername" additionalAttributes="{placeholder:'Put in your flattr username'}" />
</div> </div>
</div> </div>
<div class="b-form-row"> <div class="form-group row">
<label for="paypalUrl"> <label class="col-3 col-form-label" for="tags">Tags</label>
<f:translate key="tx_terfe2_domain_model_extension.donate_url"/> <div class="col-9">
</label> <f:form.textfield class="form-control" id="tags" name="tag" additionalAttributes="{placeholder:'Add tags for this extension (divided by spaces)'}" />
<div class="b-form-inputs"> </div>
<f:form.textfield size="40" id="paypalUrl" property="paypalUrl" </div>
additionalAttributes="{placeholder:'http://paypal.com/your-url'}"/>
</div>
</div>
<div class="b-form-row"> <div class="row">
<label for="flattrUsername">flattr username<br/> <div class="offset-3 col-sm-9">
<span class="small"><f:link.external uri="http://wiki.typo3.org/How_to_add_flattr_to_TER" <f:if condition="{extension.tags}">
target="_blank">[How to set up flattr]</f:link.external></span></label> <f:for each="{extension.tags}" as="tag">
<div class="b-form-inputs"> <div class="btn-group">
<f:form.textfield size="40" id="flattrUsername" property="flattrUsername" <button class="btn btn-info">#{tag.title}</button>
additionalAttributes="{placeholder:'Put in your flattr username'}"/> <f:link.action action="removeTag" controller="Extension" arguments="{extension : extension, tag : tag}" class="btn btn-outline-danger mr-2">
</div> <i class="fa fa-trash-o"></i>
</div> </f:link.action>
</div>
</f:for>
</f:if>
</div>
</div>
<div class="b-form-row"> <div class="form-group row mt-5"