Permalink
Browse files

Put login/register links on register/login dialogs, respectively

  • Loading branch information...
zachmullen committed Mar 19, 2012
1 parent bc9e4ef commit e67553bab43ff773f0399f6cf0f299c7d656d730
Showing with 8 additions and 0 deletions.
  1. +2 −0 public/js/extension/extension.view.js
  2. +6 −0 views/extension/view.phtml
@@ -10,6 +10,7 @@ midas.slicerappstore.doLogin = function () {
var content = $('#loginFormTemplate').clone();
content.find('form.loginForm').attr('id', 'loginForm');
showDialogWithContent('Login', content.html(), false, { width: 320 });
+ $('a.registerLink').click(midas.slicerappstore.doRegister);
$('#loginForm').ajaxForm({
success: function (responseText, statusText, xhr, form) {
var resp = $.parseJSON(responseText);
@@ -29,6 +30,7 @@ midas.slicerappstore.doRegister = function () {
var content = $('#registerFormTemplate').clone();
content.find('form.registerForm').attr('id', 'registerForm');
showDialogWithContent('Register', content.html(), false, { width: 380 });
+ $('a.loginLink').click(midas.slicerappstore.doLogin);
$('#registerForm').ajaxForm({
success: function (responseText, statusText, xhr, form) {
var resp = $.parseJSON(responseText);
@@ -164,6 +164,9 @@ if($this->slicerView)
<tr><td></td><td><input type="submit" value="Login" /></td></tr>
</table>
</form>
+ <div>
+ Not registered? <a class="registerLink" href="javascript:;">Register</a>
+ </div>
</div>
<!-- TEMPLATE: register form -->
@@ -178,6 +181,9 @@ if($this->slicerView)
<tr><td></td><td><input type="submit" value="Register" /></td></tr>
</table>
</form>
+ <div>
+ Already registered? <a class="loginLink" href="javascript:;">Login</a>
+ </div>
</div>
<?php
}

0 comments on commit e67553b

Please sign in to comment.