Revize 2194
Přidáno uživatelem Ondřej Fibich před asi 11 roky(ů)
freenetis/branches/1.1/application/controllers/connection_requests.php | ||
---|---|---|
|
||
if ($this->acl_check_view('Connection_Requests_Controller', 'request'))
|
||
{
|
||
// if an admin added a member before, select this member in dropdown
|
||
$selected_mid = $this->session->get('last_added_member_id', $this->member_id);
|
||
|
||
$form->dropdown('member_id')
|
||
->label('Connection owner')
|
||
->options(ORM::factory('member')->select_list())
|
||
->selected($this->member_id)
|
||
->options(ORM::factory('member')->select_list_grouped())
|
||
->selected($selected_mid)
|
||
->rules('required')
|
||
->style('width:200px');
|
||
}
|
||
... | ... | |
|
||
$form->dropdown('member_id')
|
||
->label('Connection owner')
|
||
->options(ORM::factory('member')->select_list())
|
||
->options(ORM::factory('member')->select_list_grouped())
|
||
->selected($cr_model->member_id)
|
||
->rules('required')
|
||
->style('width:200px');
|
freenetis/branches/1.1/application/controllers/members.php | ||
---|---|---|
// commit transaction
|
||
$member->transaction_commit();
|
||
status::success('Member has been successfully added.');
|
||
|
||
// add information about last added member by logged user
|
||
// for selecting member in dropdown for connection request
|
||
$this->session->set('last_added_member_id', $member->id);
|
||
|
||
// redirect
|
||
url::redirect('members/show/'.$member->id);
|
Také k dispozici: Unified diff
Upravy:
- vylepseni dropdownu pri pridavani a editaci zadosti o pripojeni (shluknuti, razeni dle prijmeni)
- pokud pred pridanim zadosti o pripojeni prihlaseny uzivatel prida clena, je mu vybran jako vlastnik pripojeni tento clen (ID posledniho pridaneho clena ulozeno v session)