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

Changeset 854


Ignore:
Timestamp:
Nov 22, 2006, 9:09:48 PM (14 years ago)
Author:
ebihara
Message:

日記投稿確認画面から日記修正画面に戻った際、入力したカテゴリがフォームに反映されるようにした。

Location:
OpenPNE/branches/ebihara/dev_2_6/webapp/modules/pc
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/ebihara/dev_2_6/webapp/modules/pc/page/h_diary_add.php

    r810 r854  
    1515        $form_val['body'] = $requests['body'];
    1616        $form_val['public_flag'] = $requests['public_flag'];
     17        $form_val['category'] = $requests['category'];
    1718        // ----------
    1819
  • OpenPNE/branches/ebihara/dev_2_6/webapp/modules/pc/page/h_diary_edit.php

    r811 r854  
    1616        $body = $requests['body'];
    1717        $public_flag = $requests['public_flag'];
     18        $category = $requests['category'];
    1819        // ----------
    1920
     
    7778
    7879        //この日記のカテゴリリストを得る
    79         $this->set("category", db_diary_category_list4c_diary_id($target_c_diary_id));
     80        if ($category) {
     81            $category_list = array();
     82            foreach(explode(' ', $category) as $value) {
     83                if (empty($value)) {
     84                    break;
     85                }
     86                $category_list[] = array('c_diary_category_id' => 'dummy', 'category_name' => $value);
     87            }
     88            $this->set("category", $category_list);
     89        } else {
     90            $this->set("category", db_diary_category_list4c_diary_id($target_c_diary_id));
     91        }
    8092        //ユーザのカテゴリリスト
    8193        $this->set("category_list", db_diary_category_list4c_member_id($u));
  • OpenPNE/branches/ebihara/dev_2_6/webapp/modules/pc/templates/h_diary_add.tpl

    r835 r854  
    489489<td class="bg_02" align="left" valign="middle">
    490490<div style="padding:4px 3px;">
    491 <input type="text" name="category" id="category" size="40">
     491<input type="text" name="category" id="category" size="40" value="({$form_val.category})">
    492492<script>
    493493    var category = new diaryCategoryForm("category",
  • OpenPNE/branches/ebihara/dev_2_6/webapp/modules/pc/templates/h_diary_add_confirm.tpl

    r810 r854  
    280280<input type="hidden" name="body" value="({$form_val.body})">
    281281<input type="hidden" name="public_flag" value="({$form_val.public_flag})">
     282<input type="hidden" name="category" value="({$form_val.category})">
    282283<td class="padding_s"><input type="submit" class="submit" value=" 修  正 "></td>
    283284</form>
  • OpenPNE/branches/ebihara/dev_2_6/webapp/modules/pc/templates/h_diary_edit_confirm.tpl

    r811 r854  
    265265<input type="hidden" name="subject" value="({$form_val.subject})">
    266266<input type="hidden" name="body" value="({$form_val.body})">
     267<input type="hidden" name="category" value="({$form_val.category})">
    267268<td><input type="submit" class="submit" value=" 修  正 "></td>
    268269</form>
  • OpenPNE/branches/ebihara/dev_2_6/webapp/modules/pc/validate/page/h_diary_edit.ini

    r243 r854  
    1818required = 0
    1919caption = "公開範囲"
     20
     21[category]
     22type = "string"
     23default = ""
Note: See TracChangeset for help on using the changeset viewer.