Skip to content
Snippets Groups Projects
Commit e01c8121 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Add new Helper file. Missing from 6c12ee.

parent ef244df1
Branches
Tags archive/issue/5580
No related merge requests found
<?php
/**
* Recaptcha view helper
*
* PHP version 5
*
* Copyright (C) Villanova University 2010.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @category VuFind
* @package View_Helpers
* @author Chris Hallberg <crhallberg@gmail.com>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development Wiki
*/
namespace VuFind\View\Helper\Bootstrap3;
/**
* Recaptcha view helper
*
* @category VuFind
* @package View_Helpers
* @author Chris Hallberg <crhallberg@gmail.com>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development Wiki
*/
class Recaptcha extends \VuFind\View\Helper\Root\Recaptcha
{
/**
* Wrap in bootstrap 3-9 columns. Generate <div> with ReCaptcha from render.
*
* @param boolean $useRecaptcha Boolean of active state, for compact templating
*
* @return string $html
*/
public function html($useRecaptcha = true)
{
if (!isset($useRecaptcha) || !$useRecaptcha) {
return false;
}
return '<div class="form-group">' .
'<div class="col-sm-9 col-sm-offset-3">' .
$this->recaptcha->getHtml() .
'</div>' .
'</div>';
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment