mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-21 15:54:22 +01:00
Allow writing short rich descriptions for each subscription plan
This commit is contained in:
parent
303c0a0ba8
commit
10fbea9289
@ -1,10 +1,12 @@
|
|||||||
# Changelog Fab-manager
|
# Changelog Fab-manager
|
||||||
|
|
||||||
## Next release
|
## Next release
|
||||||
|
- Allow writing short rich descriptions for each subscription plan
|
||||||
- Allow inserting hyperlinks in customized info messages
|
- Allow inserting hyperlinks in customized info messages
|
||||||
- Improved scripts for mounting volumes
|
- Improved scripts for mounting volumes
|
||||||
- Increased verbosity of upgrade script
|
- Increased verbosity of upgrade script
|
||||||
- Fix a bug: mounting the payment-schedules volume in the docker-compose file results in an invalid file
|
- Fix a bug: mounting the payment-schedules volume in the docker-compose file results in an invalid file
|
||||||
|
- [TODO DEPLOY] `rails fablab:maintenance:rebuild_stylesheet`
|
||||||
|
|
||||||
## v4.7.3 2021 March 03
|
## v4.7.3 2021 March 03
|
||||||
- Improved the setup script
|
- Improved the setup script
|
||||||
@ -19,7 +21,7 @@
|
|||||||
- Fix a bug: unable to upgrade using the easy upgrade command
|
- Fix a bug: unable to upgrade using the easy upgrade command
|
||||||
- Fix a security issue: possible SQL injection when dropping the database
|
- Fix a security issue: possible SQL injection when dropping the database
|
||||||
- Fix a security issue: restrict allowed keys when creating/updating credits
|
- Fix a security issue: restrict allowed keys when creating/updating credits
|
||||||
- [TODO DEPLOY] `bundle exec rails fablab:openlab:bulk_export` if you have enabled OpenLab (projects sharing)
|
- [TODO DEPLOY] `rails fablab:openlab:bulk_export` if you have enabled OpenLab (projects sharing)
|
||||||
|
|
||||||
## v4.7.1 2021 February 24
|
## v4.7.1 2021 February 24
|
||||||
- Fix a security issue: updated axios to 0.21.1 to fix [CVE-2020-28168](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-28168)
|
- Fix a security issue: updated axios to 0.21.1 to fix [CVE-2020-28168](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-28168)
|
||||||
|
@ -106,26 +106,28 @@ const PlanCard: React.FC<PlanCardProps> = ({ plan, userId, subscribedPlanId, ope
|
|||||||
</div>
|
</div>
|
||||||
</div>}
|
</div>}
|
||||||
</div>
|
</div>
|
||||||
{hasDescription() && <div className="plan-description" dangerouslySetInnerHTML={{__html: plan.description}}/>}
|
<div className="card-footer">
|
||||||
{hasAttachment() && <a className="info-link" href={ plan.plan_file_url } target="_blank">{ t('app.public.plans.more_information') }</a>}
|
{hasDescription() && <div className="plan-description" dangerouslySetInnerHTML={{__html: plan.description}}/>}
|
||||||
{canSubscribeForMe() && <div className="cta-button">
|
{hasAttachment() && <a className="info-link" href={ plan.plan_file_url } target="_blank">{ t('app.public.plans.more_information') }</a>}
|
||||||
{!hasSubscribedToThisPlan() && <button className={`subscribe-button ${isSelected ? 'selected-card' : ''}`}
|
{canSubscribeForMe() && <div className="cta-button">
|
||||||
onClick={handleSelectPlan}
|
{!hasSubscribedToThisPlan() && <button className={`subscribe-button ${isSelected ? 'selected-card' : ''}`}
|
||||||
disabled={!_.isNil(subscribedPlanId)}>
|
onClick={handleSelectPlan}
|
||||||
{userId && <span>{t('app.public.plans.i_choose_that_plan')}</span>}
|
disabled={!_.isNil(subscribedPlanId)}>
|
||||||
{!userId && <span>{t('app.public.plans.i_subscribe_online')}</span>}
|
{userId && <span>{t('app.public.plans.i_choose_that_plan')}</span>}
|
||||||
</button>}
|
{!userId && <span>{t('app.public.plans.i_subscribe_online')}</span>}
|
||||||
{hasSubscribedToThisPlan() && <button className="subscribe-button selected-card" disabled>
|
</button>}
|
||||||
{ t('app.public.plans.i_already_subscribed') }
|
{hasSubscribedToThisPlan() && <button className="subscribe-button selected-card" disabled>
|
||||||
</button>}
|
{ t('app.public.plans.i_already_subscribed') }
|
||||||
</div>}
|
</button>}
|
||||||
{canSubscribeForOther() && <div className="cta-button">
|
</div>}
|
||||||
<button className={`subscribe-button ${isSelected ? 'selected-card' : ''}`}
|
{canSubscribeForOther() && <div className="cta-button">
|
||||||
onClick={handleSelectPlan}
|
<button className={`subscribe-button ${isSelected ? 'selected-card' : ''}`}
|
||||||
disabled={_.isNil(userId)}>
|
onClick={handleSelectPlan}
|
||||||
<span>{ t('app.public.plans.i_choose_that_plan') }</span>
|
disabled={_.isNil(userId)}>
|
||||||
</button>
|
<span>{ t('app.public.plans.i_choose_that_plan') }</span>
|
||||||
</div>}
|
</button>
|
||||||
|
</div>}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,14 @@ class PlanController {
|
|||||||
return file._destroy = true;
|
return file._destroy = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check and limit
|
||||||
|
* @param content
|
||||||
|
*/
|
||||||
|
$scope.limitDescriptionSize = function (content) {
|
||||||
|
alert(content);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,6 +281,13 @@
|
|||||||
@include border-radius(0 3px 3px 0);
|
@include border-radius(0 3px 3px 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plan-card {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
font-size: rem-calc(16);
|
font-size: rem-calc(16);
|
||||||
@ -348,31 +355,38 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.plan-description {
|
.card-footer {
|
||||||
max-height: 5.2em;
|
display: flex;
|
||||||
overflow: hidden;
|
flex-direction: column;
|
||||||
}
|
justify-content: space-around;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
.cta-button {
|
.plan-description {
|
||||||
margin: 20px 0;
|
max-height: 5.2em;
|
||||||
|
overflow: hidden;
|
||||||
.subscribe-button {
|
|
||||||
@extend .btn;
|
|
||||||
@extend .rounded;
|
|
||||||
|
|
||||||
outline: 0;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: rem-calc(16);
|
|
||||||
background-color: white;
|
|
||||||
padding-left: 30px;
|
|
||||||
padding-right: 30px;
|
|
||||||
}
|
}
|
||||||
button.subscribe-button:focus, button.subscribe-button:hover {
|
|
||||||
outline: 0;
|
.cta-button {
|
||||||
|
margin: 20px 0;
|
||||||
|
|
||||||
|
.subscribe-button {
|
||||||
|
@extend .btn;
|
||||||
|
@extend .rounded;
|
||||||
|
|
||||||
|
outline: 0;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: rem-calc(16);
|
||||||
|
background-color: white;
|
||||||
|
padding-left: 30px;
|
||||||
|
padding-right: 30px;
|
||||||
|
}
|
||||||
|
button.subscribe-button:focus, button.subscribe-button:hover {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.info-link {
|
||||||
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.info-link {
|
|
||||||
margin-top: 1em;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -686,3 +686,12 @@ body.container {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plan-description-input .medium-editor-input div[medium-editor] {
|
||||||
|
max-height: 5.2em;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
& p:nth-child(2n+3), p:nth-child(2n+4) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -127,7 +127,7 @@
|
|||||||
<span class="help-block" translate>{{ 'app.shared.plan.monthly_payment_info' }}</span>
|
<span class="help-block" translate>{{ 'app.shared.plan.monthly_payment_info' }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-group m-t-md">
|
<div class="input-group m-t-md plan-description-input">
|
||||||
<label for="plan[description]" class="control-label m-r-md" translate>{{ 'app.shared.plan.description' }}</label>
|
<label for="plan[description]" class="control-label m-r-md" translate>{{ 'app.shared.plan.description' }}</label>
|
||||||
<div class="medium-editor-input">
|
<div class="medium-editor-input">
|
||||||
<div ng-model="plan.description" medium-editor options='{"placeholder": "{{ "app.shared.plan.type_a_short_description" | translate }}",
|
<div ng-model="plan.description" medium-editor options='{"placeholder": "{{ "app.shared.plan.type_a_short_description" | translate }}",
|
||||||
|
@ -259,9 +259,9 @@ h5:after {
|
|||||||
border-color: $secondary;
|
border-color: $secondary;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pricing-panel .cta-button .btn:hover,
|
.pricing-panel .card-footer .cta-button .btn:hover,
|
||||||
.pricing-panel .cta-button .custom-invoice .modal-body .elements li:hover,
|
.pricing-panel .card-footer .cta-button .custom-invoice .modal-body .elements li:hover,
|
||||||
.custom-invoice .modal-body .elements .pricing-panel .cta-button li:hover {
|
.custom-invoice .modal-body .elements .pricing-panel .card-footer .cta-button li:hover {
|
||||||
background-color: $secondary !important;
|
background-color: $secondary !important;
|
||||||
color: $secondary-text-color;
|
color: $secondary-text-color;
|
||||||
}
|
}
|
||||||
@ -302,11 +302,14 @@ section#cookies-modal div.cookies-consent .cookies-actions button.accept {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pricing-panel {
|
.pricing-panel {
|
||||||
.cta-button {
|
.card-footer {
|
||||||
button.subscribe-button {
|
.cta-button {
|
||||||
border-color: $secondary;
|
button.subscribe-button {
|
||||||
&.selected-card {
|
border-color: $secondary;
|
||||||
background-color: $secondary;
|
|
||||||
|
&.selected-card {
|
||||||
|
background-color: $secondary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user