Your IP : 216.73.216.85


Current Path : /home/smartconb/www/armencom33/tmp/install_6756c2cce8819/fields/
Upload File :
Current File : /home/smartconb/www/armencom33/tmp/install_6756c2cce8819/fields/s2semail.php

<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('text');

/**
 * Form Field class for the Joomla Platform.
 * Provides and input field for e-mail addresses
 *
 * @link   http://www.w3.org/TR/html-markup/input.email.html#input.email
 * @see    JFormRuleEmail
 * @since  11.1
 */
class JFormFields2semail extends JFormFieldText
{
    /**
     * The form field type.
     *
     * @var    string
     * @since  11.1
     */
    protected $type = 's2semail';

    /**
     * Method to get the field input markup for e-mail addresses.
     *
     * @return  string  The field input markup.
     *
     * @since   11.1
     */
    protected function getInput()
    {
        // Translate placeholder text
        $hint = $this->translateHint ? JText::_($this->hint) : $this->hint;

        // Initialize some field attributes.
        $size         = !empty($this->size) ? ' size="' . $this->size . '"' : '';
        $maxLength    = !empty($this->maxLength) ? ' maxlength="' . $this->maxLength . '"' : '';
        $class        = !empty($this->class) ? ' class="validate-email ' . $this->class . '"' : ' class="validate-email"';
        $readonly     = $this->readonly ? ' readonly' : '';
        $disabled     = $this->disabled ? ' disabled' : '';
        $required     = $this->required ? ' required aria-required="true"' : '';
        $hint         = $hint ? ' placeholder="' . $hint . '"' : '';
        $autocomplete = !$this->autocomplete ? ' autocomplete="off"' : ' autocomplete="' . $this->autocomplete . '"';
        $autocomplete = $autocomplete == ' autocomplete="on"' ? '' : $autocomplete;
        $autofocus    = $this->autofocus ? ' autofocus' : '';
        $multiple     = $this->multiple ? ' multiple' : '';
        $spellcheck   = $this->spellcheck ? '' : ' spellcheck="false"';

        // Initialize JavaScript field attributes.
        $onchange = $this->onchange ? ' onchange="' . $this->onchange . '"' : '';

        // Including fallback code for HTML5 non supported browsers.
        $jversion = new JVersion();
        if($jversion->RELEASE >= "3.0"){
            JHtml::_('jquery.framework');
            JHtml::_('script', 'system/html5fallback.js', false, true);
            return '<div class="input-append"><input type="email" name="' . $this->name . '"' . $class . ' id="' . $this->id . '" value="'
            . htmlspecialchars(JStringPunycode::emailToUTF8($this->value), ENT_COMPAT, 'UTF-8') . '"' . $spellcheck . $size . $disabled . $readonly
            . $onchange . $autocomplete . $multiple . $maxLength . $hint . $required . $autofocus . ' /><button class="btn" type="button" onclick="Joomla.submitbutton(\'plugin.apply\')">'.JText::_('SOCIAL2S_LICENSE_EMAIL_GO').'</button></div>';
        }else{
            return '<div class="input-append"><input type="email" name="' . $this->name . '"' . $class . ' id="' . $this->id . '" value="'
            . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . $spellcheck . $size . $disabled . $readonly
            . $onchange . $autocomplete . $multiple . $maxLength . $hint . $required . $autofocus . ' /><button class="btn" type="button" onclick="Joomla.submitbutton(\'plugin.apply\')">'.JText::_('SOCIAL2S_LICENSE_EMAIL_GO').'</button></div>';
        }


        
    }
}