Skip to content

Commit

Permalink
Dotcom pricing landing page changes
Browse files Browse the repository at this point in the history
  • Loading branch information
HarveyKandola committed Sep 18, 2022
1 parent ce07d4d commit 5ec911d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions gui/app/templates/components/customize/license-key.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
{{#if (eq subscription.status 0)}}
<h3 class="color-red-600">Enjoy the Documize free plan!</h3>
<a href="https://www.documize.com/community">
{{ui/ui-button color=constants.Color.Yellow light=true label="Pay for product support"}}
{{ui/ui-button color=constants.Color.Yellow light=true label="Get activation key"}}
</a>
{{/if}}
{{#if (eq subscription.status 1)}}
<h3 class="color-green-600">Nice, you have an active product subscription!</h3>
<a href="https://www.documize.com/community">
{{ui/ui-button color=constants.Color.Yellow light=true label="Pay for product support"}}
{{ui/ui-button color=constants.Color.Yellow light=true label="Get activation key"}}
</a>
{{/if}}
{{#if (eq subscription.status 2)}}
<h3 class="color-red-600">Hmm, your product subscription has expired</h3>
<a href="https://www.documize.com/community">
<a href="https://www.documize.com/community/pricing?ref=app">
{{ui/ui-button color=constants.Color.Yellow light=true label="Get activation key"}}
</a>
{{/if}}
{{#if (eq subscription.status 3)}}
<h3 class="color-red-600">Hmm, {{subscription.activeUsers}} active user count exceeds permitted {{subscription.seats}} user limit</h3>
<a href="https://www.documize.com/community">
<a href="https://www.documize.com/community/pricing?ref=app">
{{ui/ui-button color=constants.Color.Yellow light=true label="Get activation key"}}
</a>
{{/if}}
Expand Down
34 changes: 17 additions & 17 deletions server/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,23 +159,23 @@ func (m *middleware) Authorize(w http.ResponseWriter, r *http.Request, next http
End: time.Now().UTC().Add(time.Hour * 24 * 7 * time.Duration(weeks))}
} else {
// Enterprise edition requires valid subscription data.
rc.Subscription = domain.Subscription{Edition: domain.EnterpriseEdition,
Seats: domain.Seats6,
Trial: false,
Start: time.Now().UTC(),
End: time.Now().UTC().Add(time.Hour * 24 * 7 * time.Duration(weeks))}
// if len(strings.TrimSpace(org.Subscription)) > 0 {
// sd := domain.SubscriptionData{}
// es1 := json.Unmarshal([]byte(org.Subscription), &sd)
// if es1 == nil {
// rc.Subscription, err = domain.DecodeSubscription(sd)
// if err != nil {
// m.Runtime.Log.Error("unable to decode subscription for org "+rc.OrgID, err)
// }
// } else {
// m.Runtime.Log.Error("unable to load subscription for org "+rc.OrgID, es1)
// }
// }
// rc.Subscription = domain.Subscription{Edition: domain.EnterpriseEdition,
// Seats: domain.Seats6,
// Trial: false,
// Start: time.Now().UTC(),
// End: time.Now().UTC().Add(time.Hour * 24 * 7 * time.Duration(weeks))}
if len(strings.TrimSpace(org.Subscription)) > 0 {
sd := domain.SubscriptionData{}
es1 := json.Unmarshal([]byte(org.Subscription), &sd)
if es1 == nil {
rc.Subscription, err = domain.DecodeSubscription(sd)
if err != nil {
m.Runtime.Log.Error("unable to decode subscription for org "+rc.OrgID, err)
}
} else {
m.Runtime.Log.Error("unable to load subscription for org "+rc.OrgID, es1)
}
}
}

// Tag all HTTP calls with subscription status
Expand Down

0 comments on commit 5ec911d

Please sign in to comment.