ElkArte Community

Project Support => Support => Topic started by: Mrs. Chaos on June 26, 2018, 01:39:35 pm

Title: An empty line below the agreement checkbox
Post by: Mrs. Chaos on June 26, 2018, 01:39:35 pm
Hello!
Can I somehow put an empty line below the agreement checkbox with the "I accept the terms of the agreement" text in the Register.template.php?
I want to have some space before the privacy policy text begins.
Does it work with a  < br /> somewhere in between?

Code: [Select]
	if (!empty($context['agreement']))
{
echo '
<h2 class="category_header">', $txt['registration_agreement'], '</h2>
<div class="well">
<p>', $context['agreement'], '</p>
</div>';
}

if (!empty($context['privacy_policy']))
{
echo '
<h2 class="category_header">', $txt['registration_privacy_policy'], '
</h2>
<div class="well">
<p>', $context['privacy_policy'], '</p>
</div>';
}
 
Title: Re: An empty line below the agreement checkbox
Post by: emanuele on June 26, 2018, 05:40:51 pm
Code: [Select]
		echo '
<br />
<h2 class="category_header">', $txt['registration_privacy_policy'], '
Should do.
Not nice, but should work.
Title: Re: An empty line below the agreement checkbox
Post by: Mrs. Chaos on June 27, 2018, 05:25:20 am
No, it doesn't work.
I even tried it with two line breaks.
Title: Re: An empty line below the agreement checkbox
Post by: emanuele on June 27, 2018, 06:17:10 am
If you have it in place, could you send me a link?
Title: Re: An empty line below the agreement checkbox
Post by: emanuele on June 27, 2018, 07:14:30 am
Ahhh... you are showing agreement and privacy policy in the same page as the registration form, the one you posted above if the one that shows agreement and PP on a page before the registration form!
For that you have to work on:
Code: [Select]
					', $txt['checkbox_agreement'], '
</label>
<div id="privacypol_box">
', $context['privacy_policy'], '
between the closing label and opening div.

Actually, though, you could even just use some css:
Code: [Select]
#privacypol_box {
    margin-top: 2em;
}
or something like that.
Title: Re: An empty line below the agreement checkbox
Post by: Mrs. Chaos on June 27, 2018, 08:50:42 am
Thank you!  I did it with the css.
In the  index.css  I found this part and added the  margin-top: 2em;  into it.

Code: [Select]
#agreement_box, #privacypol_box {
overflow-y: scroll;
margin-bottom: 2em;
margin-top: 2em;
padding: 8px;
height: 180px;
border: 1px solid;
text-align: justify;
}
Title: Re: An empty line below the agreement checkbox
Post by: emanuele on June 27, 2018, 12:51:24 pm
I would always suggest to use custom.css instead of editing index.css, but at least it works. :)