Skip to content

Commit

Permalink
Mosaico: loosen restrictions on required fields
Browse files Browse the repository at this point in the history
  • Loading branch information
monishdeb committed Feb 28, 2022
1 parent 1178afb commit 1a88bdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ang/crmMosaico/BlockMailing.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div ng-form="subform" crm-ui-id-scope>

<div class="form-group-lg">
<label for="inputTitle" class="control-label required-mark">{{ts('Mailing Name')}}
<label for="inputTitle" ng-class="checkPerm('create mailings') ? 'control-label' : 'control-label required-mark'">{{ts('Mailing Name')}}
<a crm-ui-help="hs({id: 'name', title: ts('Mailing Name')})"></a></label>
<input type="text" class="form-control" id="inputTitle" placeholder="{{ts('Mailing Name')}}" ng-model="mailing.name" required>
<input type="text" class="form-control" id="inputTitle" placeholder="{{ts('Mailing Name')}}" ng-model="mailing.name" ng-required="!checkPerm('create mailings')">
</div>

<div class="form-group" ng-show="crmMailingConst.campaignEnabled">
Expand All @@ -19,7 +19,7 @@
</div>

<div class="form-group">
<label for="inputFrom" class="control-label required-mark">{{ts('From')}}
<label for="inputFrom" ng-class="checkPerm('create mailings') ? 'control-label' : 'control-label required-mark'">{{ts('From')}}
<a crm-ui-help="hs({id: 'from_email', title: ts('From')})"></a></label>
<div ng-controller="EmailAddrCtrl" crm-mailing-from-address="fromPlaceholder" crm-mailing="mailing">
<select
Expand Down Expand Up @@ -54,12 +54,12 @@
</div>

<div class="form-group">
<label for="inputRecipients" class="control-label required-mark">{{ts('Recipients')}}</label>
<label for="inputRecipients" ng-class="checkPerm('create mailings') ? 'control-label' : 'control-label required-mark'">{{ts('Recipients')}}</label>
<div crm-mailing-block-recipients="{name: 'recipients', id: 'subform.recipients'}" crm-mailing="mailing"></div>
</div>

<div class="form-group">
<label for="inputSubject" class="control-label required-mark">{{ts('Subject')}}</label>
<label for="inputSubject" ng-class="checkPerm('create mailings') ? 'control-label' : 'control-label required-mark'">{{ts('Subject')}}</label>
<div>
<crm-mosaico-subject-list crm-mailing="mailing" />
</div>
Expand All @@ -85,7 +85,7 @@
</span>

<div class="form-group" ng-if="crmMailingConst.isMultiLingual">
<label for="inputLanguage" class="control-label required-mark">{{ts('Language')}}</label>
<label for="inputLanguage" ng-class="checkPerm('create mailings') ? 'control-label' : 'control-label required-mark'">{{ts('Language')}}</label>
<select
id="inputLanguage"
name="language"
Expand Down
1 change: 1 addition & 0 deletions ang/crmMosaico/SubjectList.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
});
scope.ts = CRM.ts(null);
scope.hs = crmUiHelp({file: 'CRM/Mailing/MailingUI'});
scope.checkPerm = CRM.checkPerm;

scope.addSubj = function addSubj() {
scope.mailing.template_options.variants = [
Expand Down

0 comments on commit 1a88bdd

Please sign in to comment.