Ejemplo n.º 1
0
function outputRegForm($fromwidget = false)
{
    $form = new Registration_form();
    $success = '';
    $error = '';
    $option = get_option('pie_register_2');
    $registration_from_fields = '<div class="pieregformWrapper pieregWrapper"><style type="text/css">
.field_note{font-size:12px; color:#FF0000;}
.required{color:#FF0000}
</style>';
    $registration_from_fields .= '<div id="show_pie_register_error_js" class="piereg_entry-content"></div>';
    $registration_from_fields .= $form->addFormData();
    $IsWidgetForm = "";
    if ($fromwidget) {
        $IsWidgetForm = "widget_";
    }
    $registration_from_fields .= '<div id="pie_register_reg_form">';
    $registration_from_fields .= '<form enctype="multipart/form-data" id="pie_' . trim($IsWidgetForm) . 'regiser_form" method="post" action="' . $_SERVER['REQUEST_URI'] . '">';
    if ($form->countPageBreaks() > 1) {
        $registration_from_fields .= '<div class="piereg_progressbar"></div>';
    }
    $registration_from_fields .= '<ul id="pie_register">';
    $output = $form->printFields($fromwidget);
    $registration_from_fields .= $output;
    $registration_from_fields .= '</ul>	';
    $registration_from_fields .= '</form>';
    if ($form->pages > 1) {
        $registration_from_fields .= <<<EOL
\t<script type="text/javascript">
\tpieHideFields();
if(window.location.hash) 
{
\tvar hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character 
\tvar elms = document.getElementsByClassName('pageFields_'+hash);
\tfor(a = 0 ; a < elms.length ; a++)
\t{
\t\telms[a].style.display = "";\t
\t}   
} 
else 
{
    var elms = document.getElementsByClassName('pageFields_1');
\tfor(a = 0 ; a < elms.length ; a++)
\t{
\t\telms[a].style.display = "";\t
\t}   
}


</script>
EOL;
    }
    if ($form->countPageBreaks() > 1) {
        $registration_from_fields .= PieRegister::piereg_ProgressBarScripts($form->countPageBreaks());
    }
    $registration_from_fields .= '</div></div>';
    return $registration_from_fields;
}
Ejemplo n.º 2
0
if (isset($_POST['success']) && $_POST['success'] != "") {
    echo '<p class="piereg_message">' . apply_filters('piereg_messages', __($_POST['success'], "piereg")) . '</p>';
}
if (sizeof($errors->errors) > 0) {
    foreach ($errors->errors as $err) {
        $error .= $err[0] . "<br />";
    }
    echo '<p class="piereg_login_error">' . apply_filters('piereg_messages', __($error, "piereg")) . '</p>';
}
echo $form->addFormData();
if ($form->countPageBreaks() > 1) {
    ?>
<div class="pieregformWrapper">
<div class="piereg_progressbar"></div>
<?php 
    echo PieRegister::piereg_ProgressBarScripts($form->countPageBreaks());
}
?>
<form enctype="multipart/form-data" id="pie_regiser_form" method="post" action="<?php 
echo $_SERVER['REQUEST_URI'];
?>
">
  <ul id="pie_register">
    <?php 
echo $form->printFields();
?>
  </ul>
</form>
</div>
<script type="text/javascript">
wp_custom_login_remove_element('wp-admin-css');