[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/administrator/components/com_menus/views/item/tmpl/ -> form.php (source)

   1  <?php defined('_JEXEC') or die('Restricted access'); ?>
   2  
   3  <script language="javascript" type="text/javascript">
   4  <!--
   5  function submitbutton(pressbutton) {
   6      var form = document.adminForm;
   7      var type = form.type.value;
   8  
   9      if (pressbutton == 'cancelItem') {
  10          submitform( pressbutton );
  11          return;
  12      }
  13      if ( (type != "separator") && (trim( form.name.value ) == "") ){
  14          alert( "<?php echo JText::_( 'Item must have a title', true ); ?>" );
  15      }
  16      <?php if( $this->item->type == 'component' && isset($this->item->linkparts['option']) && $this->item->linkparts['option'] == 'com_newsfeeds' && isset($this->item->linkparts['view']) && $this->item->linkparts['view'] == 'category' ){ ?>
  17      else if( document.getElementById('urlparamsid').value == 0 ){
  18           alert( "<?php echo JText::_('Please select a Category', true ); ?>" );
  19      } <?php } ?>
  20      <?php if( $this->item->type == 'component' && isset($this->item->linkparts['option']) && $this->item->linkparts['option'] == 'com_weblinks' && isset($this->item->linkparts['view']) && $this->item->linkparts['view'] == 'category' ){ ?>
  21      else if( document.getElementById('urlparamsid').value == 0 ){
  22           alert( "<?php echo JText::_('Please select a Category', true ); ?>" );
  23      } <?php } ?>
  24      <?php if( $this->item->type == 'component' && isset($this->item->linkparts['option']) && $this->item->linkparts['option'] == 'com_newsfeeds' && isset($this->item->linkparts['view']) && $this->item->linkparts['view'] == 'newsfeed' ){ ?>
  25      else if( document.getElementById('urlparamsid').value == 0 ){
  26           alert( "<?php echo JText::_('Please select a Feed', true ); ?>" );
  27      } <?php } ?>
  28      <?php if( $this->item->type == 'component' && isset($this->item->linkparts['option']) && $this->item->linkparts['option'] == 'com_content' && isset($this->item->linkparts['view']) && $this->item->linkparts['view'] == 'category' ){ ?>
  29      else if( document.getElementById('urlparamsid').value == 0 ){
  30           alert( "<?php echo JText::_('Please select a Category', true ); ?>" );
  31      } <?php } ?>
  32      <?php if( $this->item->type == 'component' && isset($this->item->linkparts['option']) && $this->item->linkparts['option'] == 'com_content' && isset($this->item->linkparts['view']) && $this->item->linkparts['view'] == 'section' ){ ?>
  33      else if( document.getElementById('urlparamsid').value == 0 ){
  34           alert( "<?php echo JText::_('Please select a Section', true ); ?>" );
  35      } <?php } ?>
  36      <?php if( $this->item->type == 'component' && isset($this->item->linkparts['option']) && $this->item->linkparts['option'] == 'com_poll' && isset($this->item->linkparts['view']) && $this->item->linkparts['view'] == 'poll' ){ ?>
  37      else if( document.getElementById('urlparamsid').value == 0 ){
  38           alert( "<?php echo JText::_('Please select a Poll', true ); ?>" );
  39      } <?php } ?>
  40      <?php if( $this->item->type == 'component' && isset($this->item->linkparts['option']) && $this->item->linkparts['option'] == 'com_content' && isset($this->item->linkparts['view']) && $this->item->linkparts['view'] == 'article' && !isset($this->item->linkparts['layout']) ){ ?>
  41      else if( document.getElementById('id_id').value == 0 ){
  42          alert( "<?php echo JText::_('Please select an Article', true ); ?>" );
  43      } <?php } ?> else {
  44          submitform( pressbutton );
  45      }
  46  }
  47  //-->
  48  </script>
  49  <form action="index.php" method="post" name="adminForm">
  50      <table class="admintable" width="100%">
  51          <tr valign="top">
  52              <td width="60%">
  53                  <!-- Menu Item Type Section -->
  54                  <fieldset>
  55                      <legend>
  56                          <?php echo JText::_( 'Menu Item Type' ); ?>
  57                      </legend>
  58                      <div style="float:right">
  59                          <button type="button" onclick="location.href='index.php?option=com_menus&amp;task=type&amp;menutype=<?php echo htmlspecialchars($this->item->menutype);?><?php echo $this->item->expansion; ?>&amp;cid[]=<?php echo $this->item->id; ?>';">
  60                              <?php echo JText::_( 'Change Type' ); ?></button>
  61                      </div>
  62                      <h2><?php echo $this->name; ?></h2>
  63                      <div>
  64                          <?php echo $this->description; ?>
  65                      </div>
  66                  </fieldset>
  67                  <!-- Menu Item Details Section -->
  68                  <fieldset>
  69                      <legend>
  70                          <?php echo JText::_( 'Menu Item Details' ); ?>
  71                      </legend>
  72                      <table width="100%">
  73                          <?php if ($this->item->id) { ?>
  74                          <tr>
  75                              <td class="key" width="20%" align="right">
  76                                  <?php echo JText::_( 'ID' ); ?>:
  77                              </td>
  78                              <td width="80%">
  79                                  <strong><?php echo $this->item->id; ?></strong>
  80                              </td>
  81                          </tr>
  82                          <?php } ?>
  83                          <tr>
  84                              <td class="key" align="right">
  85                                  <?php echo JText::_( 'Title' ); ?>:
  86                              </td>
  87                              <td>
  88                                  <input class="inputbox" type="text" name="name" size="50" maxlength="255" value="<?php echo $this->item->name; ?>" />
  89                              </td>
  90                          </tr>
  91                          <tr>
  92                              <td class="key" align="right">
  93                                  <?php echo JText::_( 'Alias' ); ?>:
  94                              </td>
  95                              <td>
  96                                  <input class="inputbox" type="text" name="alias" size="50" maxlength="255" value="<?php echo $this->item->alias; ?>" />
  97                              </td>
  98                          </tr>
  99                          <tr>
 100                              <td class="key" align="right">
 101                                  <?php echo JText::_( 'Link' ); ?>:
 102                              </td>
 103                              <td>
 104                                  <input class="inputbox" type="text" name="link" size="50" maxlength="255" value="<?php echo $this->item->link; ?>" <?php echo $this->lists->disabled;?> />
 105                              </td>
 106                          </tr>
 107                          <tr>
 108                              <td class="key" align="right">
 109                                  <?php echo JText::_( 'Display in' ); ?>:
 110                              </td>
 111                              <td>
 112                                  <?php echo JHTML::_('select.genericlist',   $this->menutypes, 'menutype', 'class="inputbox" size="1"', 'menutype', 'title', $this->item->menutype );?>
 113                              </td>
 114                          </tr>
 115                          <tr>
 116                              <td class="key" align="right" valign="top">
 117                                  <?php echo JText::_( 'Parent Item' ); ?>:
 118                              </td>
 119                              <td>
 120                                  <?php echo MenusHelper::Parent( $this->item ); ?>
 121                              </td>
 122                          </tr>
 123                          <tr>
 124                              <td class="key" valign="top" align="right">
 125                                  <?php echo JText::_( 'Published' ); ?>:
 126                              </td>
 127                              <td>
 128                                  <?php echo $this->lists->published ?>
 129                              </td>
 130                          </tr>
 131                          <tr>
 132                              <td class="key" valign="top" align="right">
 133                                  <?php echo JText::_( 'Ordering' ); ?>:
 134                              </td>
 135                              <td>
 136                                  <?php echo JHTML::_('menu.ordering', $this->item, $this->item->id ); ?>
 137                              </td>
 138                          </tr>
 139                          <tr>
 140                              <td class="key" valign="top" align="right">
 141                                  <?php echo JText::_( 'Access Level' ); ?>:
 142                              </td>
 143                              <td>
 144                                  <?php echo JHTML::_('list.accesslevel',  $this->item ); ?>
 145                              </td>
 146                          </tr>
 147                          <?php if ($this->item->type != "menulink") : ?>
 148                          <tr>
 149                              <td class="key" valign="top" align="right">
 150                                  <?php echo JText::_( 'On Click, Open in' ); ?>:
 151                              </td>
 152                              <td>
 153                                  <?php echo MenusHelper::Target( $this->item ); ?>
 154                              </td>
 155                          </tr>
 156                          <?php endif; ?>
 157                      </table>
 158                  </fieldset>
 159              </td>
 160              <!-- Menu Item Parameters Section -->
 161              <td width="40%">
 162                  <?php
 163                      echo $this->pane->startPane("menu-pane");
 164                      echo $this->pane->startPanel(JText :: _('Parameters - Basic'), "param-page");
 165                      echo $this->urlparams->render('urlparams');
 166                      if(count($this->params->getParams('params'))) :
 167                          echo $this->params->render('params');
 168                      endif;
 169  
 170                      if(!count($this->params->getNumParams('params')) && !count($this->urlparams->getNumParams('urlparams'))) :
 171                          echo "<div style=\"text-align: center; padding: 5px; \">".JText::_('There are no parameters for this item')."</div>";
 172                      endif;
 173                      echo $this->pane->endPanel();
 174  
 175                      if($params = $this->advanced->render('params')) :
 176                          echo $this->pane->startPanel(JText :: _('Parameters - Advanced'), "advanced-page");
 177                          echo $params;
 178                          echo $this->pane->endPanel();
 179                      endif;
 180  
 181                      if ($this->comp && ($params = $this->comp->render('params'))) :
 182                          echo $this->pane->startPanel(JText :: _('Parameters - Component'), "component-page");
 183                          echo $params;
 184                          echo $this->pane->endPanel();
 185                      endif;
 186  
 187                      if ($this->sysparams && ($params = $this->sysparams->render('params'))) :
 188                          echo $this->pane->startPanel(JText :: _('Parameters - System'), "system-page");
 189                          echo $params;
 190                          echo $this->pane->endPanel();
 191                      endif;
 192                      echo $this->pane->endPane();
 193                  ?>
 194              </td>
 195          </tr>
 196      </table>
 197  
 198      <?php echo $this->item->linkfield; ?>
 199  
 200      <input type="hidden" name="option" value="com_menus" />
 201      <input type="hidden" name="id" value="<?php echo $this->item->id; ?>" />
 202      <input type="hidden" name="componentid" value="<?php echo $this->item->componentid; ?>" />
 203      <input type="hidden" name="type" value="<?php echo $this->item->type; ?>" />
 204      <input type="hidden" name="task" value="" />
 205      <?php echo JHTML::_( 'form.token' ); ?>
 206  </form>


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