Removed some bugs in Imlpementation of club's details
This commit is contained in:
parent
5ce47c288d
commit
f4f59dcc81
@ -23,7 +23,7 @@ class ClubsControllerClub extends AbstractClubsController
|
|||||||
'iban' => array('required'=>true, 'name'=>'IBAN', 'filter'=>'string'),
|
'iban' => array('required'=>true, 'name'=>'IBAN', 'filter'=>'string'),
|
||||||
'bic' => array('required'=>true, 'name'=>'BIC', 'filter'=>'string'),
|
'bic' => array('required'=>true, 'name'=>'BIC', 'filter'=>'string'),
|
||||||
'charitable' => array('skip_null_check'=>True),
|
'charitable' => array('skip_null_check'=>True),
|
||||||
'president' => array('required'=>true, 'name'=>'Vorsitzender', 'skip_null_check'=>True)
|
'president' => array('required'=>true, 'name'=>'Vorsitzender', 'skip_null_check'=>True, 'setter'=>'setPresidentId')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,4 +36,9 @@ class ClubsControllerClub extends AbstractClubsController
|
|||||||
|
|
||||||
$values['president'] = ClubsUser::loadUser((int)($values['president']));
|
$values['president'] = ClubsUser::loadUser((int)($values['president']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function filterPrePacking(&$values)
|
||||||
|
{
|
||||||
|
$values['president'] = $values['president']->getId();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
/**
|
/**
|
||||||
* @param string $address
|
* @param string $address
|
||||||
*/
|
*/
|
||||||
public function setAddress(string $address)
|
public function setAddress( $address)
|
||||||
{
|
{
|
||||||
$this->address = $address;
|
$this->address = $address;
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
/**
|
/**
|
||||||
* @param string $city
|
* @param string $city
|
||||||
*/
|
*/
|
||||||
public function setCity(string $city)
|
public function setCity($city)
|
||||||
{
|
{
|
||||||
$this->city = $city;
|
$this->city = $city;
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
/**
|
/**
|
||||||
* @param string $homapge
|
* @param string $homapge
|
||||||
*/
|
*/
|
||||||
public function setHomepage(string $homapge)
|
public function setHomepage($homapge)
|
||||||
{
|
{
|
||||||
$this->homepage = $homapge;
|
$this->homepage = $homapge;
|
||||||
}
|
}
|
||||||
@ -116,7 +116,7 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
/**
|
/**
|
||||||
* @param string $mail
|
* @param string $mail
|
||||||
*/
|
*/
|
||||||
public function setMail(string$mail)
|
public function setMail($mail)
|
||||||
{
|
{
|
||||||
$this->mail = $mail;
|
$this->mail = $mail;
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
/**
|
/**
|
||||||
* @param string $iban
|
* @param string $iban
|
||||||
*/
|
*/
|
||||||
public function setIban(string $iban)
|
public function setIban($iban)
|
||||||
{
|
{
|
||||||
$this->iban = $iban;
|
$this->iban = $iban;
|
||||||
}
|
}
|
||||||
@ -132,7 +132,7 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
/**
|
/**
|
||||||
* @param string $bic
|
* @param string $bic
|
||||||
*/
|
*/
|
||||||
public function setBic(string $bic)
|
public function setBic($bic)
|
||||||
{
|
{
|
||||||
$this->bic = $bic;
|
$this->bic = $bic;
|
||||||
}
|
}
|
||||||
@ -172,7 +172,7 @@ class ClubsClub extends AbstractClubsModel
|
|||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*/
|
*/
|
||||||
public function setName(string $name)
|
public function setName($name)
|
||||||
{
|
{
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
}
|
}
|
||||||
|
@ -54,10 +54,9 @@ defined('_JEXEC') or die;
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Vorsitzende/r</td>
|
<td>Vorsitzende/r</td>
|
||||||
<td>
|
<td>
|
||||||
<!-- <input type='text' name='president' value='<?php echo htmlentities($this->object->getName()); ?>'> -->
|
|
||||||
<select name='president'>
|
<select name='president'>
|
||||||
<?php foreach($this->users as $u): ?>
|
<?php foreach($this->users as $u): ?>
|
||||||
<option value='<?php echo $u->getId(); ?>' <?php if ($this->object->getPresident()->getId() == $u->getId()) echo 'selected="selected"'; ?>>
|
<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()}"); ?>
|
<?php echo htmlentities("{$u->getName()}, {$u->getCity()}"); ?>
|
||||||
</option>
|
</option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user