Location: PHPKode > projects > Joomla SEF / SEO - extending OpenSEF > admin/form.tpl.php
<script type="text/javascript" src="<?php echo $GLOBALS['mosConfig_live_site']; ?>/administrator/components/com_sef/includes/js/common.js"></script>
<script language="javaScript" type="text/javascript">
  function submitbutton2(pressbutton) {
    var form = document.adminForm;
    if (pressbutton == 'cancel') {
      submitbutton(pressbutton);
      return;
    }
    <?php
      if (!empty( $this->validation ) && is_array( $this->validation )):
        foreach ($this->validation as $field => $msg):
    ?>
    if (form.<?php echo $field ?>.value == '') {
      alert('<?php echo $msg ?>');
      return;
    }
    <?php
        endforeach;
      endif;
    ?>
    submitbutton(pressbutton);
  }
</script>
<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%">
      <div class="toolbar-box">
        <div class="toolbar-pad">
          <div class="toolbar" id="toolbar">
            <table class="toolbar">
              <tr>
                <td class="button" id="toolbar-save">
                  <a class="toolbar" href="javascript:submitbutton2('save')">
                  <div class="icon-32-save" title="Save">
                  </div>
                  <?php echo _T( 'SAVE' ) ?>
                  </a>
                </td>
                <?php if (mosGetParam( $_REQUEST, 'act', '' ) == 'config') { ?>
                <td class="button" id="toolbar-back">
                  <a class="toolbar" href="javascript:window.history.back();">
                  <div class="icon-32-back" title="Back">
                  </div>
                  <?php echo _T( 'BACK' ) ?>
                  </a>
                </td>
                <?php } else { ?>
                <td class="button" id="toolbar-cancel">
                  <a class="toolbar" href="javascript:submitbutton2('cancel');">
                  <div class="icon-32-cancel" title="Cancel"></div>
                  <?php echo _T( 'CANCEL' ) ?>
                  </a>
                </td>
                <?php } ?>
              </tr>
            </table>
          </div>
          <div class="header icon-48-<?php echo (!empty( $this->icon ) ? $this->icon : 'edit') ?>">
            &nbsp;<?php echo ($this->title ? $this->title : _T( 'APP_NAME' )) ?>
          </div>
          <div class="clr"></div>
        </div>
        <div class="clr"></div>
      </div>
    </td>
  </tr>
</table>
<div class="spacer"></div>
<div class="clr"></div>
<div class="submenu-box">
  <div class="submenu-pad">
    <ul id="submenu">
      <?php if ($this->act == 'sites' ) { ?>
        <li class="item-smenu"><a id="details" class="active"><?php echo _T( 'DETAILS' ) ?></a></li>
        <li class="item-smenu"><a id="<?php  echo strtolower(strtr(_T( 'OVERRIDES' )," ","-")) ?>"><?php  echo _T( 'OVERRIDES' ) ?></a></li>
        <li class="item-smenu"><a id="<?php  echo strtolower(strtr(_T( 'COMPONENTS' )," ","-")) ?>"><?php echo _T( 'COMPONENTS' ) ?></a></li>
      <?php } ?>
      <?php if ($this->act == 'aliases' ) { ?>
        <li class="item-smenu"><a id="details" class="active"><?php echo _T( 'DETAILS' ) ?></a></li>
        <li class="item-smenu"><a id="<?php echo strtolower(strtr(_T( 'ADVANCED' )," ","-")) ?>"><?php  echo _T( 'ADVANCED' ) ?></a></li>
        <li class="item-smenu"><a id="<?php echo strtolower(strtr(_T( 'PLUGIN_WBSEO' )," ","-")) ?>"><?php  echo _T( 'PLUGIN_WBSEO' ) ?></a></li>
      <?php } ?>
      <?php if ($this->act == 'config' ) { ?>
        <li class="item-smenu"><a id="details" class="active"><?php echo _T( 'BASIC' ) ?></a></li>
        <li class="item-smenu"><a id="<?php  echo strtolower(strtr(_T( 'SEF' )," ","-")) ?>"><?php  echo _T( 'SEF' ) ?></a></li>
        <li class="item-smenu"><a id="<?php  echo strtolower(strtr(_T( 'LANGCHAR' )," ","-")) ?>"><?php  echo _T( 'LANGCHAR' ) ?></a></li>
        <li class="item-smenu"><a id="<?php  echo strtolower(strtr(_T( 'COREALIAS' )," ","-")) ?>"><?php  echo _T( 'COREALIAS' ) ?></a></li>
        <li class="item-smenu"><a id="<?php  echo strtolower(strtr(_T( 'COMPONENTS' )," ","-")) ?>"><?php  echo _T( 'COMPONENTS' ) ?></a></li>
        <li class="item-smenu"><a id="<?php  echo strtolower(strtr(_T( 'FEATURES' )," ","-")) ?>"><?php  echo _T( 'FEATURES' ) ?></a></li>
        <li class="item-smenu"><a id="<?php  echo strtolower(strtr(_T( 'ADVANCED' )," ","-")) ?>"><?php  echo _T( 'ADVANCED' ) ?></a></li>
        <li class="item-smenu"><a id="<?php  echo strtolower(strtr(_T( 'GOOGLE' )," ","-")) ?>"><?php  echo _T( 'GOOGLE' ) ?></a></li>
        <li class="item-smenu"><a id="<?php  echo strtolower(strtr(_T( 'METATAG' )," ","-")) ?>"><?php  echo _T( 'METATAG' ) ?></a></li>
      <?php } ?>
    </ul>
    <div class="clr"></div>
  </div>
</div>
<div class="clr"></div>
<div class="spacer"></div>
<div class="element-box">
  <div class="element-pad">
    <form action="index2.php?option=com_sef&act=<?php echo $this->act ?>" method="post" name="adminForm">
      <div id="tab-document">
        <?php
          $pages =& $this->form;
          foreach ($pages as $title => $pageBody):
            $pageNo = (!isset($pageNo) ? 1 : $pageNo++);
            if ($title == _T('BASIC') OR $title == _T('DETAILS')) {
              $page ='details';
            } else {
              $page = strtolower(strtr(_T($title)," ","-"));
            }
            echo '<div id="page-'.$page.'">';
            echo '<table class="noshow"><tr><td>';
            if (is_array( $pageBody )):
              $restart = true;
              foreach ($pageBody as $title => $fields):
                if (is_array( $fields )):
                  include( $this->loadTemplate( 'form_fields.tpl.php' ) );
                  $restart = false;
                else:
                  if (!$restart) echo( '</tbody></table></fieldset></td></tr></table></div>' );
                  include( $this->loadTemplate( $fields . '.tpl.php' ) );
                  $restart = true;
                endif;
              endforeach;
              echo( ($restart ? '' : '</tbody></table></fieldset></td></tr></table></div>') );
            else:
              include( $this->loadTemplate( $pageBody . '.tpl.php' ) );
            endif;
          endforeach;
        ?>
        </tbody></table>
      <input type="hidden" name="id" value="<?php echo $this->id ?>" />
      <input type="hidden" name="option" value="<?php echo $this->option ?>" />
      <input type="hidden" name="act" value="<?php echo $this->act ?>" />
      <input type="hidden" name="task" value="<?php echo $this->task ?>" />
      <input type="hidden" name="boxchecked" value="0" />
Return current item: Joomla SEF / SEO - extending OpenSEF