ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 12022


Ignore:
Timestamp:
Jun 25, 2009, 2:47:40 PM (11 years ago)
Author:
ShogoKawahara
Message:

#4024:fixed NavigationForm? doesn't save url at change

Location:
OpenPNE3/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/pc_backend/modules/navigation/actions/actions.class.php

    r11834 r12022  
    4747        $this->list[$type][] = new NavigationForm($nav);
    4848      }
    49       $this->list[$type][] = new NavigationForm();
     49      $nav = new Navigation();
     50      $nav->setType($type);
     51      $this->list[$type][] = new NavigationForm($nav);
    5052    }
    5153  }
     
    5961  {
    6062    $nav = $request->getParameter('nav');
    61 
    6263    $this->forward404Unless(isset($nav['id']));
    6364    $model = Doctrine::getTable('Navigation')->find($nav['id']);
  • OpenPNE3/trunk/apps/pc_backend/modules/navigation/templates/listSuccess.php

    r11834 r12022  
    1919<tbody id="type_<?php echo str_replace(' ', '_', $type) ?>_<?php echo $form->getObject()->getId() ?>"<?php if (!$form->isNew()) : ?> class="sortable"<?php endif; ?>>
    2020<tr>
    21 <td><form action="<?php echo url_for('navigation/edit?app='.$sf_request->getParameter('app', 'pc')) ?>" method="post">
     21<form action="<?php echo url_for('navigation/edit?app='.$sf_request->getParameter('app', 'pc')) ?>" method="post">
     22<td>
    2223<?php echo $form->renderHiddenFields() ?>
    2324<?php echo $form['uri']->render() ?></td>
    24 <td><?php echo $form['ja_JP']['caption']->render() ?><?php echo $form['type']->render(array('value' => $type)) ?></td>
     25<td><?php echo $form['ja_JP']['caption']->render() ?></td>
    2526<?php if ($form->isNew()) : ?>
    26 <td colspan="2"><input type="submit" value="<?php echo __('追加') ?>" /></form></td>
     27<td colspan="2"><input type="submit" value="<?php echo __('追加') ?>" /></td>
     28</form>
    2729<?php else : ?>
    28 <td><?php echo $form['id']->render() ?>
    29 <input type="submit" value="<?php echo __('編集') ?>" /></form></td>
    30 <td><form action="<?php echo url_for('navigation/delete?app='.$sf_request->getParameter('app', 'pc').'&id=' . $form->getObject()->getId()) ?>" method="post" /><input type="submit" value="<?php echo __('削除') ?>" /></form></td>
     30<td><input type="submit" value="<?php echo __('編集') ?>" /></td>
     31</form>
     32<td><form action="<?php echo url_for('navigation/delete?app='.$sf_request->getParameter('app', 'pc').'&id='.$form->getObject()->getId()) ?>" method="post" /><input type="submit" value="<?php echo __('削除') ?>" /></form></td>
    3133<?php endif; ?>
    3234</tr>
  • OpenPNE3/trunk/lib/form/doctrine/NavigationForm.class.php

    r11834 r12022  
    2121    $this->embedI18n(array('ja_JP'));
    2222
    23     unset($this['created_at'], $this['updated_at']);
     23    unset($this['sort_order'], $this['created_at'], $this['updated_at']);
    2424  }
    2525
     
    2828    $nav = parent::updateObject($values);
    2929
    30     if (!$nav->getSortOrder())
     30    if ($this->isNew())
    3131    {
    3232      $maxSortOrder = 0;
Note: See TracChangeset for help on using the changeset viewer.