Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion customize signup / registration and make styling possible

Date: Fri, 26 Oct 2012 19:47:11 -0700 (PDT)
From: Alexey Lunacharsky <alexey.lunachar...@gmail.com>
To: liftweb@googlegroups.com
Message-Id: <14c3a705-d370-4446-b612-8ab59d28f7e3@googlegroups.com>
In-Reply-To: <f36c9520-3e06-4ea8-9d11-bf3ffa1be3a0@googlegroups.com>
References: <2786434a-f66c-4189-b2d9-451bd1176b45@googlegroups.com>
 <CAH6e9LipszoX=R2yD1kXHXBeWzMjpy-yiqCeJHVD=BwGpAtsBg@mail.gmail.com>
 <f36c9520-3e06-4ea8-9d11-bf3ffa1be3a0@googlegroups.com>
Subject: Re: [Lift] customize signup / registration and make styling
 possible
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1256_14801685.1351306031951"

------=_Part_1256_14801685.1351306031951
Content-Type: multipart/alternative; 
	boundary="----=_Part_1257_32919959.1351306031951"

------=_Part_1257_32919959.1351306031951
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable


  =20
   Hi, Matthias
  =20
   This code is to be put under the your snippet package:
  =20
   package org.example.lift.snippet
   object MySignupSnippet {
     def render =3D User.signupXhtml(new User)
   }


   E.g. having such a line in Boot.scala=20


   LiftRules.addToPackages("org.example.lift")


   path to the snippet source should be=20
   org/example/lift/snippet/MySignUpSnippet.scala
   (see here for details=20
   http://simply.liftweb.net/index-3.1.html#toc-Section-3.1)


   After you have snippet code in the place, just put


   <div class=3D"lift:MySignupSnippet"/> anywhere in one of yours HTML=20
   templates, and that should do the trick.


   Lift knows where to look for the snippet by=20


   LiftRules.addToPackages("org.example.lift") above.


=D0=BF=D1=8F=D1=82=D0=BD=D0=B8=D1=86=D0=B0, 26 =D0=BE=D0=BA=D1=82=D1=8F=D0=
=B1=D1=80=D1=8F 2012 =D0=B3., 22:31:42 UTC+7 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=
=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Matthias Fenz=20
=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>
> Hi David,
>
> as I'm new to Lift, where shall I put this to? Also in User.scala? And ca=
n=20
> I call this by <lift:bind... oder <lift:embed... then?
>
> Thanks in advance,
> Matthias
>
> On Friday, October 26, 2012 5:20:57 PM UTC+2, David Pollak wrote:
>>
>> object MySignupSnippet {
>>   def render =3D User.signupXhtml(new User)
>> }
>>
>> On Fri, Oct 26, 2012 at 7:42 AM, Matthias Fenz <matthi...@gmail.com>wrot=
e:
>>
>>> Hi there,
>>>
>>> i'm trying to customize the signup table generated via ProtoUser to be=
=20
>>> able to embed it into a /signup page. At the moment, I can route to=20
>>> /user/sign_up where the default tableset appears, but it is just embedd=
ed=20
>>> in white space and i'm not able to adjust the styling of the surroundin=
g=20
>>> page.
>>>
>>> Is it possible to use this generated table as a kind of snippet and to=
=20
>>> embed it into another page, e.g. a /signup page (or however it may be=
=20
>>> named)?
>>>
>>> I modified my User.scala like this:
>>>
>>> override def signupXhtml(user: TheUserType) =3D {
>>>
>>>     <div class=3D"signUpBox">
>>>     <form method=3D"post" action=3D{S.uri}>
>>>        <table class=3D"testtable">
>>>          <tr>
>>>            <td colspan=3D"2" class=3D"signUpBoxHeader">{ S.??("sign.up"=
)=20
>>> }</td>
>>>          </tr>
>>>         {localForm(user, false, signupFields)}
>>>          <tr>
>>>            <td>&nbsp;</td>
>>>            <td><user:submit/></td>
>>>          </tr>
>>>         </table>
>>>     </form>
>>>     </div>
>>>   }
>>>
>>> Now I'm searching for any possibility to add this div "signUpBox" to an=
y=20
>>> other page...
>>>
>>> Every help or hint would be appreciated, thanks in advance everyone,
>>> Matthias
>>>
>>> --=20
>>> --=20
>>> Lift, the simply functional web framework: http://liftweb.net
>>> Code: http://github.com/lift
>>> Discussion: http://groups.google.com/group/liftweb
>>> Stuck? Help us help you:=20
>>> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>>> =20
>>> =20
>>> =20
>>>
>>
>>
>>
>> --=20
>> Telegram, Simply Beautiful CMS https://telegr.am
>> Lift, the simply functional web framework http://liftweb.net
>> Follow me: http://twitter.com/dpp
>> Blog: http://goodstuff.im
>>
>>
>> 
------=_Part_1257_32919959.1351306031951
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<ul style=3D"font-family: arial, sans-serif; ">Hi, Matthias<br><br>This cod=
e is to be put under the your snippet package:<br><br>package&nbsp;org.exam=
ple.lift.snippet<br>object MySignupSnippet {<br>&nbsp; def render =3D User.=
signupXhtml(new User)<br>}</ul><ul style=3D"font-family: arial, sans-serif;=
 ">E.g. having such a line in Boot.scala&nbsp;</ul><ul style=3D"font-family=
: arial, sans-serif; ">LiftRules.addToPackages("org.example.lift")</ul><ul =
style=3D"font-family: arial, sans-serif; ">path to the snippet source shoul=
d be org/example/lift/snippet/MySignUpSnippet.scala<br>(see here for detail=
s&nbsp;<a href=3D"http://simply.liftweb.net/index-3.1.html#toc-Section-3.1"=
>http://simply.liftweb.net/index-3.1.html#toc-Section-3.1</a>)</ul><ul styl=
e=3D"font-family: arial, sans-serif; ">After you have snippet code in the p=
lace, just put</ul><ul style=3D"font-family: arial, sans-serif; ">&lt;div c=
lass=3D"lift:MySignupSnippet"/&gt; anywhere in one of yours HTML templates,=
 and that should do the trick.</ul><ul style=3D"font-family: arial, sans-se=
rif; ">Lift knows where to look for the snippet by&nbsp;</ul><ul style=3D"f=
ont-family: arial, sans-serif; ">LiftRules.addToPackages("org.example.lift"=
) above.</ul><div><br></div>=D0=BF=D1=8F=D1=82=D0=BD=D0=B8=D1=86=D0=B0, 26 =
=D0=BE=D0=BA=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2012&nbsp;=D0=B3., 22:31:42 UTC+=
7 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C =
Matthias Fenz =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;">Hi David,<br><br>as I'm new to Lift, where shal=
l I put this to? Also in User.scala? And can I call this by &lt;lift:bind..=
. oder &lt;lift:embed... then?<br><br>Thanks in advance,<br>Matthias<br><br=
>On Friday, October 26, 2012 5:20:57 PM UTC+2, David Pollak wrote:<blockquo=
te class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1p=
x #ccc solid;padding-left:1ex">object MySignupSnippet {<div>&nbsp; def rend=
er =3D User.signupXhtml(new User)</div><div>}<br><br><div class=3D"gmail_qu=
ote">On Fri, Oct 26, 2012 at 7:42 AM, Matthias Fenz <span dir=3D"ltr">&lt;<=
a>matthi...@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hi there,<br><br>i'm trying to customize the=
 signup table generated via ProtoUser to be able to embed it into a /signup=
 page. At the moment, I can route to /user/sign_up where the default tables=
