Ignore:
Timestamp:
Oct 13, 2009, 9:07:50 AM (15 years ago)
Author:
LucMorizur
Message:

[Event Cats] Modify template/autolog_new.tpl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/admin/autolog_new.inc.php

    r4026 r4027  
    5656build_ec_lists(); // in evntcats_funcs.php
    5757
    58 $ec_prop_code = '';
    59 $ec_prop_user = '-1';
    60 $ec_prop_act1 = 'create';
     58$ec_lists['duplicable_codes'] = array();
     59
     60foreach ($ec_lists['ec_table'] as $ec_entry) {
     61  if (
     62    is_in($ec_entry['action'], 'ec_ok') and
     63    !is_in($ec_entry['action'], '_f_pb') and
     64    $ec_entry['forced'] == 'false'
     65  ) {
     66    $ec_lists['duplicable_codes'][$ec_entry['code']] = $ec_entry['user_id'];
     67  }
     68}
     69
     70$ec_def_vals = array();
     71
     72$ec_def_vals['code'] = '';
     73$ec_def_vals['user'] = '-1';
     74$ec_def_vals['act1'] = 'create';
     75$ec_def_vals['auto_code_dg_nb'] = read_ec_conf('auto_code_dg_nb');
    6176
    6277/*****************************************************************************
     
    6782  if (isset($_POST['ec_entry_sel'])) {
    6883    if (array_key_exists($_POST['ec_entry_sel'], $ec_lists['ec_table'])) {
    69       $ec_prop_code = $ec_lists['ec_table'][$_POST['ec_entry_sel']]['code'];
    70       $ec_prop_user = $ec_lists['ec_table'][$_POST['ec_entry_sel']]['user_id'];
    71       $ec_prop_act1 = $_POST['ec_entry_sel'];
     84      $ec_def_vals['code'] = $ec_lists['ec_table'][$_POST['ec_entry_sel']]['code'];
     85      $ec_def_vals['user'] = $ec_lists['ec_table'][$_POST['ec_entry_sel']]['user_id'];
     86      $ec_def_vals['act1'] = $_POST['ec_entry_sel'];
    7287    }
    7388    else {
     
    86101$template->assign('ec_ap_ok',$ec_ap_ok);
    87102$template->assign('ec_lists',$ec_lists);
    88 $template->assign('ec_prop_code',$ec_prop_code);
    89 $template->assign('ec_prop_user',$ec_prop_user);
    90 $template->assign('ec_prop_act1',$ec_prop_act1);
     103$template->assign('ec_def_vals',$ec_def_vals);
    91104
    92105?>
Note: See TracChangeset for help on using the changeset viewer.