Commit 28e8af5d authored by Dirk Wildt's avatar Dirk Wildt

0.0.6

parent d563d947
......@@ -102,6 +102,29 @@ class ShopController extends AbstractController
return false;
}
/**
* _checkTitle
*
* @param string $title
* @return void
* @version 0.0.6
* @since 0.0.6
* @internal #t3863
*/
private function _checkTitle( $title )
{
if( !empty( $title ) )
{
return true;
}
$header = '';
$prompt = 'Die Name der Veranstaltung ist nicht angegeben.';
$this->addFlashMessage( $prompt, $header, \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR );
return false;
}
/**
* _cloneArea
*
......@@ -120,12 +143,11 @@ class ShopController extends AbstractController
// uid, pid
unset( $properties[ 'uid' ] );
// type
$properties[ 'displaycell' ] = 0; // clone
$properties[ 'pid' ] = $pid;
$properties[ 'type' ] = 1; // clone
// image
// #t3849, 190702, dwildt: next line doesn't work
//$clone->setImage( $area->getImage() );
......@@ -276,7 +298,8 @@ class ShopController extends AbstractController
$product->setPrice( $ticket->getPrice() );
$product->setStockmanagement( true );
$product->setStockquantity( 1 );
$product->setTitle( $group->getTitle() );
$title = SessionModuleUtility::getFormShopTitle() . ': ' . $group->getTitle();
$product->setTitle( $title );
$this->productRepository->add( $product );
$this->persistenceManager->persistAll();
......@@ -396,11 +419,15 @@ class ShopController extends AbstractController
public function createAction( \Netzmacher\Tile\Domain\Model\Area $area )
{
$pid = ( int ) SessionModuleUtility::getFormShopDestpid();
if( !$this->_checkPid( $pid ) )
{
$this->redirect( 'createconfirm', 'Shop', null, array( 'area' => $area ) );
// $this->redirect( 'list', 'Module' );
}
$title = SessionModuleUtility::getFormShopTitle();
if( !$this->_checkTitle( $title ) )
{
$this->redirect( 'createconfirm', 'Shop', null, array( 'area' => $area ) );
}
$cloneAreaUid = $this->_cloneArea( $area, $pid );
......@@ -425,7 +452,9 @@ class ShopController extends AbstractController
return;
}
$formShopDestpid = SessionModuleUtility::getFormShopDestpid();
$formShopTitle = SessionModuleUtility::getFormShopTitle();
$this->view->assign( 'formShopDestpid', $formShopDestpid );
$this->view->assign( 'formShopTitle', $formShopTitle );
$this->view->assign( 'sumCategory', $this->_sumRelation( $area, 'tx_tile_category' ) );
$this->view->assign( 'sumGroup', $this->_sumGroup( $area ) );
$this->view->assign( 'sumTicket', $this->_sumRelation( $area, 'tx_tile_ticket' ) );
......
......@@ -119,7 +119,7 @@ class SessionModuleUtility
* @return string
* @version 0.0.6
* @since 0.0.6
* @internal t3812
* @internal #t3812
*/
static public function getFormCellTicket()
{
......@@ -134,7 +134,7 @@ class SessionModuleUtility
* @return string
* @version 0.0.6
* @since 0.0.6
* @internal t3812
* @internal #t3812
*/
static public function getFormCellWiBgimage( $default )
{
......@@ -149,7 +149,7 @@ class SessionModuleUtility
* @return string
* @version 0.0.6
* @since 0.0.6
* @internal t3812
* @internal #t3812
*/
static public function getFormCellWiCategories( $default )
{
......@@ -164,7 +164,7 @@ class SessionModuleUtility
* @return string
* @version 0.0.6
* @since 0.0.6
* @internal t3812
* @internal #t3812
*/
static public function getFormCellWiGroups( $default )
{
......@@ -179,7 +179,7 @@ class SessionModuleUtility
* @return string
* @version 0.0.6
* @since 0.0.6
* @internal t3812
* @internal #t3812
*/
static public function getFormCellWiTickets( $default )
{
......@@ -194,7 +194,7 @@ class SessionModuleUtility
* @return string
* @version 0.0.6
* @since 0.0.6
* @internal t3812
* @internal #t3812
*/
static public function getFormCellWiUndefinedCells( $default )
{
......@@ -208,13 +208,27 @@ class SessionModuleUtility
* @return string
* @version 0.0.6
* @since 0.0.6
* @internal t3841
* @internal #t3841
*/
static public function getFormShopDestpid()
{
$value = self::_getSessionElement( 'formShopDestpid' );
return $value;
}
/**
* getFormShopTitle:
*
* @return string
* @version 0.0.6
* @since 0.0.6
* @internal #t3863
*/
static public function getFormShopTitle()
{
$value = self::_getSessionElement( 'formShopTitle' );
return $value;
}
/**
* getValue()
......
......@@ -3,10 +3,12 @@
<table class="woPaddingLeft">
<tr class="white">
<th><label for="title">Name der Veranstaltung<span class="required">*</span></label></th>
<th><label for="title">Ziel-Ordner<span class="required">*</span></label></th>
</tr>
<tr class="white">
<td><f:form.textfield name="formShopDestpid" value="{formShopDestpid}"/></td>
<td><f:form.textfield name="formShopTitle" value="{formShopTitle}" placeholder="Name TT.MM.YYYY"/></td>
<td><f:form.textfield name="formShopDestpid" value="{formShopDestpid}" placeholder="999"/></td>
</tr>
</table>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment