2016-03-23 18:39:41 +01:00
< section class = "heading b-b" >
< div class = "row no-gutter" >
< div class = "col-xs-2 col-sm-2 col-md-1" >
< section class = "heading-btn" >
2020-09-29 14:35:42 +02:00
< a href = "#" ng-click = "backPrevLocation($event)" > < i class = "fas fa-long-arrow-alt-left " > < / i > < / a >
2016-03-23 18:39:41 +01:00
< / section >
< / div >
< div class = "col-xs-10 col-sm-10 col-md-8 b-l" >
< section class = "heading-title" >
2019-12-17 12:40:36 +01:00
< h1 > {{ 'app.admin.plans.edit.subscription_plan' | translate }} {{ plan.base_name }}< / h1 >
2016-03-23 18:39:41 +01:00
< / section >
< / div >
< div class = "col-md-3" >
< section class = "heading-actions wrapper" >
2019-12-17 12:40:36 +01:00
< a class = "btn btn-lg btn-block btn-default m-t-xs" ui-sref = "app.admin.pricing" translate > {{ 'app.shared.buttons.cancel' }}< / a >
2016-03-23 18:39:41 +01:00
< / section >
< / div >
< / div >
< / section >
< div class = "row no-gutter" >
< div class = " col-sm-12 col-md-9 b-r nopadding" >
< div id = "planForm" >
< form name = "planForm" novalidate = "novalidate" class = "col-lg-7 col-lg-offset-2 m-t-lg form-group" action = "{{ actionUrl }}" ng-upload = "afterSubmit(content)" upload-options-enable-rails-csrf = "true" >
2020-09-22 16:03:18 +02:00
< ng-include src = "'/admin/plans/_form.html'" > < / ng-include >
2016-03-23 18:39:41 +01:00
2017-10-04 18:56:39 +02:00
< div class = "input-group m-t-md" >
2020-02-18 15:50:47 +01:00
< label for = "plan[disabled]" class = "control-label m-r-md" > {{ 'app.shared.plan.disabled' | translate }}< / label >
2017-10-04 18:56:39 +02:00
< input bs-switch
ng-model="plan.disabled"
id="plan[disabled]"
type="checkbox"
class="form-control"
2019-12-17 12:40:36 +01:00
switch-on-text="{{ 'app.shared.buttons.yes' | translate }}"
switch-off-text="{{ 'app.shared.buttons.no' | translate }}"
2017-10-04 18:56:39 +02:00
switch-animate="true"
ng-true-value="'true'"
ng-false-value="'false'"/>
< input type = "hidden" name = "plan[disabled]" value = "{{plan.disabled}}" / >
2020-02-18 15:50:47 +01:00
< span class = "help-block" translate > {{ 'app.shared.plan.disable_plan_will_not_unsubscribe_users' }}< / span >
2017-10-04 18:56:39 +02:00
< / div >
2019-12-17 12:40:36 +01:00
< h2 class = "m-t-xl" translate > {{ 'app.admin.plans.edit.prices' }}< / h2 >
2016-03-23 18:39:41 +01:00
< div class = "form-group col-md-6 col-lg-offset-6" >
< input type = "hidden" ng-model = "plan.parent" name = "plan[parent_id]" ng-value = "plan.parent" / >
2019-12-17 12:40:36 +01:00
< label for = "parentPlan" translate > {{ 'app.admin.plans.edit.copy_prices_from' }}< / label >
2020-09-23 15:21:20 +02:00
< select id = "parentPlan" ng-options = "plan.id as humanReadablePlanName(plan, allGroups) for plan in plans" ng-model = "plan.parent" ng-change = "copyPricesFromPlan()" class = "form-control" >
2016-03-23 18:39:41 +01:00
< option value = "" > < / option >
< / select >
< / div >
2019-12-17 12:40:36 +01:00
< h3 translate > {{ 'app.admin.plans.edit.machines' }}< / h3 >
2016-03-23 18:39:41 +01:00
< table class = "table" >
< thead >
2019-12-17 12:40:36 +01:00
< th translate > {{ 'app.admin.plans.edit.machine' }}< / th >
< th translate > {{ 'app.admin.plans.edit.hourly_rate' }}< / th >
2016-03-23 18:39:41 +01:00
< / thead >
< tbody >
2017-10-11 14:48:03 +02:00
< tr ng-repeat = "price in plan.prices" ng-if = "price.priceable_type === 'Machine'" ng-hide = "getMachine(price.priceable_id).disabled" >
< td style = "width: 60%;" > {{ getMachine(price.priceable_id).name }} (id {{ price.priceable_id }}) *< / td >
2016-03-23 18:39:41 +01:00
< td >
< div class = "input-group" ng-class = "{'has-error': planForm['plan[prices_attributes][][amount]'].$dirty && planForm['plan[prices_attributes][][amount]'].$invalid}" >
< span class = "input-group-addon" > {{currencySymbol}}< / span >
< input type = "number" class = "form-control" name = "plan[prices_attributes][][amount]" ng-value = "price.amount" required = "required" / >
< input type = "hidden" class = "form-control" name = "plan[prices_attributes][][id]" ng-value = "price.id" / >
< / div >
< / td >
< / tr >
< / tbody >
< / table >
2020-11-02 13:36:17 +01:00
< h3 ng-show = "$root.modules.spaces" translate > {{ 'app.admin.plans.edit.spaces' }}< / h3 >
< table class = "table" ng-show = "$root.modules.spaces" >
2017-02-14 17:06:42 +01:00
< thead >
2019-12-17 12:40:36 +01:00
< th translate > {{ 'app.admin.plans.edit.space' }}< / th >
< th translate > {{ 'app.admin.plans.edit.hourly_rate' }}< / th >
2017-02-14 17:06:42 +01:00
< / thead >
< tbody >
2017-10-11 15:50:18 +02:00
< tr ng-repeat = "price in plan.prices" ng-if = "price.priceable_type === 'Space'" ng-hide = "getSpace(price.priceable_id).disabled" >
< td style = "width: 60%;" > {{ getSpace(price.priceable_id).name }} *< / td >
2017-02-14 17:06:42 +01:00
< td >
< div class = "input-group" ng-class = "{'has-error': planForm['plan[prices_attributes][][amount]'].$dirty && planForm['plan[prices_attributes][][amount]'].$invalid}" >
< span class = "input-group-addon" > {{currencySymbol}}< / span >
< input type = "number" class = "form-control" name = "plan[prices_attributes][][amount]" ng-value = "price.amount" required = "required" / >
< input type = "hidden" class = "form-control" name = "plan[prices_attributes][][id]" ng-value = "price.id" / >
< / div >
< / td >
< / tr >
< / tbody >
< / table >
2016-03-23 18:39:41 +01:00
< div class = "panel-footer no-padder" >
2019-12-17 12:40:36 +01:00
< input type = "submit" value = "{{ 'app.shared.buttons.confirm_changes' | translate }}" class = "r-b btn-valid btn btn-warning btn-block p-lg btn-lg text-u-c" ng-disabled = "planForm.$invalid" / >
2016-03-23 18:39:41 +01:00
< / div >
< / form >
< / div >
< / div >
< / div >