OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / templates / pwc007_music / html / com_contact / contact / default_form.php
1 <?php
2 defined( '_JEXEC' ) or die( 'Restricted access' );
3 ?>
4 <?php if(isset($this->error)) : ?>
5 <tr>
6         <td><?php echo $this->error; ?></td>
7 </tr>
8 <?php endif; ?>
9 <tr>
10         <td colspan="2">
11         <br /><br />
12 <?php
13         $script = '<!--
14                 function validateForm( frm ) {
15                         var valid = document.formvalidator.isValid(frm);
16                         if (valid == false) {
17                                 // do field validation
18                                 if (frm.email.invalid) {
19                                         alert( "' . JText::_( 'Please enter a valid e-mail address.', true ) . '" );
20                                 } else if (frm.text.invalid) {
21                                         alert( "' . JText::_( 'CONTACT_FORM_NC', true ) . '" );
22                                 }
23                                 return false;
24                         } else {
25                                 frm.submit();
26                         }
27                 }
28                 // -->';
29         $document =& JFactory::getDocument();
30         $document->addScriptDeclaration($script);
31 ?>
32         <form action="<?php echo JRoute::_( 'index.php' );?>" method="post" name="emailForm" id="emailForm" class="form-validate">
33                 <div class="contact_email<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
34                         <label for="contact_name">
35                                 &nbsp;<?php echo JText::_( 'Enter your name' );?>:
36                         </label>
37                         <br />
38                         <input type="text" name="name" id="contact_name" size="30" class="inputbox" value="" />
39                         <br />
40                         <label id="contact_emailmsg" for="contact_email">
41                                 &nbsp;<?php echo JText::_( 'Email address' );?>:
42                         </label>
43                         <br />
44                         <input type="text" id="contact_email" name="email" size="30" value="" class="inputbox required validate-email" maxlength="100" />
45                         <br />
46                         <label for="contact_subject">
47                                 &nbsp;<?php echo JText::_( 'Message subject' );?>:
48                         </label>
49                         <br />
50                         <input type="text" name="subject" id="contact_subject" size="30" class="inputbox" value="" />
51                         <br /><br />
52                         <label id="contact_textmsg" for="contact_text">
53                                 &nbsp;<?php echo JText::_( 'Enter your message' );?>:
54                         </label>
55                         <br />
56                         <textarea cols="50" rows="10" name="text" id="contact_text" class="inputbox required"></textarea>
57                         <?php if ($this->contact->params->get( 'show_email_copy' )) : ?>
58                         <br />
59                                 <input type="checkbox" name="email_copy" id="contact_email_copy" value="1"  />
60                                 <label for="contact_email_copy">
61                                         <?php echo JText::_( 'EMAIL_A_COPY' ); ?>
62                                 </label>
63                         <?php endif; ?>
64                         <br />
65                         <br />
66                         <button class="button validate" type="submit"><?php echo JText::_('Send'); ?></button>
67                 </div>
68
69         <input type="hidden" name="option" value="com_contact" />
70         <input type="hidden" name="view" value="contact" />
71         <input type="hidden" name="id" value="<?php echo $this->contact->id; ?>" />
72         <input type="hidden" name="task" value="submit" />
73         <?php echo JHTML::_( 'form.token' ); ?>
74         </form>
75         <br />
76         </td>
77 </tr>