<?php 
/**
 * @package    Contact Form
 * @author     Arrowthemes https://arrowthemes.com
 * @copyright  Copyright (C) 2016 Arrowthemes. All rights reserved.
 * @license    http://www.gnu.org/licenses/gpl.html GNU/GPL
 */

defined ('_JEXEC') or die;

?>  
    <div class="uk-grid" data-uk-grid-margin="">
      <div class="uk-width-medium-1-2">
      
        <?php if ( $params->get("pretext") != "" ) : ?>
        <?php echo $params->get("pretext"); ?>
        <?php endif; ?>

      </div>
  
      <div class="uk-width-medium-1-2">
        <form class="uk-form" method="post" action="<?php echo JRoute::_('index.php'); ?>">
          <div class="uk-grid uk-grid-small" data-uk-grid-margin>
              <div class="uk-width-medium-2-5">

                <?php if ( $params->get("field1_show") == 1 ) : ?>
                <div class="<?php if (trim($params->get ("field1_icon"))!= '') : ?>uk-form-icon<?php endif; ?>">
                    <?php if (trim($params->get ("field1_icon"))!= '') : ?><i class="uk-<?php echo $params->get ("field1_icon"); ?>"></i><?php endif; ?>
                    <input type="<?php echo $params->get ("field1_type"); ?>" name="field1" <?php if ($params->get("field1_required")) echo "required"; ?> placeholder="<?php echo $params->get ("field1_text"); ?>" id="field1_<?php echo $module->id; ?>" class="uk-width-1-1">
                </div>
                <?php endif; ?>

              </div>

              <div class="uk-width-medium-2-5">

                <?php if ( $params->get("field2_show") == 1 ) : ?>
                <div class="<?php if (trim($params->get ("field2_icon"))!= '') : ?>uk-form-icon<?php endif; ?>">
                    <?php if (trim($params->get ("field2_icon"))!= '') : ?><i class="uk-<?php echo $params->get ("field2_icon"); ?>"></i><?php endif; ?>
                    <input type="<?php echo $params->get ("field2_type"); ?>" name="field2" <?php if ($params->get("field2_required")) echo "required"; ?> placeholder="<?php echo $params->get ("field2_text"); ?>" id="field2_<?php echo $module->id; ?>" class="uk-width-1-1">
                </div>
                <?php endif; ?>
              
              </div>
              
              <div class="uk-width-medium-1-5">
                <div class="form-group uk-margin-remove"> 
                  <button type="submit" class="uk-button <?php echo $params->get("buttonclass"); ?>"><?php echo $params->get("buttontext"); ?></button>
                </div>
              </div>

          </div>

          <div class="uk-hidden">
              <label class="control-label" for="secure_<?php echo $module->id; ?>">Honeypot</label>
              <input type="text" name="secure" placeholder="<?php echo $params->get("honeypottext") ?>" id="secure_<?php echo $module->id; ?>" class="form-control">
          </div>

          <?php if ( $params->get("captcha") == 1 ) : ?> 
          <div class="form-group"> 
            <?php if ( $params->get("showlabelcaptcha") == 1 ) : ?>
              <label class="control-label" for="captcha_<?php echo $module->id; ?>"><?php echo $params->get("captchalabel"); ?></label>
            <?php endif; ?>
              <div id="dynamic_recaptcha_1" class="g-recaptcha" data-sitekey="<?php echo $params->get("captcha_sitekey"); ?>"></div>
          </div>
          <?php endif; ?>

          <?php echo JHtml::_( 'form.token' ); ?>                
          <input type="hidden" name="check" value="1">

        </form>
      </div>

    </div>

    <?php if ( $params->get("posttext") != "" ) : ?>
      <?php echo $params->get("posttext"); ?>
    <?php endif; ?>