Ignore:
Timestamp:
Dec 8, 2013, 12:18:15 PM (11 years ago)
Author:
chronos
Message:
  • Přidáno: Automaticky předvyplňovat u nově přidaných položek v podřízených seznamech rodičovskou položku.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/IS/IS.php

    r599 r602  
    173173      $Form = new Form($this->System->FormManager);
    174174      $Form->SetClass($Table);
     175      // Check preset name and value
     176      if(array_key_exists('pn', $_GET) and array_key_exists('pv', $_GET))
     177        $Form->Values[$_GET['pn']] = $_GET['pv'];
    175178      $Form->OnSubmit = '?a=add&t='.$Table.'&o=save';
    176179      $Output .= $Form->ShowEditForm();
     
    225228      $Output .= $this->ShowList($this->System->FormManager->FormTypes[$Item['Type']]['Table'], '`'.
    226229        $this->System->FormManager->FormTypes[$Item['Type']]['Ref'].'`='.$Id, $Item['Caption'],
    227         $this->System->FormManager->FormTypes[$Item['Type']]['Ref']).'<br/>';
     230        $this->System->FormManager->FormTypes[$Item['Type']]['Ref'], $Id).'<br/>';
    228231    }   
    229232    return($Output);
     
    416419  }   
    417420 
    418   function ShowList($Table, $Filter = '', $Title = '', $ExcludeColumn = ''
     421  function ShowList($Table, $Filter = '', $Title = '', $ExcludeColumn = '', $ExcludeValue = ''
    419422  {
    420423    if(defined('NEW_PERMISSION') and !$this->System->User->CheckPermission($this->TableToModule($Table), 'Read'))
     
    442445    $Output = $this->ShowTable($Table, $Filter, $Title, $RowActions, $ExcludeColumn);
    443446    $Output .= '<ul class="ActionMenu">';
    444     $Output .= '<li><a href="?a=add&amp;t='.$Table.'"><img alt="Přidat" title="Přidat" src="'.
     447    $Output .= '<li><a href="?a=add&amp;t='.$Table.'&amp;pn='.$ExcludeColumn.'&amp;pv='.$ExcludeValue.'"><img alt="Přidat" title="Přidat" src="'.
    445448      $this->System->Link('/images/add.png').'"/>Přidat</a></li>';
    446449    $Output .= '<li><a href="?a=list&amp;t='.$Table.'"><img alt="Seznam" title="Seznam" src="'.
Note: See TracChangeset for help on using the changeset viewer.