[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/components/com_contact/views/contact/tmpl/ -> default_form.php (source)

   1  <?php
   2  /** $Id: default_form.php 11917 2009-05-29 19:37:05Z ian $ */
   3  defined( '_JEXEC' ) or die( 'Restricted access' );
   4  
   5      $script = '<!--
   6  		function validateForm( frm ) {
   7              var valid = document.formvalidator.isValid(frm);
   8              if (valid == false) {
   9                  // do field validation
  10                  if (frm.email.invalid) {
  11                      alert( "' . JText::_( 'Please enter a valid e-mail address.', true ) . '" );
  12                  } else if (frm.text.invalid) {
  13                      alert( "' . JText::_( 'CONTACT_FORM_NC', true ) . '" );
  14                  }
  15                  return false;
  16              } else {
  17                  frm.submit();
  18              }
  19          }
  20          // -->';
  21      $document =& JFactory::getDocument();
  22      $document->addScriptDeclaration($script);
  23      
  24      if(isset($this->error)) : ?>
  25  <tr>
  26      <td><?php echo $this->error; ?></td>
  27  </tr>
  28  <?php endif; ?>
  29  <tr>
  30      <td colspan="2">
  31      <br /><br />
  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->escape($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>


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1