[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/components/com_weblinks/views/weblink/tmpl/ -> form.php (source)

   1  <?php defined('_JEXEC') or die('Restricted access'); ?>
   2  <script language="javascript" type="text/javascript">
   3  function submitbutton(pressbutton)
   4  {
   5      var form = document.adminForm;
   6      if (pressbutton == 'cancel') {
   7          submitform( pressbutton );
   8          return;
   9      }
  10  
  11      // do field validation
  12      if (document.getElementById('jformtitle').value == ""){
  13          alert( "<?php echo JText::_( 'Weblink item must have a title', true ); ?>" );
  14      } else if (document.getElementById('jformcatid').value < 1) {
  15          alert( "<?php echo JText::_( 'You must select a category.', true ); ?>" );
  16      } else if (document.getElementById('jformurl').value == ""){
  17          alert( "<?php echo JText::_( 'You must have a url.', true ); ?>" );
  18      } else {
  19          submitform( pressbutton );
  20      }
  21  }
  22  </script>
  23  
  24  <form action="<?php echo $this->action ?>" method="post" name="adminForm" id="adminForm">
  25  <?php if ( $this->params->def( 'show_page_title', 1 ) ) : ?>
  26      <div class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
  27          <?php echo $this->escape($this->params->get('page_title')); ?>
  28      </div>
  29  <?php endif; ?>
  30  <table cellpadding="4" cellspacing="1" border="0" width="100%">
  31  <tr>
  32      <td width="10%">
  33          <label for="jformtitle">
  34              <?php echo JText::_( 'Name' ); ?>:
  35          </label>
  36      </td>
  37      <td width="80%">
  38          <input class="inputbox" type="text" id="jformtitle" name="jform[title]" size="50" maxlength="250" value="<?php echo $this->escape($this->weblink->title);?>" />
  39      </td>
  40  </tr>
  41  <tr>
  42      <td valign="top">
  43          <label for="jformcatid">
  44              <?php echo JText::_( 'Category' ); ?>:
  45          </label>
  46      </td>
  47      <td>
  48          <?php echo $this->lists['catid']; ?>
  49      </td>
  50  </tr>
  51  <tr>
  52      <td valign="top">
  53          <label for="jformurl">
  54              <?php echo JText::_( 'URL' ); ?>:
  55          </label>
  56      </td>
  57      <td>
  58          <input class="inputbox" type="text" id="jformurl" name="jform[url]" value="<?php echo $this->escape($this->weblink->url); ?>" size="50" maxlength="250" />
  59      </td>
  60  </tr>
  61  <tr>
  62      <td valign="top">
  63          <label for="jformpublished">
  64              <?php echo JText::_( 'Published' ); ?>:
  65          </label>
  66      </td>
  67      <td>
  68              <?php echo $this->lists['published']; ?>
  69      </td>
  70  </tr>
  71  <tr>
  72      <td valign="top">
  73          <label for="jformdescription">
  74              <?php echo JText::_( 'Description' ); ?>:
  75          </label>
  76      </td>
  77      <td>
  78          <textarea class="inputbox" cols="30" rows="6" id="jformdescription" name="jform[description]" style="width:300px"><?php echo $this->escape( $this->weblink->description);?></textarea>
  79      </td>
  80  </tr>
  81  <tr>
  82      <td class="key">
  83          <label for="jformordering">
  84              <?php echo JText::_( 'Ordering' ); ?>:
  85          </label>
  86      </td>
  87      <td>
  88          <?php echo $this->lists['ordering']; ?>
  89      </td>
  90  </tr>
  91  </table>
  92  
  93  <div>
  94      <button type="button" onclick="submitbutton('save')">
  95          <?php echo JText::_('Save') ?>
  96      </button>
  97      <button type="button" onclick="submitbutton('cancel')">
  98          <?php echo JText::_('Cancel') ?>
  99      </button>
 100  </div>
 101  
 102      <input type="hidden" name="jform[id]" value="<?php echo $this->weblink->id; ?>" />
 103      <input type="hidden" name="jform[ordering]" value="<?php echo $this->weblink->ordering; ?>" />
 104      <input type="hidden" name="jform[approved]" value="<?php echo $this->weblink->approved; ?>" />
 105      <input type="hidden" name="option" value="com_weblinks" />
 106      <input type="hidden" name="controller" value="weblink" />
 107      <input type="hidden" name="task" value="" />
 108      <?php echo JHTML::_( 'form.token' ); ?>
 109  </form>


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