et appears, but it is just embedded in white space and i'm not able to adju=
st the styling of the surrounding page.<br>
<br>Is it possible to use this generated table as a kind of snippet and to =
embed it into another page, e.g. a /signup page (or however it may be named=
)?<br><br>I modified my User.scala like this:<br><br>override def signupXht=
ml(user: TheUserType) =3D {<br>
<br>&nbsp;&nbsp;&nbsp; &lt;div class=3D"signUpBox"&gt;<br>&nbsp;&nbsp;&nbsp=
; &lt;form method=3D"post" action=3D{S.uri}&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; &lt;table class=3D"testtable"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; &lt;td colspan=3D"2" class=3D"signUpBoxHeader"&gt;{=
 S.??("sign.up") }&lt;/td&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {localForm(user, false, signupFields)}<br>&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&amp;nbsp;&lt;/td=
&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td=
&gt;&lt;user:submit/&gt;&lt;/td&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; &lt;/tr&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/table&gt;<br>&nbsp;&nbsp;&n=
bsp; &lt;/form&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>&nbsp; }<br><br>No=
w I'm searching for any possibility to add this div "signUpBox" to any othe=
r page...<br><br>Every help or hint would be appreciated, thanks in advance=
 everyone,<br>
Matthias<span><font color=3D"#888888"><br>

<p></p>

-- <br>
-- <br>
Lift, the simply functional web framework: <a href=3D"http://liftweb.net" t=
arget=3D"_blank">http://liftweb.net</a><br>
Code: <a href=3D"http://github.com/lift" target=3D"_blank">http://github.co=
m/lift</a><br>
Discussion: <a href=3D"http://groups.google.com/group/liftweb" target=3D"_b=
lank">http://groups.google.com/<wbr>group/liftweb</a><br>
Stuck? Help us help you: <a href=3D"https://www.assembla.com/wiki/show/lift=
web/Posting_example_code" target=3D"_blank">https://www.assembla.com/wiki/<=
wbr>show/liftweb/Posting_example_<wbr>code</a><br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
</font></span></blockquote></div><br><br clear=3D"all"><div><br></div>-- <b=
r><div>Telegram, Simply Beautiful CMS <a href=3D"https://telegr.am" target=
=3D"_blank">https://telegr.am</a></div>Lift, the simply functional web fram=
ework <a href=3D"http://liftweb.net" target=3D"_blank">http://liftweb.net</=
a><div>
Follow me: <a href=3D"http://twitter.com/dpp" target=3D"_blank">http://twit=
ter.com/dpp</a><br>Blog: <a href=3D"http://goodstuff.im" target=3D"_blank">=
http://goodstuff.im</a><br></div><div><br></div><br>
</div>
</blockquote></blockquote>
------=_Part_1257_32919959.1351306031951--

------=_Part_1256_14801685.1351306031951--