Closed
Bug 698418
Opened 13 years ago
Closed 13 years ago
Add hooks for UI for additional login methods
Categories
(Bugzilla :: Extensions, enhancement)
Bugzilla
Extensions
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: gerv, Assigned: gerv)
Details
Attachments
(1 file, 1 obsolete file)
2.01 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
I would like to add a new login method to Bugzilla (BrowserID: bug 672841) and this requires adding a "Login with BrowserID" button to Bugzilla on the main login page and in the header. This needs some hooks.
Gerv
Assignee | ||
Comment 1•13 years ago
|
||
Here's what I've been using.
Gerv
Assignee | ||
Updated•13 years ago
|
Attachment #570691 -
Flags: review? → review?(LpSolit)
![]() |
||
Updated•13 years ago
|
Attachment #570691 -
Flags: review?(LpSolit) → review?(mkanat)
Comment 2•13 years ago
|
||
Comment on attachment 570691 [details] [diff] [review]
Patch v.1
Review of attachment 570691 [details] [diff] [review]:
-----------------------------------------------------------------
::: template/en/default/account/auth/login-small.html.tmpl
@@ +44,5 @@
> id="mini_login[% qs_suffix FILTER html %]"
> onsubmit="return check_mini_login_fields( '[% qs_suffix FILTER html %]' );"
> >
> +
> + [% Hook.process('additional_methods') %]
I don't think this is the right place. If we're going to add new links to the top of the page, they should be added when the login form is collapsed, not when it's expanded. When the login form is expanded, there isn't usually enough space to actually add more stuff and still have a reasonable UI.
::: template/en/default/account/auth/login.html.tmpl
@@ +95,4 @@
> # their password, assuming that our auth method allows that.
> #%]
>
> + [% Hook.process('additional_methods') %]
Hmm. Do you think that perhaps this should be inside of the form? Or would that not suit your needs?
Attachment #570691 -
Flags: review?(mkanat) → review-
Assignee | ||
Comment 3•13 years ago
|
||
Hi Max,
Thanks for the review :-)
(In reply to Max Kanat-Alexander from comment #2)
> I don't think this is the right place. If we're going to add new links to
> the top of the page, they should be added when the login form is collapsed,
> not when it's expanded. When the login form is expanded, there isn't usually
> enough space to actually add more stuff and still have a reasonable UI.
I'm not quite understanding you. This hook is for adding additional UI for logging in - in my use case, a "Log In With BrowserID" button (although the text is shorter than that!). Surely it makes sense for the UI to be behind the "login" expandable? Otherwise you have some login UI behind the expandable and some not.
Or have I misunderstood you?
> Hmm. Do you think that perhaps this should be inside of the form? Or would
> that not suit your needs?
Whether it's inside or outside the <form>, in and of itself, doesn't matter to me because it's just a button you click which runs some JS. But I do want to be able to stick in an <hr> and have it in a separate "section" because it's a different login method. So logically, I think it should be outside the form.
Gerv
Assignee | ||
Comment 4•13 years ago
|
||
mkanat: ping? :-)
Gerv
Assignee | ||
Updated•13 years ago
|
Attachment #570691 -
Flags: review?(LpSolit)
![]() |
||
Comment 5•13 years ago
|
||
Comment on attachment 570691 [details] [diff] [review]
Patch v.1
>=== modified file 'template/en/default/account/auth/login-small.html.tmpl'
>+ [% Hook.process('additional_methods') %]
Here, the hook is inside <form></form>, meaning that you will send data to the script defined in <form>, unless you use JS (as for BrowserID). But this unfortunately doesn't let you easily send data to another script if you have to. For consistency with the other hook below, you should move this one outside <form></form>.
>=== modified file 'template/en/default/account/auth/login.html.tmpl'
> # their password, assuming that our auth method allows that.
> #%]
>
>+ [% Hook.process('additional_methods') %]
Please move this hook before the [%# comment %] right above it. This hook has nothing to do with what the comment above it is about.
Otherwise this looks good (also when looking at stage).
Attachment #570691 -
Flags: review?(LpSolit) → review-
![]() |
||
Updated•13 years ago
|
Severity: normal → enhancement
Target Milestone: --- → Bugzilla 4.2
Assignee | ||
Comment 6•13 years ago
|
||
Review comments addressed; looking for a quick rubber stamp :-)
Gerv
Attachment #570691 -
Attachment is obsolete: true
Attachment #608338 -
Flags: review?(LpSolit)
![]() |
||
Comment 7•13 years ago
|
||
Comment on attachment 608338 [details] [diff] [review]
Patch v.2
>=== modified file 'template/en/default/account/auth/login-small.html.tmpl'
>+
Remove the useless whitespaces here. Otherwise looks good. r=LpSolit
Attachment #608338 -
Flags: review?(LpSolit) → review+
![]() |
||
Updated•13 years ago
|
Flags: approval4.2+
Flags: approval+
Assignee | ||
Comment 8•13 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified template/en/default/account/auth/login.html.tmpl
modified template/en/default/account/auth/login-small.html.tmpl
Committed revision 8162.
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.2/
modified template/en/default/account/auth/login.html.tmpl
modified template/en/default/account/auth/login-small.html.tmpl
Committed revision 8056.
Gerv
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•