Does anyone know any trick to replace the default Register Button in the register page with a custom image background which needs to appear on this particular element, not for other submit buttons ...?
I have been doing to some extensive make-over of Elgg these days. But, being stuck on a couple of small things.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Alexander Leschinsky@lazybadger

Alexander Leschinsky - 0 likes
- Shouvik Mukherjee@shouvik

Shouvik Mukherjee - 0 likes
- Shouvik Mukherjee@shouvik

Shouvik Mukherjee - 0 likes
You must log in to post replies.1. Create CSS-class for such button
2. Edit view, which contain reg-form and add class from p.1 to button definition
That is what seems to be a bit difficult in this particular case.
This is the Register form.
$username = get_input('u');
$email = get_input('e');
$name = get_input('n');
$admin_option = false;
if (($_SESSION['user']->admin) && ($vars['show_admin']))
$admin_option = true;
$form_body = "<small><br /></small><p><label style='padding-top:10px'>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name', 'class' => "general-textarea", 'value' => $name)) . "</label><small><br /></small>";
$form_body .= "<small><br /></small><label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email', 'class' => "general-textarea", 'value' => $email)) . "</label><small><br /></small>";
$form_body .= "<small><br /></small><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username', 'class' => "general-textarea", 'value' => $username)) . "</label><small><br /></small>";
$form_body .= "<small><br /></small><label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password', 'class' => "general-textarea")) . "</label<small><br /></small>";
$form_body .= "<small><br /></small><label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2', 'class' => "general-textarea")) . "</label><small>(again for verification)</small>";
// Add captcha hook
$form_body .= elgg_view('input/captcha');
if ($admin_option)
$form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
$form_body .= elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid']));
$form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode']));
$form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register'));
$form_body .= elgg_view( 'input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>";
?>
<table style="float: right;"><tr><td>
<div id="rg_profile">
<?php
echo "<div id=\"login-box\">";
$users = get_entities('user', '', 0, '', 6, 0, false, 0, null);
if($users){
foreach($users as $user){
echo "<div style=\"border:5px solid #01addb; width:125px; height:auto\" class=\"member_icon\">" .elgg_view("profile/icon",array('entity' => $user, 'size' => 'medium')) . "</div>";
}
}
echo "<div class=\"clearfloat\"></div>";
?>
</div>
</td></tr></table>
<div id="register-box">
<h2><i><?php echo elgg_echo('register'); ?></i></h2>
<?php echo elgg_view("input/form", array('action' => "{$vars['url']}action/register", 'body' => $form_body)) ?>
</div>
OK, I got it. :) It requires the CSS to be written right inside the register.php file.