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

Changeset 10316


Ignore:
Timestamp:
Jan 22, 2009, 7:47:51 PM (11 years ago)
Author:
nagasawa
Message:

#3466:fixed added the error messages

Location:
OpenPNE3/plugins/opInviteFriendPlugin/trunk/apps/pc_frontend
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opInviteFriendPlugin/trunk/apps/pc_frontend/i18n/messages.ja.xml

    r10310 r10316  
    4343        <target>この人のURL:</target>
    4444      </trans-unit>
    45      </body>
     45      <trans-unit id="11">
     46        <source>Please select introduction place members</source>
     47        <target>紹介先メンバーを選択してください</target>
     48      </trans-unit>
     49      <trans-unit id="12">
     50        <source>Please input a message</source>
     51        <target>メッセージを入力してください</target>
     52      </trans-unit>
     53       </body>
    4654  </file>
    4755</xliff>
  • OpenPNE3/plugins/opInviteFriendPlugin/trunk/apps/pc_frontend/modules/invitefriend/actions/actions.class.php

    r10301 r10316  
    4444    }
    4545
     46    $this->invalid = 0;
    4647    if ($request->isMethod('post'))
    4748    {
    48       if ($request->getParameter('receive_list'))
     49      $this->invalid |= !$request->getParameter('receive_list') ? 1 : 0;
     50      $this->invalid |= !$request->getParameter('body') ? 2 : 0;
     51      if (!$this->invalid)
    4952      {
    50         if ($request->getParameter('body'))
    51         {
    52           InviteFriendPeer::sendMessageByList(
    53             $this->getUser()->getMemberId(),
    54             $request->getParameter('receive_list'),
    55             $request->getParameter('body'),
    56             $this->id
    57           );
    58           $this->redirect('member/profile?id=' . $this->id);
    59         }
    60         else
    61         {
    62           $this->bodyInvalid = true;
    63         }
    64       }
    65       else
    66       {
    67         $this->receiveInvalid = true;
     53        InviteFriendPeer::sendMessageByList(
     54          $this->getUser()->getMemberId(),
     55          $request->getParameter('receive_list'),
     56          $request->getParameter('body'),
     57          $this->id
     58        );
     59        $this->redirect('member/profile?id=' . $this->id);
    6860      }
    6961    }
  • OpenPNE3/plugins/opInviteFriendPlugin/trunk/apps/pc_frontend/modules/invitefriend/templates/indexInput.php

    r10301 r10316  
    22<div class="partsHeading"><h3><?php echo __('Introduce to your friends this member') ?></h3></div>
    33<div class="partsInfo">
    4 <p><?php echo __('Please choose the friend who wants to introduce this man from a list, and write the message to introduce.') ?></p>
     4<p>
     5<?php echo __('Please choose the friend who wants to introduce this man from a list, and write the message to introduce.') ?>
     6
     7<?php if ($invalid): ?>
     8
     9<br />
     10<ul>
     11<?php if ($invalid & 1): ?>
     12<li><?php echo __('Please select introduction place members') ?></li>
     13<?php endif ?>
     14<?php if ($invalid & 2): ?>
     15<li><?php echo __('Please input a message') ?></li>
     16<?php endif?>
     17</ul>
     18<?php endif ?>
     19
     20</p>
    521</div>
     22
    623<form method="post" action="">
    724<table>
Note: See TracChangeset for help on using the changeset viewer.