[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

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

   1  <?php defined('_JEXEC') or die('Restricted access'); ?>
   2  
   3  <?php JHTML::_('behavior.tooltip'); ?>
   4  
   5  <?php
   6      // Set toolbar items for the page
   7      $edit        = JRequest::getVar('edit',true);
   8      $text = !$edit ? JText::_( 'New' ) : JText::_( 'Edit' );
   9      JToolBarHelper::title(   JText::_( 'Weblink' ).': <small><small>[ ' . $text.' ]</small></small>' );
  10      JToolBarHelper::save();
  11      if (!$edit)  {
  12          JToolBarHelper::cancel();
  13      } else {
  14          // for existing items the button is renamed `close`
  15          JToolBarHelper::cancel( 'cancel', 'Close' );
  16      }
  17      JToolBarHelper::help( 'screen.weblink.edit' );
  18  ?>
  19  
  20  <script language="javascript" type="text/javascript">
  21  	function submitbutton(pressbutton) {
  22          var form = document.adminForm;
  23          if (pressbutton == 'cancel') {
  24              submitform( pressbutton );
  25              return;
  26          }
  27  
  28          // do field validation
  29          if (form.title.value == ""){
  30              alert( "<?php echo JText::_( 'Weblink item must have a title', true ); ?>" );
  31          } else if (form.catid.value == "0"){
  32              alert( "<?php echo JText::_( 'You must select a category', true ); ?>" );
  33          } else if (form.url.value == ""){
  34              alert( "<?php echo JText::_( 'You must have a url.', true ); ?>" );
  35          } else {
  36              submitform( pressbutton );
  37          }
  38      }
  39  </script>
  40  <style type="text/css">
  41      table.paramlist td.paramlist_key {
  42          width: 92px;
  43          text-align: left;
  44          height: 30px;
  45      }
  46  </style>
  47  
  48  <form action="index.php" method="post" name="adminForm" id="adminForm">
  49  <div class="col width-50">
  50      <fieldset class="adminform">
  51          <legend><?php echo JText::_( 'Details' ); ?></legend>
  52  
  53          <table class="admintable">
  54          <tr>
  55              <td width="100" align="right" class="key">
  56                  <label for="title">
  57                      <?php echo JText::_( 'Name' ); ?>:
  58                  </label>
  59              </td>
  60              <td>
  61                  <input class="text_area" type="text" name="title" id="title" size="32" maxlength="250" value="<?php echo $this->weblink->title;?>" />
  62              </td>
  63          </tr>
  64          <tr>
  65              <td width="100" align="right" class="key">
  66                  <label for="alias">
  67                      <?php echo JText::_( 'Alias' ); ?>:
  68                  </label>
  69              </td>
  70              <td>
  71                  <input class="text_area" type="text" name="alias" id="alias" size="32" maxlength="250" value="<?php echo $this->weblink->alias;?>" />
  72              </td>
  73          </tr>
  74          <tr>
  75              <td valign="top" align="right" class="key">
  76                  <?php echo JText::_( 'Published' ); ?>:
  77              </td>
  78              <td>
  79                  <?php echo $this->lists['published']; ?>
  80              </td>
  81          </tr>
  82          <tr>
  83              <td valign="top" align="right" class="key">
  84                  <label for="catid">
  85                      <?php echo JText::_( 'Category' ); ?>:
  86                  </label>
  87              </td>
  88              <td>
  89                  <?php echo $this->lists['catid']; ?>
  90              </td>
  91          </tr>
  92          <tr>
  93              <td valign="top" align="right" class="key">
  94                  <label for="url">
  95                      <?php echo JText::_( 'URL' ); ?>:
  96                  </label>
  97              </td>
  98              <td>
  99                  <input class="text_area" type="text" name="url" id="url" value="<?php echo $this->weblink->url; ?>" size="32" maxlength="250" />
 100              </td>
 101          </tr>
 102          <tr>
 103              <td valign="top" align="right" class="key">
 104                  <label for="ordering">
 105                      <?php echo JText::_( 'Ordering' ); ?>:
 106                  </label>
 107              </td>
 108              <td>
 109                  <?php echo $this->lists['ordering']; ?>
 110              </td>
 111          </tr>
 112      </table>
 113      </fieldset>
 114  </div>
 115  <div class="col width-50">
 116      <fieldset class="adminform">
 117          <legend><?php echo JText::_( 'Parameters' ); ?></legend>
 118  
 119          <table class="admintable">
 120          <tr>
 121              <td colspan="2">
 122                  <?php echo $this->params->render();?>
 123              </td>
 124          </tr>
 125          </table>
 126      </fieldset>
 127  </div>
 128  
 129  <div class="col width-50">
 130      <fieldset class="adminform">
 131          <legend><?php echo JText::_( 'Description' ); ?></legend>
 132  
 133          <table class="admintable">
 134          <tr>
 135              <td>
 136                  <textarea class="text_area" cols="44" rows="9" name="description" id="description"><?php echo $this->weblink->description; ?></textarea>
 137              </td>
 138          </tr>
 139          </table>
 140      </fieldset>
 141  </div>
 142  <div class="clr"></div>
 143  
 144      <input type="hidden" name="option" value="com_weblinks" />
 145      <input type="hidden" name="cid[]" value="<?php echo $this->weblink->id; ?>" />
 146      <input type="hidden" name="task" value="" />
 147      <?php echo JHTML::_( 'form.token' ); ?>
 148  </form>


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