Advertisement:

Author Topic: [Solved Tip] twitter-bootstrap and required fields  (Read 6941 times)

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
[Solved Tip] twitter-bootstrap and required fields
« on: April 24, 2014, 07:09:44 pm »
I see in forums there is a mash of resolutions for other themes, but I did not see one for the twitter theme.
has someone else done it for the locations at least (will you share the code?)

I will implement it in the updated version that is in github
« Last Edit: May 07, 2014, 08:19:46 pm by design »

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: twitter/bootstrap and required when registered plugin
« Reply #1 on: May 07, 2014, 08:18:53 pm »
you will need to style this according to your preference - this works when you are using the required when register plugin !!!
as it is not "core" can't put it on get hub



Code: [Select]
<?php
    
/*
     *      Osclass – software for creating and publishing online classified
     *                           advertising platforms
     *
     *                        Copyright (C) 2012 OSCLASS
     *
     *       This program is free software: you can redistribute it and/or
     *     modify it under the terms of the GNU Affero General Public License
     *     as published by the Free Software Foundation, either version 3 of
     *            the License, or (at your option) any later version.
     *
     *     This program is distributed in the hope that it will be useful, but
     *         WITHOUT ANY WARRANTY; without even the implied warranty of
     *        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     *             GNU Affero General Public License for more details.
     *
     *      You should have received a copy of the GNU Affero General Public
     * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
     */

    
osc_enqueue_script('jquery-validate');
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="<?php echo str_replace('_''-'osc_current_user_locale()); ?>">
<head>
<?php osc_current_web_theme_path('head.php'); ?>
<meta name="robots" content="noindex, nofollow" />
<meta name="googlebot" content="noindex, nofollow" />
</head>
<body>
<div class="container wrapper">
  <?php UserForm::js_validation(); ?>
  <?php osc_current_web_theme_path('header.php'); ?>
  <div class="row content">
    <div class="col-lg-3 content-left">
      <?php osc_current_web_theme_path('sidebar.php'); ?>
    </div>
    <div class="col-lg-9 content-right">
      <!-- Breadcrumb -->
      <?php
    
$breadcrumb osc_breadcrumb(''false);
    
if( $breadcrumb != '') { ?>

      <?php echo $breadcrumb?>
      <div class="clear"></div>
      <?php
    
}
?>

      <!-- Breadcrumb END -->
      <div class="row">
        <h1>
          <?php _e('Register an account for free''bootsnap_classic'); ?>
        </h1>
        <div class="col-lg-12">
          <div class="well">
            <ul id="error_list">
            </ul>
            <form class="form-horizontal" name="register" id="register" action="<?php echo osc_base_url(true); ?>" method="post" >
              <input type="hidden" name="page" value="register" />
              <input type="hidden" name="action" value="register_post" />
              <div class="form-group">
              <label class="col-sm-3" for="name">
                <?php _e('Name''bootsnap_classic'); ?>
              </label>
               <div class="col-sm-7"><?php UserForm::name_text(); ?></div>
              </div>
              <div class="form-group">
              <label class="col-sm-3" for="password">
                <?php _e('Password''bootsnap_classic'); ?>
              </label>
               <div class="col-sm-7"><?php UserForm::password_text(); ?></div>
              </div>
              <div class="form-group">
              <label class="col-sm-4" for="password">
                <?php _e('Re-type password''bootsnap_classic'); ?>
              </label>
              <div class="col-sm-6"><?php UserForm::check_password_text(); ?></div>
              <br />
              <p id="password-error" style="display:none;">
                <?php _e('Passwords don\'t match''bootsnap_classic'); ?>
                . </p>
                </div>
                <div class="form-group">
              <label class="col-sm-3" for="email">
                <?php _e('E-mail''bootsnap_classic'); ?>
              </label>
               <div class="col-sm-7"><?php UserForm::email_text(); ?></div>
              </div>
              <?php osc_run_hook('user_register_form'); ?>
              <?php osc_show_recaptcha('register'); ?>
              <button type="submit">
              <?php _e('Create''bootsnap_classic'); ?>
              </button>
             
  </div>
  <?php osc_current_web_theme_path('footer.php'); ?>
</div>
</body>
</html>