119 lines
4.0 KiB
PHP

<?php
// No direct access.
use Joomla\CMS\Router\Route;
defined('_JEXEC') or die;
?>
<form method="post" action="<?php echo $this->address; ?>">
<input type='hidden' name='id' value='<?php echo $this->object->getId(); ?>'>
<h2>Stammdaten</h2>
<table>
<tr>
<td>Bezeichnung</td>
<td><input type='text' name='name' value='<?php echo htmlentities($this->object->getName()); ?>'></td>
</tr>
<tr>
<td>Adresse</td>
<td>
<textarea name='address' rows='5'><?php echo htmlentities($this->object->getAddress()); ?></textarea>
</td>
</tr>
<tr>
<td>Stadt</td>
<td><input type='text' name='city' value='<?php echo htmlentities($this->object->getCity()); ?>'></td>
</tr>
<tr>
<td>Homepage</td>
<td><input type='text' name='homepage' value='<?php echo htmlentities($this->object->getHomepage()); ?>'></td>
</tr>
<tr>
<td>E-Mail</td>
<td><input type='text' name='mail' value='<?php echo htmlentities($this->object->getMail()); ?>'></td>
</tr>
<tr>
<td>IBAN</td>
<td><input type='text' name='iban' value='<?php echo htmlentities($this->object->getIban()); ?>'></td>
</tr>
<tr>
<td>BIC</td>
<td><input type='text' name='bic' value='<?php echo htmlentities($this->object->getBic()); ?>'></td>
</tr>
<tr>
<td>Gemeinn&uuml;tzig</td>
<td><input type='checkbox' name='charitable' value='1' <?php echo $this->object->isCharitable() ? 'checked' : ''; ?>></td>
</tr>
<tr>
<td>Vorsitzende/r</td>
<td>
<select name='president'>
<?php foreach($this->users as $u): ?>
<option value='<?php echo $u->getId(); ?>' <?php if ($this->object->getPresident() !== null && $this->object->getPresident()->getId() == $u->getId()) echo 'selected="selected"'; ?>>
<?php echo htmlentities("{$u->getName()}, {$u->getCity()}"); ?>
</option>
<?php endforeach; ?>
</select>
</td>
</tr>
<?php if(! $this->isNew): ?>
<tr>
<td>ID</td>
<td><?php echo $this->object->getId(); ?></td>
</tr>
<?php endif; ?>
</table>
<?php if(! $this->isNew): ?>
<h2>Angebote</h2>
<?php foreach($this->object->getOffers() as $oconf): ?>
<input type='checkbox' name='offers' value='<?php echo $oconf['offer']->getId(); ?>' <?php if($oconf['valid']) echo 'checked="checked"';?>>
<?php echo htmlentities($oconf['offer']->getName()); ?><br />
<?php endforeach; ?>
<h2>Posten</h2>
<table width='100%' class='table table-stiped, table-hover'>
<tr>
<th width='20%'>Rolle</th>
<th width='25%'>Name</th>
<th width='10%'>Stadt</th>
<th width='5%' style='text-align: center;'>Admin?</th>
<th></th>
<th width='5%'>ID</th>
</tr>
<?php foreach($this->object->getUsers() as $ua): ?>
<tr>
<td><?php echo htmlentities($ua->getPosition()->getName()); ?></td>
<td><?php echo htmlentities($ua->getUser()->getName()); ?></td>
<td><?php echo htmlentities($ua->getUser()->getCity()); ?></td>
<td style='text-align: center;'><?php if($ua->isAdmin()) echo "<span class='icon-checkmark'></span>"; ?></td>
<td>
<a href='#'><span class='icon-edit'></span></a>
<a href='#'><span class='icon-delete'></span></a>
</td>
<td><?php echo $ua->getId(); ?></td>
</tr>
<?php endforeach; ?>
</table>
<p><a href='#'><span class='icon-new'></span> Neuen Posten einf&uuml;gen</a></p>
<?php endif; ?>
<input type='submit' value='Speichern'> <br /><a href='<?php echo Route::_('index.php?option=com_clubs&view=clubs'); ?>'>Zur&uuml;ck zur &Uuml;bersicht</a>
</form>
<div style='width: 100vw; height: 100vh; position: fixed; left: 0pt; top: 0pt; z-index: 1000; border-style: solid; display: none;'><!-- Set body css 'overflow: fixed;' to avoid scolling in the backgound -->
<div style='background-color: gray; width: 100vw; height: 100vh; position: absolute; left: 0pt; top: 0pt; z-index: 1000; opacity: 0.5;'></div>
<div style='background-color: red; width: 70vw; height: 60vh; position: absolute; left: 15vw; top: 20vh; z-index: 1001; border-style: solid; visibility: visible; overflow: visible;'>Ein Test</div>
</div>