<?xml version="1.0"?>
<yep:description
    xmlns:ev="http://www.w3.org/2001/xml-events"
    xmlns:yep="http://www.entrouvert.org/namespaces/expression/0.0"
    xmlns:xforms="http://www.w3.org/2002/xforms">
 <xforms:model id="passwordAccountModel"
               schema="http://www.entrouvert.org/expression/schemas/PasswordAccount.xsd">
  <xforms:bind nodeset="yep:email" required="true()"/>
  <xforms:bind
      nodeset="yep:nextUrl" relevant="false()" type="xsd:anyURI"/>
  <xforms:submission action="file://tmp/abracadabra-put.xml" method="put" id="submit"/>
 </xforms:model>

 <yep:page name="edit" type="form">
  <yep:body>
   <xforms:group model="passwordAccountModel">
    <xforms:label yep:translatable="true">Password Account</xforms:label>
    <xforms:input ref="yep:email">
     <xforms:label yep:translatable="true">Email:</xforms:label>
    </xforms:input>
    <yep:componentWidget ref="yep:user">
     <xforms:label yep:translatable="true">User:</xforms:label>
    </yep:componentWidget>
   </xforms:group>
  </yep:body>
  <yep:actionButtonsBar>
   <yep:actionButton>
    <xforms:label yep:translatable="true">Modify</xforms:label>
    <yep:action>submit</yep:action>
   </yep:actionButton>
  </yep:actionButtonsBar>
 </yep:page>

 <yep:page name="login" type="form"
           pythonClass="expression.modules.passwordaccounts.LoginPage">
  <yep:body>
   <xforms:group model="passwordAccountModel">
    <xforms:label yep:translatable="true">Password Account</xforms:label>
    <xforms:input ref="yep:email">
     <xforms:label yep:translatable="true">Email:</xforms:label>
    </xforms:input>
    <xforms:secret ref="yep:password">
     <xforms:label yep:translatable="true">Password:</xforms:label>
    </xforms:secret>
    <xforms:input ref="yep:nextUrl">
     <xforms:label yep:translatable="true">Next URL:</xforms:label>
    </xforms:input>
   </xforms:group>
  </yep:body>
  <yep:actionButtonsBar>
   <yep:actionButton>
    <xforms:label yep:translatable="true">Login</xforms:label>
    <yep:action>submit</yep:action>
   </yep:actionButton>
   <yep:actionButton>
    <xforms:label yep:translatable="true">Send Password by Email</xforms:label>
    <yep:action>emailPassword</yep:action>
   </yep:actionButton>
  </yep:actionButtonsBar>
 </yep:page>

 <yep:page name="new" type="form"
           pythonClass="expression.modules.passwordaccounts.NewPage">
  <yep:body>
   <xforms:group model="passwordAccountModel">
    <xforms:label yep:translatable="true">Password Account</xforms:label>
    <xforms:input ref="yep:email">
     <xforms:label yep:translatable="true">Email:</xforms:label>
    </xforms:input>
    <xforms:input ref="yep:user/@src">
     <xforms:label yep:translatable="true">User:</xforms:label>
    </xforms:input>
   </xforms:group>
  </yep:body>
  <yep:actionButtonsBar>
   <yep:actionButton>
    <xforms:label yep:translatable="true">Create</xforms:label>
    <yep:action>submit</yep:action>
   </yep:actionButton>
  </yep:actionButtonsBar>
 </yep:page>

 <yep:body>
  <xforms:group model="passwordAccountModel">
   <xforms:label yep:translatable="true">Password Account</xforms:label>
   <xforms:input ref="yep:email">
    <xforms:label yep:translatable="true">Email:</xforms:label>
   </xforms:input>
   <xforms:secret ref="yep:password">
    <xforms:label yep:translatable="true">Password:</xforms:label>
   </xforms:secret>
   <yep:componentWidget ref="yep:user">
    <xforms:label yep:translatable="true">User:</xforms:label>
   </yep:componentWidget>
  </xforms:group>
 </yep:body>
 <yep:actionButtonsBar>
  <yep:actionButton>
   <xforms:label yep:translatable="true">Edit</xforms:label>
   <yep:action>edit</yep:action>
  </yep:actionButton>
 </yep:actionButtonsBar>

 <mail:message name="newAccountEmail"
               xmlns:mail="http://www.entrouvert.org/namespaces/email/0.0">
  <mail:from>expression@entrouvert.org</mail:from>
  <mail:to><xforms:output model="passwordAccountModel" ref="yep:email"/></mail:to>
  <mail:subject yep:translatable="true">New Expression account: <xforms:output model="passwordAccountModel" ref="yep:email"/></mail:subject>
  <mail:mixed>
   <mail:plain yep:translatable="true">Hello,

You have been registered to Expression &lt;http://expression.entrouvert.org/&gt;.

Your identifier:
Email:    <xforms:output model="passwordAccountModel" ref="yep:email"/>
Password: <xforms:output model="passwordAccountModel" ref="yep:password"/>
   </mail:plain>
   <html>
    <head>
     <title yep:translatable="true">New Expression account: <xforms:output model="passwordAccountModel" ref="yep:email"/></title>
    </head>
    <body yep:translatable="true">Hello,

<p>You have been registered to <a href="http://expression.entrouvert.org/">Expression</a>.</p>
<p>Your identifier:<br />
<ul>
 <li><xforms:output model="passwordAccountModel" ref="yep:email"><xforms:label>Email: </xforms:label></xforms:output></li>
 <li><xforms:output model="passwordAccountModel" ref="yep:password"><xforms:label>Password: </xforms:label></xforms:output></li>
</ul>
</p>
    </body>
   </html>
  </mail:mixed>
 </mail:message>

 <mail:message name="sendPasswordEmail"
               xmlns:mail="http://www.entrouvert.org/namespaces/email/0.0">
  <mail:from>expression@entrouvert.org</mail:from>
  <mail:to><xforms:output model="passwordAccountModel" ref="yep:email"/></mail:to>
  <mail:subject yep:translatable="true">Your Expression account: <xforms:output model="passwordAccountModel" ref="yep:email"/></mail:subject>
  <mail:mixed>
   <mail:plain yep:translatable="true">Hello,

You have requested your Expression &lt;http://expression.entrouvert.org/&gt;
account informations. (If you didn't request this email, please ignore it.)

Your identifier:
Email:    <xforms:output model="passwordAccountModel" ref="yep:email"/>
Password: <xforms:output model="passwordAccountModel" ref="yep:password"/>
   </mail:plain>
   <html>
    <head>
     <title yep:translatable="true">Your Expression account: <xforms:output model="passwordAccountModel" ref="yep:email"/></title>
    </head>
    <body yep:translatable="true">Hello,

<p>You have requested your <a href="http://expression.entrouvert.org/">Expression</a>account informations. (If you didn't request this email, please ignore it.)</p>
<p>Your identifier:<br />
<ul>
 <li><xforms:output model="passwordAccountModel" ref="yep:email"><xforms:label>Email: </xforms:label></xforms:output></li>
 <li><xforms:output model="passwordAccountModel" ref="yep:password"><xforms:label>Password: </xforms:label></xforms:output></li>
</ul>
</p>
    </body>
   </html>
  </mail:mixed>
 </mail:message>

</yep:description>
