Then I set up <%args> section as so:<%attr> http_title => 'Welcome' # Invalid user name or password OR username deleted from table 101 => 'Invalid username or password' # No cookie sent to server 201 => 'An error has occured' # The session id from cookie was invalid 301 => 'An error has occured'
Then from autohandler I clear the gunk out and make a code request:<%args> $name_user => undef $error => undef </%args>
Then inside of /index.html:$m->clear_buffer; $m->subexec('/index.html', error => 301 ); $m->abort;
Working for the time being, any better ideas? I usually follow MVC to a good extent.<%method .non_auth> <div class="small_text"> <h1> <% $m->base_comp->attr_if_exists( $m->request_args->{'error'} ) +|h%>. You are not logged in. </h1> If you don't have a login, Click <a href="/create_user.html">here< +/a> to create one. </div> <form method="post" action="/index.html"> <table class="form_fields"> <tr> <td>User Name: </td> <td><input type="text" name="name_user" /></td> </tr> <tr> <td>Password: </td> <td><input type="password" name="password" value="" alt="Requi +red only for admins"/></td> </tr> </table> <div style="text-align:right"> <input type="submit" value="Proceed" /> </div> </form> </%method>
In reply to Re: Seperating logic from web display using mason
by EvanCarroll
in thread Problem with Mason, can it be solved with a subrequest?
by EvanCarroll
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |