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:
build:
stage: build
image: composer
variables:
GIT_STRATEGY: "clone"
GIT_SUBMODULE_STRATEGY: "recursive"
script:
- ./.gitlab-ci/scripts/composer.sh config store-auths false
- ./.gitlab-ci/scripts/composer.sh config http-basic.git-t3o.typo3.org gitlab-ci-token ${CI_BUILD_TOKEN}
- ./.gitlab-ci/scripts/composer.sh install
- composer config store-auths false
- composer config http-basic.git-t3o.typo3.org gitlab-ci-token ${CI_BUILD_TOKEN}
- composer install
artifacts:
paths:
- ./
......@@ -39,7 +40,6 @@ layout:
paths:
- ./
expire_in: '7d'
environment: ${CI_BUILD_REF_NAME}
dependencies:
- build
except:
......@@ -52,7 +52,7 @@ layout:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | ssh-add -
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
dependencies:
- layout
......
plugin.tx_ter_pi1 {
pid =
reviewersFrontendUsergroupUid =
adminFrontendUsergroupUid = 2
mirrorsFrontendUsergroupUid =
}
plugin.tx_ter_pi1 {
pid =
reviewersFrontendUsergroupUid =
adminFrontendUsergroupUid =
mirrorsFrontendUsergroupUid =
}
\ No newline at end of file
pid = {plugin.tx_ter_pi1.pid}
reviewersFrontendUsergroupUid = {plugin.tx_ter_pi1.reviewersFrontendUsergroupUid}
adminFrontendUsergroupUid = {plugin.tx_ter_pi1.adminFrontendUsergroupUid}
mirrorsFrontendUsergroupUid = {plugin.tx_ter_pi1.mirrorsFrontendUsergroupUid}
}
......@@ -57,6 +57,9 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr
$this->extensionRepository = $this->objectManager->get(\T3o\TerFe2\Domain\Repository\ExtensionRepository::class);
$this->versionRepository = $this->objectManager->get(\T3o\TerFe2\Domain\Repository\VersionRepository::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
public function indexAction($uploaded = FALSE)
{
// get extensions by user if a user is logged in
if (!empty($this->frontendUser)) {
$extensions = $this->extensionRepository->findByFrontendUser($this->frontendUser['username']);
$expiringExtensions = $this->extensionRepository->findByFrontendUserAndExpiring($this->frontendUser['username']);
if ($GLOBALS['TSFE']->fe_user->user['uid']) {
$this->frontendUser = $this->userRepository->findByUid($GLOBALS['TSFE']->fe_user->user['uid']);
$extensions = $this->extensionRepository->findByFrontendUser($this->frontendUser->getUsername());
$expiringExtensions = $this->extensionRepository->findByFrontendUserAndExpiring($this->frontendUser->getUsername());
$this->view->assign('extensions', $extensions);
$this->view->assign('expiringExtensions', $expiringExtensions);
$this->view->assign('uploaded', $uploaded);
......@@ -103,7 +107,7 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr
// Create extension model
$extension = $this->objectManager->get(\T3o\TerFe2\Domain\Model\Extension::class);
$extension->setExtKey($extensionKey);
$extension->setFrontendUser($this->frontendUser['username']);
$extension->setFrontendUser($this->frontendUser->getUsername());
$this->extensionRepository->add($extension);
$this->addFlashMessage(
......@@ -267,10 +271,10 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr
{
// 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('loggedIn', $this->userRepository->findCurrent());
$this->view->assign('loggedIn', (bool)$this->frontendUser);
} else {
$this->addFlashMessage($this->translate('registerkey.notyourextension'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
$this->redirect('index', 'Registerkey');
......
......@@ -152,16 +152,16 @@ class ExtensionRepository extends \T3o\TerFe2\Domain\Repository\AbstractReposito
/**
*
* @param string $frontendUser
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage Objects
* @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
*/
public function findByFrontendUser($frontendUser)
{
$query = $this->createQuery();
$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();
}
......
......@@ -246,9 +246,10 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider
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);
$categories = tx_em_Tools::getDefaultCategory(NULL);
$categories = Tx_TerFe2_Utility_Category::getDefaultCategories(null);
$categories = array_flip($categories);
$extensions = array();
......
......@@ -71,6 +71,7 @@ class Role implements \TYPO3\CMS\Core\SingletonInterface
*/
public function isAdmin()
{
return true;
if (empty($this->settings['terAdminGroupUid'])) {
return FALSE;
}
......
......@@ -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',
'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 (!array_key_exists($extData['state'], $states)) {
$extData['state'] = 'n/a';
......@@ -132,8 +133,8 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
'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',
'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_extension.ext_key = "' . mysql_real_escape_string($extData['extensionkey']) . '"'
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)$GLOBALS['TYPO3_DB']->sql_num_rows($res);
}
......@@ -148,7 +149,7 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
$extRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
'uid',
'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) {
return $extRec['uid'];
......@@ -201,8 +202,9 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
*/
public function createVersion($extUid, $extData)
{
$states = tx_em_Tools::getDefaultState(NULL);
$categories = tx_em_Tools::getDefaultCategory(NULL);
$extensionModel = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
$states = $extensionModel->getDefaultState(null);
$categories = Tx_TerFe2_Utility_Category::getDefaultCategories(null);
$insertVersion = array(
'pid' => $this->pid,
......@@ -346,10 +348,10 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
'uid',
'tx_terfe2_domain_model_author',
'NOT deleted
AND username = "' . mysql_real_escape_string($extData['lastuploadbyusername']) . '"
AND name = "' . mysql_real_escape_string($extData['authorname']) . '"
AND email = "' . mysql_real_escape_string($extData['authoremail']) . '"
AND company = "' . mysql_real_escape_string($extData['authorcompany']) . '"'
AND username = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['lastuploadbyusername'], '') . '"
AND name = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authorname'], '') . '"
AND email = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authoremail'], '') . '"
AND company = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authorcompany'], '') . '"'
);
if ($authorRec['uid']) {
return $authorRec['uid'];
......@@ -387,7 +389,7 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
$userRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
'uid',
'fe_users',
'username = "' . mysql_real_escape_string($username) . '"'
'username = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($username, '') . '"'
);
if ($userRec['uid']) {
return $userRec['uid'];
......
......@@ -141,10 +141,11 @@ class ImportExtensionsFromQueueTask extends Task
{
$res = $this->getDatabaseConnection()->exec_SELECTquery(
'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',
'NOT tx_terfe2_domain_model_version.deleted
AND tx_terfe2_domain_model_version.version_string = "' . $this->getDatabaseConnection()->quoteStr($extData['version'], 'tx_terfe2_domain_model_version') . '"
AND tx_terfe2_domain_model_extension.ext_key = "' . $this->getDatabaseConnection()->quoteStr($extData['extensionkey'], 'tx_terfe2_domain_model_extension') . '"'
'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',
'NOT tx_terfe2_domain_model_version.deleted
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);
......@@ -160,7 +161,7 @@ class ImportExtensionsFromQueueTask extends Task
$extRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
'uid',
'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) {
return $extRec['uid'];
......@@ -345,7 +346,7 @@ class ImportExtensionsFromQueueTask extends Task
$extRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
'uid',
'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']) {
return $extRec['uid'];
......@@ -374,10 +375,11 @@ class ImportExtensionsFromQueueTask extends Task
$authorRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
'uid',
'tx_terfe2_domain_model_author',
'NOT deleted AND username = "' . $this->getDatabaseConnection()->quoteStr($extData['lastuploadbyusername'], 'tx_terfe2_domain_model_author') . '"
AND name = "' . $this->getDatabaseConnection()->quoteStr($extData['authorname'], 'tx_terfe2_domain_model_author') . '"
AND email = "' . $this->getDatabaseConnection()->quoteStr($extData['authoremail'], 'tx_terfe2_domain_model_author') . '"
AND company = "' . $this->getDatabaseConnection()->quoteStr($extData['authorcompany'], 'tx_terfe2_domain_model_author') . '"'
'NOT deleted
AND username = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['lastuploadbyusername'], '') . '"
AND name = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authorname'], '') . '"
AND email = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authoremail'], '') . '"
AND company = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extData['authorcompany'], '') . '"'
);
if ($authorRec['uid']) {
return $authorRec['uid'];
......@@ -416,7 +418,7 @@ class ImportExtensionsFromQueueTask extends Task
$userRec = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
'uid',
'fe_users',
'username = "' . $this->getDatabaseConnection()->quoteStr($username, 'fe_users') . '"'
'username = "' . $GLOBALS['TYPO3_DB']->fullQuoteStr($username, '') . '"'
);
if ($userRec['uid']) {
return $userRec['uid'];
......
......@@ -109,19 +109,19 @@ plugin.tx_terfe2 {
pages {
# 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
manageKeysPID = 118
manageKeysPID = 9
# cat=TER Frontend/settings/5520; type=int+; label=Upload Version PID: PID of version upload view
uploadVersionPID = 602
uploadVersionPID = 10
}
}
persistence {
# cat=TER Frontend/persistence/6000; type=int+; label=Storage PID: General storage PID for the TER Frontend Index
storagePid = 0
storagePid = 2
}
view {
......
<div class="tx_terfe2">
<div class="tx_terfe2_messages">
<f:flashMessages />
</div>
<div class="tx_terfe2_content">
<f:render section="main"/>
</div>
<f:flashMessages />
<div class="tx_terfe2_content">
<f:render section="main"/>
</div>
</div>
<f:form.errors>
<div class="error">
{error.message}
<f:if condition="{error.propertyName}">
<p>
<strong>{error.propertyName}</strong>:
<f:for each="{error.errors}" as="errorDetail">
{errorDetail.message}
</f:for>
</p>
</f:if>
</div>
</f:form.errors>
\ No newline at end of file
<f:form.validationResults>
<f:if condition="{validationResults.flattenedErrors}">
<f:for each="{validationResults.flattenedErrors}" as="errors" key="propertyPath">
<li>{propertyPath}
<ul>
<f:for each="{errors}" as="error">
<li>{error.code}: {error}</li>
</f:for>
</ul>
</li>
</f:for>
</f:if>
</f:form.validationResults>
<f:layout name="Default"/>
<f:layout name="Default" />
<f:section name="main">
<f:if condition="{isLoggedIn}">
<f:then>
<h2>
<f:translate key="edit_extension"/>
{extension.extKey}
</h2>
<f:if condition="{isLoggedIn}">
<f:then>
<h1 class="mt-3">
<f:translate key="edit_extension" />
{extension.extKey}
</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">
<label for="forgeLink">
<f:translate key="tx_terfe2_domain_model_extension.forge_link"/>
</label>
<div class="b-form-inputs">
<f:form.textfield size="40" id="forgeLink" property="forgeLink"
additionalAttributes="{placeholder:'http://forge.typo3.org/projects/your-project'}"/>
</div>
</div>
<div class="form-group row">
<label for="repositoryUrl" class="col-3 col-form-label">
<f:translate key="tx_terfe2_domain_model_extension.repository_url" />
</label>
<div class="col-9">
<f:form.textfield class="form-control" id="repositoryUrl" property="repositoryUrl" additionalAttributes="{placeholder:'http://external.repository.org/your-project'}" />
</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">
<label for="repositoryUrl">
<f:translate key="tx_terfe2_domain_model_extension.repository_url"/>
</label>
<div class="b-form-inputs">
<f:form.textfield size="40" id="repositoryUrl" property="repositoryUrl"
additionalAttributes="{placeholder:'http://external.repository.org/your-project'}"/>
</div>
</div>
<div class="form-group row">
<label for="paypalUrl" class="col-3 col-form-label">
<f:translate key="tx_terfe2_domain_model_extension.donate_url" />
</label>
<div class="col-9">
<f:form.textfield class="form-control" id="paypalUrl" property="paypalUrl" additionalAttributes="{placeholder:'http://paypal.com/your-url'}" />
</div>
</div>
<div class="b-form-row">
<label for="externalManual">
<f:translate key="tx_terfe2_domain_model_extension.external_manual"/>
</label>
<div class="b-form-inputs">
<f:form.textfield size="40" id="externalManual" property="externalManual"
additionalAttributes="{placeholder:'http://external.domain.org/external-manual'}"/>
</div>
</div>
<div class="form-group row">
<label for="flattrUsername" class="col-3 col-form-label">
flattr username<br />
<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>
</label>
<div class="col-9">
<f:form.textfield class="form-control" id="flattrUsername" property="flattrUsername" additionalAttributes="{placeholder:'Put in your flattr username'}" />
</div>
</div>
<div class="b-form-row">
<label for="paypalUrl">
<f:translate key="tx_terfe2_domain_model_extension.donate_url"/>
</label>
<div class="b-form-inputs">
<f:form.textfield size="40" id="paypalUrl" property="paypalUrl"
additionalAttributes="{placeholder:'http://paypal.com/your-url'}"/>
</div>
</div>
<div class="form-group row">
<label class="col-3 col-form-label" for="tags">Tags</label>
<div class="col-9">
<f:form.textfield class="form-control" id="tags" name="tag" additionalAttributes="{placeholder:'Add tags for this extension (divided by spaces)'}" />
</div>
</div>
<div class="b-form-row">
<label for="flattrUsername">flattr username<br/>
<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></label>
<div class="b-form-inputs">
<f:form.textfield size="40" id="flattrUsername" property="flattrUsername"
additionalAttributes="{placeholder:'Put in your flattr username'}"/>
</div>
</div>
<div class="row">
<div class="offset-3 col-sm-9">
<f:if condition="{extension.tags}">
<f:for each="{extension.tags}" as="tag">
<div class="btn-group">
<button class="btn btn-info">#{tag.title}</button>
<f:link.action action="removeTag" controller="Extension" arguments="{extension : extension, tag : tag}" class="btn btn-outline-danger mr-2">
<i class="fa fa-trash-o"></i>
</f:link.action>
</div>
</f:for>
</f:if>
</div>
</div>
<div class="b-form-row">
<label for="tags">Tags</label>
<div class="b-form-inputs">
<f:form.textfield size="20" id="tags" name="tag"
additionalAttributes="{placeholder:'Add tags for this extension (divided by spaces)'}"/>
<f:if condition="{extension.tags}">
<ul>
<f:for each="{extension.tags}" as="tag">
<li>{tag.title} (
<f:link.action action="removeTag" controller="Extension"
arguments="{extension : extension, tag : tag}">remove
</f:link.action>
)
</li>
</f:for>
</ul>
</f:if>
</div>
</div>
<div class="form-group row mt-5">
<div class="offset-3 col-9">
<f:form.submit class="btn btn-primary mr-3" name="save" value="Save" />
<div class="b-form-row">
<div class="b-form-inputs">
<f:form.submit class="bu bu-mini" name="save" value="Save"/>
<f:form.submit class="bu bu-mini" name="close" value="Save and close"/>
</div>
</div>
<f:form.submit class="btn btn-default" name="close" value="Save and close" />
</div>
</div>
</div>
</f:form>
</f:form>
<div class="b-form-row">
<p>
* {f:translate( key:'tx_terfe2_domain_model_extension.repository_clone_url.description' )}
</p>
</div>
<f:link.action controller="Registerkey" class="bu bu-mini dark-grey" action="index">Back to extension
overview
</f:link.action>
</f:then>
<f:else>
You must be the owner of the extension to edit it.
</f:else>
</f:if>
</f:section>
\ No newline at end of file
<div class="mt-5 text-right">
<f:link.action controller="Registerkey" action="index" class="btn btn-primary">Back to extension management</f:link.action>
</div>
</f:then>
<f:else>
<div class="alert alert-warning">
You must be the owner of the extension to edit it.
</div>
</f:else>
</f:if>
</f:section>
<f:layout name="Default"/>
<f:layout name="Default" />
<f:section name="main">
<h2>
<f:translate key="header.uploadExtensionVersion" arguments="{0: extension.extKey}"/>
</h2>
<hr/>
<f:form method="post" action="createVersion" controller="Extension" enctype="multipart/form-data">
<f:form.hidden name="extension" value="{extension}"/>
<br/>
<div class="register-wrapper">
<div class="registerkey-label">
<label for="comment">
<f:translate key="uploadExtensionVersion.comment"/>
</label>
</div>
<div class="register-input b-form-inputs">
<f:form.textarea rows="5" cols="40" name="form[comment]" value="{form.comment}"/>
</div>
<div class="registerkey-label">
<label for="file">
<f:translate key="uploadExtensionVersion.file"/>
</label>
</div>
<div class="register-input b-form-inputs">
<f:form.upload name="form[file]"/>
</div>
<div class="register-input b-form-inputs">
<label>
<f:form.checkbox name="form[gplCompliant]" value="1"/>
<f:translate key="uploadExtensionVersion.gplHint"/>
</label>
</div>
</div>
<hr/>
<div class="a-r">
<f:form.submit value="{f:translate(key:'uploadExtensionVersion.uploadVersion')}" class="bu bu-mini"/>
</div>
<br/>
</f:form>
</f:section>
\ No newline at end of file
<h1>
<f:translate key="header.uploadExtensionVersion" arguments="{0: extension.extKey}" />
</h1>
<f:form method="post" action="createVersion" controller="Extension" class="form-horizontal" enctype="multipart/form-data">
<f:form.hidden name="extension" value="{extension}" />
<div class="form-group row">
<label for="comment" class="col-sm-3 col-form-label">