Skip to content

Commit

Permalink
Update HTML and CSS for the elastic skin (dont use <tr> on elastic); …
Browse files Browse the repository at this point in the history
…minor refactor.
  • Loading branch information
dsoares committed Nov 25, 2019
1 parent 463c796 commit 7ac00de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 10 additions & 5 deletions rcguard.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,17 @@ private function show_recaptcha($loginform)
}
else {
$html = $this->show_recaptcha_v2();

if (strpos($skin_path, '/elastic') !== false) {
$tag = '</table>';
$html = '<div class="form-group row">'.$html.'</div>';
} else {
$tag = '</tbody>';
$html = '<tr><td colspan="2">'.$html.'</td></tr>';
}

$loginform['content'] = str_ireplace(
'</tbody>', $html .'</tbody>', $loginform['content']
$tag, $tag . $html, $loginform['content']
);
}

Expand Down Expand Up @@ -309,10 +318,6 @@ private function show_recaptcha_v2($size=null)
$size?:$this->rc->config->get('recaptcha_size')
);

if ($size != 'invisible') {
$html = '<tr><td colspan="2">'.$html.'</td></tr>';
}

return $html;
}

Expand Down
1 change: 1 addition & 0 deletions skins/elastic/rcguard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.g-recaptcha {transform:scale(1.05);-webkit-transform:scale(1.05);transform-origin:0 0;-webkit-transform-origin:0 0}

0 comments on commit 7ac00de

Please sign in to comment.