/**
     * print the edit form header
     * 
     * @return null
     */
    protected function print_header()
    {
        ?>
    <div class="wrap participants_db">
      <?php 
        Participants_Db::admin_page_heading();
        ?>
      <h3><?php 
        _e('Manage Database Fields', 'participants-database');
        ?>
</h3>
      <?php 
        Participants_Db::admin_message();
        ?>
      <h4><?php 
        _e('Field Groups', 'participants-database');
        ?>
:</h4>
      <div id="fields-tabs">
        <ul>
          <?php 
        $mask = '<span class="mask"></span>';
        foreach ($this->groups as $group) {
            echo '<li><a href="#' . $group . '" id="tab_' . $group . '">' . $this->group_titles[$group] . '</a>' . $mask . '</li>';
        }
        echo '<li class="utility"><a href="#field_groups">' . __('Field Groups', 'participants-database') . '</a>' . $mask . '</li>';
        echo '<li class="utility"><a href="#help">' . __('Help', 'participants-database') . '</a>' . $mask . '</li>';
        ?>
        </ul>
        <?php 
    }
Esempio n. 2
0
        if (isset($participant_values[$i])) {
            $hidden[$i] = $participant_values[$i];
        }
    }
    $section = '';
    ?>
  <div class="wrap admin-edit-participant">
    <h2><?php 
    echo $page_title;
    ?>
</h2>
    <?php 
    if (is_object(Participants_Db::$validation_errors)) {
        echo Participants_Db::$validation_errors->get_error_html();
    } else {
        Participants_Db::admin_message();
    }
    ?>
    <form method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
" enctype="multipart/form-data" autocomplete="off" >
      <?php 
    PDb_FormElement::print_hidden_fields($hidden);
    // get the columns and output form
    $readonly_columns = Participants_Db::get_readonly();
    foreach (Participants_db::get_column_atts('backend') as $column) {
        $id_line = '';
        $attributes = array();
        // set a new section
        if ($column->group != $section) {
 /**
  * sets an admin area error message
  * 
  * @param string $message the message to be dislayed
  * @param string $type the type of message: 'updated' (yellow) or 'error' (red)
  */
 public static function set_admin_message($message, $type = 'error')
 {
     if (is_admin()) {
         Participants_Db::$session->set('admin_message', array($message, $type));
         Participants_Db::$admin_message = $message;
         Participants_Db::$admin_message_type = $type;
     }
 }