Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update language spanish, add placeholders in signup, add behavior fromWhere #300

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

wzalazar
Copy link

Solution the error in the placeholder for email, change
placeholder="{{emailPlaceholder}} by placeholder="{{t9n 'email'}}

Exception in template helper: ReferenceError: t9n is not defined
Object.AccountsEntry.entrySignInHelpers.emailPlaceholder

add placeholders

placeholder="{{t9n 'email'}}
placeholder="{{t9n 'username'}}"
placeholder="{{t9n 'signupCode'}}"

Apply correct way the lenguage spanish

add new property, fromWhere:false , with this only redirects to dasboard by default, not redirects a route before log-in

add condition for that behavior from Where

walter added 5 commits October 10, 2014 12:00
Solution the error in the placeholder for email, change 
placeholder="{{emailPlaceholder}} by  placeholder="{{t9n 'email'}}

Exception in template helper: ReferenceError: t9n is not defined
Object.AccountsEntry.entrySignInHelpers.emailPlaceholder
add placeholders

placeholder="{{t9n 'email'}}
placeholder="{{t9n 'username'}}"
placeholder="{{t9n 'signupCode'}}"
Apply correct way the lenguage spanish
add new property, fromWhere:false , with this only redirects to dasboard by default, not redirects a route before log-in
add condition for that behavior from Where
@wzalazar wzalazar changed the title Update signIn.html Update language spanish, add placeholders in signup, add behavior fromWhere Oct 11, 2014
@pavel-kurnosov
Copy link
Contributor

+1 to merge it. Because this is fix for this issue:
#299

@drfraker
Copy link

+1 to merge this. Having the same issue as others are with this.

@funkyeah
Copy link

I don't think this will work anymore anyway. The existing functionality is now broken as far as I can tell in a number of ways starting here and below:

route.name is no longer valid, should be route.getName()

Router.current().path is also no longer valid. should be Iron.Location.get().pathname or something like that:

finally:

[_.each Router.routes, (route)->]

I'm not 100% sure cause I don't understand iron-router that well, but I believe, Router.routes returns an array of middle-ware functions that don't exactly work with the stuff inside each... not sure how to fix this though

any ideas on the last part?

@funkyeah
Copy link

here's what ended up working for me

exclusions = []
_.each Router.routes, (route)->
  exclusions.push route.getName()

# Change the fromWhere session variable when you leave a path
Router.onStop ->
  # If the route is an entry route, no need to save it
  if (!_.contains(exclusions, Router.current().route?.getName()))
    Session.set('fromWhere', window.location.pathname)

note that i used window.location.pathname instead of Iron.Location.get().pathname because by the time onStop is called the latter has already changed to the new routes path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants