Commit 4a6b5274 by Torkel Ödegaard

feat(invite): fixes for org invite enhancement story, #2353

parent f7ea420a
......@@ -332,9 +332,9 @@ h1, h2, h3, h4, h5, h6 {
h1 {font-size: 40px;}
h2 {font-size: 36px;}
h3 {font-size: 26px;}
h4 {font-size: 24px;}
h5 {font-size: 22px;}
h3 {font-size: 32px;}
h4 {font-size: 28px;}
h5 {font-size: 24px;}
h6 {font-size: 20px;}
body, table.body, p, td {font-size: 14px;line-height:19px;}
......@@ -351,25 +351,21 @@ small {
font-size: 10px;
}
.emphasis {
font-weight: 600;
}
a {
color: #E67612;
color: #2ba6cb;
text-decoration: none;
}
a:hover {
color: #ff8f2b !important;
color: #2795b6 !important;
}
a:active {
color: #F2821E !important;
color: #2795b6 !important;
}
a:visited {
color: #E67612 !important;
color: #2ba6cb !important;
}
h1 a,
......@@ -434,8 +430,8 @@ table.large-button td {
display: block;
width: auto !important;
text-align: center;
background: #ff8f2b;
border: 1px solid #ff8f2b;
background: #2ba6cb;
border: 1px solid #2284a1;
color: #ffffff;
padding: 8px 0;
}
......@@ -488,7 +484,7 @@ table.large-button td a {
table.button:hover td,
table.button:visited td,
table.button:active td {
background: #ff8f2b !important;
background: #2795b6 !important;
}
table.button:hover td a,
......@@ -502,7 +498,7 @@ table.tiny-button:hover td,
table.small-button:hover td,
table.medium-button:hover td,
table.large-button:hover td {
background: #F2821E !important;
background: #2795b6 !important;
}
table.button:hover td a,
......@@ -689,4 +685,4 @@ body.outlook p {
table[class="body"] .hide-for-desktop {
display: inherit !important;
}
}
\ No newline at end of file
}
......@@ -25,22 +25,22 @@
<table class="twelve columns">
<tr>
<td class="center">
<p><span class="emphasis">[[.InvitedBy]]</span> has added you to the <span class="emphasis">[[.OrgName]]</span> organization in Grafana.
<p><span class="emphasis">[[.InvitedBy]]</span> has added you to the <span class="emphasis">[[.OrgName]]</span> organization in Grafana.
<p>Once logged in, [[.OrgName]] will be available in the left side menu, in the dropdown below your username.</p>
</td>
<td class="expander"></td>
</tr>
<tr>
<tr>
<td class="center">
<table class="better-button" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="better-button" bgcolor="#ff8f2b"><a href="[[.AppURL]]" target="_blank">Log in now</a></td>
<td align="center" class="better-button" bgcolor="#ff8f2b"><a href="[[.AppUrl]]" target="_blank">Log in now</a></td>
</tr>
</table>
</td>
</tr>
</tr>
</table>
</td>
......
......@@ -181,7 +181,9 @@ func CompleteInvite(c *middleware.Context, completeInvite dtos.CompleteInviteFor
// add to org
addOrgUserCmd := m.AddOrgUserCommand{OrgId: invite.OrgId, UserId: user.Id, Role: invite.Role}
if err := bus.Dispatch(&addOrgUserCmd); err != nil {
return ApiError(500, "Error while trying to create org user", err)
if err != m.ErrOrgUserAlreadyAdded {
return ApiError(500, "Error while trying to create org user", err)
}
}
// set org to active
......
......@@ -19,13 +19,13 @@ body {
font-size: 14px; line-height: 19px;
}
a:hover {
color: #ff8f2b !important;
color: #2795b6 !important;
}
a:active {
color: #F2821E !important;
color: #2795b6 !important;
}
a:visited {
color: #E67612 !important;
color: #2ba6cb !important;
}
body {
font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;
......@@ -140,22 +140,22 @@ color: #FFFFFF !important;
<table class="twelve columns" style="border-collapse: collapse; border-spacing: 0; margin: 0 auto; padding: 0; text-align: left; vertical-align: top; width: 580px">
<tr style="padding: 0; text-align: left; vertical-align: top" align="left">
<td class="center" style="-moz-hyphens: auto; -webkit-font-smoothing: antialiased; -webkit-hyphens: auto; -webkit-text-size-adjust: none; border-collapse: collapse !important; color: #222222; font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; hyphens: auto; line-height: 19px; margin: 0; padding: 0px 0px 10px; text-align: center; vertical-align: top; word-break: break-word" align="center" valign="top">
<p style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; color: #222222; font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; line-height: 19px; margin: 0 0 10px; padding: 0; text-align: left" align="left"><span class="emphasis" style="font-weight: 600">{{.InvitedBy}}</span> has added you to the <span class="emphasis" style="font-weight: 600">{{.OrgName}}</span> organization in Grafana.
<p style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; color: #222222; font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; line-height: 19px; margin: 0 0 10px; padding: 0; text-align: left" align="left"><span class="emphasis" style="font-weight: 600">{{.InvitedBy}}</span> has added you to the <span class="emphasis" style="font-weight: 600">{{.OrgName}}</span> organization in Grafana.
</p><p style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; color: #222222; font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; line-height: 19px; margin: 0 0 10px; padding: 0; text-align: left" align="left">Once logged in, {{.OrgName}} will be available in the left side menu, in the dropdown below your username.</p>
</td>
<td class="expander" style="-moz-hyphens: auto; -webkit-font-smoothing: antialiased; -webkit-hyphens: auto; -webkit-text-size-adjust: none; border-collapse: collapse !important; color: #222222; font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; hyphens: auto; line-height: 19px; margin: 0; padding: 0; text-align: left; vertical-align: top; visibility: hidden; width: 0px; word-break: break-word" align="left" valign="top"></td>
</tr>
<tr style="padding: 0; text-align: left; vertical-align: top" align="left">
<tr style="padding: 0; text-align: left; vertical-align: top" align="left">
<td class="center" style="-moz-hyphens: auto; -webkit-font-smoothing: antialiased; -webkit-hyphens: auto; -webkit-text-size-adjust: none; border-collapse: collapse !important; color: #222222; font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; hyphens: auto; line-height: 19px; margin: 0; padding: 0px 0px 10px; text-align: center; vertical-align: top; word-break: break-word" align="center" valign="top">
<table class="better-button" align="center" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border-spacing: 0; margin-bottom: 20px; margin-top: 10px; padding: 0; text-align: left; vertical-align: top">
<tr style="padding: 0; text-align: left; vertical-align: top" align="left">
<td align="center" class="better-button" bgcolor="#ff8f2b" style="-moz-border-radius: 2px; -moz-hyphens: auto; -webkit-border-radius: 2px; -webkit-font-smoothing: antialiased; -webkit-hyphens: auto; -webkit-text-size-adjust: none; border-collapse: collapse !important; border-radius: 2px; color: #222222; font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; hyphens: auto; line-height: 19px; margin: 0; padding: 0px; text-align: left; vertical-align: top; word-break: break-word" valign="top"><a href="{{.AppURL}}" target="_blank" style="-moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; border: 1px solid #ff8f2b; color: #FFF; display: inline-block; padding: 12px 25px; text-decoration: none">Log in now</a></td>
<td align="center" class="better-button" bgcolor="#ff8f2b" style="-moz-border-radius: 2px; -moz-hyphens: auto; -webkit-border-radius: 2px; -webkit-font-smoothing: antialiased; -webkit-hyphens: auto; -webkit-text-size-adjust: none; border-collapse: collapse !important; border-radius: 2px; color: #222222; font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; hyphens: auto; line-height: 19px; margin: 0; padding: 0px; text-align: left; vertical-align: top; word-break: break-word" valign="top"><a href="{{.AppUrl}}" target="_blank" style="-moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; border: 1px solid #ff8f2b; color: #FFF; display: inline-block; padding: 12px 25px; text-decoration: none">Log in now</a></td>
</tr>
</table>
</td>
</tr>
</tr>
</table>
</td>
......
......@@ -19,13 +19,13 @@ body {
font-size: 14px; line-height: 19px;
}
a:hover {
color: #ff8f2b !important;
color: #2795b6 !important;
}
a:active {
color: #F2821E !important;
color: #2795b6 !important;
}
a:visited {
color: #E67612 !important;
color: #2ba6cb !important;
}
body {
font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;
......
......@@ -19,13 +19,13 @@ body {
font-size: 14px; line-height: 19px;
}
a:hover {
color: #ff8f2b !important;
color: #2795b6 !important;
}
a:active {
color: #F2821E !important;
color: #2795b6 !important;
}
a:visited {
color: #E67612 !important;
color: #2ba6cb !important;
}
body {
font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;
......
......@@ -19,13 +19,13 @@ body {
font-size: 14px; line-height: 19px;
}
a:hover {
color: #ff8f2b !important;
color: #2795b6 !important;
}
a:active {
color: #F2821E !important;
color: #2795b6 !important;
}
a:visited {
color: #E67612 !important;
color: #2ba6cb !important;
}
body {
font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment