crmCaseType.controller('CaseTypeCtrl', function($scope, crmApi, apiCalls) {
$scope.partialUrl = partialUrl;
+ var ts = $scope.ts = CRM.ts('CiviCase');
$scope.activityStatuses = _.values(apiCalls.actStatuses.values);
$scope.activityTypes = apiCalls.actTypes.values;
The original form used table layout; don't know if we have an alternative, CSS-based layout
-->
-<table class="form-layout">
- <tbody>
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="title">
- Title
- </label>
- </td>
- <td>
+<div class="crm-block">
+ <div class="crm-group">
+ <div crm-ui-field="title" crm-title="ts('Title')">
<input
type="text"
name="title"
class="big crm-form-text"
required
/>
- </td>
- </tr>
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="caseTypeName">
- Name
- </label>
- </td>
- <td>
+ </div>
+ <div crm-ui-field="caseTypeName" crm-title="ts('Name')">
<input
type="text"
name="caseTypeName"
<div ng-show="caseType.id && !locks.caseTypeName">
<em>WARNING: If any external files or programs reference the old "Name", then they must be updated manually.</em>
</div>
- </td>
- </tr>
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="description">
- Description
- </label>
- </td>
- <td>
+ </div>
+ <div crm-ui-field="description" crm-title="ts('Description')">
<textarea name="description" ng-model="caseType.description" class="big crm-form-textarea"></textarea>
- </td>
- </tr>
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="is_active">
- Enabled?
- </label>
- </td>
- <td>
+ </div>
+ <div crm-ui-field="is_active" crm-title="ts('Enabled?')">
<input name="is_active" type="checkbox" ng-model="caseType.is_active" ng-true-value="1" ng-false-value="0"/>
- </td>
- </tr>
- </tbody>
-</table>
+ </div>
+ </div>
+</div>
<a href="" ng-click="previewRecipients()">{{getRecipientsEstimate()}}</a>
</div>
<div>
- <input name='dedupe_email' type='checkbox' ng-model='mailing.dedupe_email' ng-true-value="1" ng-false-value="0" />
- <label crm-ui-label crm-for='dedupe_email'>
- Dedupe
+ <input name='dedupe_email' type='checkbox' ng-model='mailing.dedupe_email' ng-true-value="1" ng-false-value="0" id="recipients-dedupe-email" />
+ <label for="recipients-dedupe-email">
+ {{ts('Dedupe')}}
</label>
</div>
</div>
required
multiple>
</select>
-</div>
\ No newline at end of file
+</div>
<!--
Controller: EditMailingCtrl
Required vars: mailing, crmMailingConst
-FIXME: Don't hardcode table-based layout!
-->
-<table class="form-layout-compressed">
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="header_id">{{ts('Mailing Header')}}</label>
- </td>
- <td>
+<div class="crm-block">
+ <div class="crm-group">
+ <div crm-ui-field="header_id" crm-title="ts('Mailing Header')">
<select
name="header_id"
ui-jq="select2"
ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Header'}">
<option value=""></option>
</select>
- </td>
- </tr>
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="footer_id">{{ts('Mailing Footer')}}</label>
- </td>
- <td>
+ </div>
+ <div crm-ui-field="footer_id" crm-title="ts('Mailing Footer')">
<select
name="footer_id"
ui-jq="select2"
ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Footer'}">
<option value=""></option>
</select>
- </td>
- </tr>
-</table>
+ </div>
+ </div>
+</div>
<!--
Controller: EditMailingCtrl
Required vars: mailing, crmMailingConst
-FIXME: Don't hardcode table-based layout!
-->
-<table class="form-layout-compressed" style="background: #bbf; width:100%;">
- <tbody>
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="msg_template_id">{{ts('Template')}}</label>
- </td>
- <td ng-include="partialUrl('field/msg_template_id.html')">
- </td>
- </tr>
- </tbody>
-</table>
-<table class="form-layout-compressed">
- <tbody>
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="fromAddress">{{ts('From')}}</label>
- </td>
- <td>
- <select
- name="fromAddress"
- ui-jq="select2"
- ui-options="{dropdownAutoWidth : true, allowClear: false, placeholder: ts('Email address')}"
- ng-model="fromPlaceholder.label"
- ng-options="frm.label as frm.label for frm in crmFromAddresses.getAll() | filter:{is_active:1} | orderBy:'weight'"
- required>
- <option value=""></option>
- </select>
- </td>
- </tr>
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="replyTo">{{ts('Reply-To')}}</label>
- </td>
- <td>
- <select
- name="replyTo"
- ui-jq="select2"
- ui-options="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Email address')}"
- ng-model="mailing.replyto_email"
- ng-options="frm.label as frm.label for frm in crmFromAddresses.getAll() | filter:{is_active:1} | orderBy:'weight'"
- >
- <option value=""></option>
- </select>
- </td>
- </tr>
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="recipients">{{ts('Recipients')}}</label>
- </td>
- <td ng-include="partialUrl('field/recipients.html')">
- </td>
- </tr>
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="subject">{{ts('Subject')}}</label>
- </td>
- <td>
- <div style="float: right;">
- <input crm-mailing-token crm-for="subject" />
- </div>
- <input
- type="text"
- class="crm-form-text"
- ng-model="mailing.subject"
- required
- placeholder="Subject"
- name="subject" />
- </td>
- </tr>
- </tbody>
-</table>
+
+<div class="crm-block">
+ <div class="crm-group">
+ <div crm-ui-field="msg_template_id" crm-title="ts('Template')" style="background: #bbf; width:100%; padding: 0.1em;">
+ <div>
+ <div ng-include="partialUrl('field/msg_template_id.html')"></div>
+ </div>
+ </div>
+ <div crm-ui-field="fromAddress" crm-title="ts('From')">
+ <select
+ name="fromAddress"
+ ui-jq="select2"
+ ui-options="{dropdownAutoWidth : true, allowClear: false, placeholder: ts('Email address')}"
+ ng-model="fromPlaceholder.label"
+ ng-options="frm.label as frm.label for frm in crmFromAddresses.getAll() | filter:{is_active:1} | orderBy:'weight'"
+ required>
+ <option value=""></option>
+ </select>
+ </div>
+ <div crm-ui-field="replyTo" crm-title="ts('Reply-To')">
+ <select
+ name="replyTo"
+ ui-jq="select2"
+ ui-options="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Email address')}"
+ ng-model="mailing.replyto_email"
+ ng-options="frm.label as frm.label for frm in crmFromAddresses.getAll() | filter:{is_active:1} | orderBy:'weight'"
+ >
+ <option value=""></option>
+ </select>
+ </div>
+ <div crm-ui-field="recipients" crm-title="ts('Recipients')">
+ <div>
+ <div ng-include="partialUrl('field/recipients.html')"></div>
+ </div>
+ </div>
+ <div crm-ui-field="subject" crm-title="ts('Subject')">
+ <div style="float: right;">
+ <input crm-mailing-token crm-for="subject" />
+ </div>
+ <input
+ type="text"
+ class="crm-form-text"
+ ng-model="mailing.subject"
+ required
+ placeholder="Subject"
+ name="subject" />
+ </div>
+ </div>
+</div>
<!--
Controller: EditMailingCtrl
Required vars: mailing
-FIXME: Don't hardcode table-based layout!
-->
-<table class="form-layout-compressed">
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="visibility">{{ts('Mailing Visibility')}}</label>
- </td>
- <td>
+<div class="crm-block">
+ <div class="crm-group">
+ <div crm-ui-field="visibility" crm-title="ts('Mailing Visibility')">
<select
name="visibility"
ui-jq="select2"
required
>
</select>
- </td>
- </tbody>
-</table>
+ </div>
+ </div>
+</div>
<!--
Controller: EditMailingCtrl
Required vars: mailing, crmMailingConst
-FIXME: Don't hardcode table-based layout!
-->
-<table class="form-layout-compressed">
- <tbody>
- <tr>
- <td>
- <!-- Comparing data-model and UI of "override_verp", note that true/false are inverted (enabled==0,disabled==1) -->
- <input name="override_verp" type="checkbox" ng-model="mailing.override_verp" ng-true-value="0" ng-false-value="1" />
- <label crm-ui-label crm-for="override_verp">{{ts('Track Replies')}}</label>
- </td>
- </tr>
- <tr>
- <td>
- <div class="help">
- {{ts('Recipients\' replies are sent to a CiviMail specific address instead of the sender\'s address so they can be stored within CiviCRM.')}}
- </div>
- </td>
- </tr>
- <tr ng-show="'0' == mailing.override_verp">
- <td>
- <input name="forward_replies" type="checkbox" ng-model="mailing.forward_replies" ng-true-value="1" ng-false-value="0" />
- <label crm-ui-label crm-for="forward_replies">{{ts('Forward Replies')}}</label>
- </td>
- </tr>
- <tr ng-show="'0' == mailing.override_verp">
- <td>
- <div class="help">
- {{ts('If a recipient replies to this mailing, forward the reply to the FROM Email address specified for the mailing.')}}
- </div>
- </td>
- </tr>
- <tr ng-show="'0' == mailing.override_verp">
- <td>
- <input name="auto_responder" type="checkbox" ng-model="mailing.auto_responder" ng-true-value="1" ng-false-value="0" />
- <label crm-ui-label crm-for="auto_responder">{{ts('Auto-Respond to Replies')}}</label>
- </td>
- </tr>
- <tr ng-show="'0' == mailing.override_verp">
- <td>
- <div class="help">
- {{ts('If a recipient replies to this mailing, send an automated reply using the selected message.')}}
- </div>
- </td>
- </tr>
- </tbody>
-</table>
+<div class="crm-block">
+ <div class="crm-group">
+ <div crm-ui-field="override_verp" crm-title="ts('Track Replies')" crm-layout="checkbox">
+ <!-- Comparing data-model and UI of "override_verp", note that true/false are inverted (enabled==0,disabled==1) -->
+ <input name="override_verp" type="checkbox" ng-model="mailing.override_verp" ng-true-value="0" ng-false-value="1" />
+ </div>
+ <div class="crm-section" id="help">
+ {{ts('Recipients\' replies are sent to a CiviMail specific address instead of the sender\'s address so they can be stored within CiviCRM.')}}
+ </div>
+ <div crm-ui-field="forward_replies" crm-title="ts('Forward Replies')" crm-layout="checkbox" ng-show="'0' == mailing.override_verp">
+ <input name="forward_replies" type="checkbox" ng-model="mailing.forward_replies" ng-true-value="1" ng-false-value="0" />
+ </div>
+ <div class="crm-section" id="help" ng-show="'0' == mailing.override_verp">
+ {{ts('If a recipient replies to this mailing, forward the reply to the FROM Email address specified for the mailing.')}}
+ </div>
+ <div crm-ui-field="auto_responder" crm-title="ts('Auto-Respond to Replies')" crm-layout="checkbox" ng-show="'0' == mailing.override_verp">
+ <input name="auto_responder" type="checkbox" ng-model="mailing.auto_responder" ng-true-value="1" ng-false-value="0" />
+ </div>
+ <div class="crm-section" id="help" ng-show="'0' == mailing.override_verp">
+ {{ts('If a recipient replies to this mailing, send an automated reply using the selected message.')}}
+ </div>
+ </div>
+</div>
<hr/>
-<table>
- <tbody>
- <tr ng-show="'0' == mailing.override_verp && '1' == mailing.auto_responder">
- <td><label crm-ui-label crm-for="reply_id">{{ts('Auto-Respond Message')}}</label></td>
- <td>
- <select
- name="reply_id"
- ui-jq="select2"
- ui-options="{dropdownAutoWidth : true}"
- ng-model="mailing.reply_id"
- ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Reply'}"
- required>
- <option value=""></option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label crm-ui-label crm-for="optout_id">{{ts('Opt-out Message')}}</label></td>
- <td>
- <select
- name="optout_id"
- ui-jq="select2"
- ui-options="{dropdownAutoWidth : true}"
- ng-model="mailing.optout_id"
- ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'OptOut'}"
- required>
- <option value=""></option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label crm-ui-label crm-for="resubscribe_id">{{ts('Resubscribe Message')}}</label></td>
- <td>
- <select
- name="resubscribe_id"
- ui-jq="select2"
- ui-options="{dropdownAutoWidth : true}"
- ng-model="mailing.resubscribe_id"
- ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Resubscribe'}"
- required>
- <option value=""></option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label crm-ui-label crm-for="unsubscribe_id">{{ts('Unsubscribe Message')}}</label></td>
- <td>
- <select
- name="unsubscribe_id"
- ui-jq="select2"
- ui-options="{dropdownAutoWidth : true}"
- ng-model="mailing.unsubscribe_id"
- ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Unsubscribe'}"
- required>
- <option value=""></option>
- </select>
- </td>
- </tr>
- </tbody>
-</table>
+<div class="crm-block">
+ <div class="crm-group">
+ <div crm-ui-field="reply_id" crm-title="ts('Auto-Respond Message')" ng-show="'0' == mailing.override_verp && '1' == mailing.auto_responder">
+ <select
+ name="reply_id"
+ ui-jq="select2"
+ ui-options="{dropdownAutoWidth : true}"
+ ng-model="mailing.reply_id"
+ ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Reply'}"
+ required>
+ <option value=""></option>
+ </select>
+ </div>
+ <div crm-ui-field="optout_id" crm-title="ts('Opt-out Message')">
+ <select
+ name="optout_id"
+ ui-jq="select2"
+ ui-options="{dropdownAutoWidth : true}"
+ ng-model="mailing.optout_id"
+ ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'OptOut'}"
+ required>
+ <option value=""></option>
+ </select>
+ </div>
+ <div crm-ui-field="resubscribe_id" crm-title="ts('Resubscribe Message')">
+ <select
+ name="resubscribe_id"
+ ui-jq="select2"
+ ui-options="{dropdownAutoWidth : true}"
+ ng-model="mailing.resubscribe_id"
+ ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Resubscribe'}"
+ required>
+ <option value=""></option>
+ </select>
+ </div>
+ <div crm-ui-field="unsubscribe_id" crm-title="ts('Unsubscribe Message')">
+ <select
+ name="unsubscribe_id"
+ ui-jq="select2"
+ ui-options="{dropdownAutoWidth : true}"
+ ng-model="mailing.unsubscribe_id"
+ ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Unsubscribe'}"
+ required>
+ <option value=""></option>
+ </select>
+ </div>
+ </div>
+</div>
Required vars: mailing, crmMailingConst
FIXME: Don't hardcode table-based layout!
-->
-<table class="form-layout-compressed">
- <tbody>
- <tr>
- <td class="label">
- <label crm-ui-label crm-for="mailingName">{{ts('Mailing Name')}}</label>
- </td>
- <td>
+<div class="crm-block">
+ <div class="crm-group">
+ <div crm-ui-field="mailingName" crm-title="ts('Mailing Name')">
+ <div>
<input
type="text"
class="crm-form-text"
placeholder="Mailing Name"
required
name="mailingName" />
- </td>
- </tr>
- <tr ng-show="crmMailingConst.campNames.length > 0">
- <td class="label">
- <label crm-ui-label crm-for="campaign">{{ts('Campaign')}}</label>
- </td>
- <td>
- <select
- name="campaign"
- ui-jq="select2"
- ui-options="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Select Campaign')}"
- ng-model="mailing.campaign_id"
- ng-options="campaign.id as campaign.name for campaign in crmMailingConst.campNames|orderBy:'name'"
- >
- <option value=""></option>
- </select>
- </td>
- </tr>
- </tbody>
-</table>
\ No newline at end of file
+ </div>
+ </div>
+ <div crm-ui-field="campaign" crm-title="ts('Campaign')" ng-show="crmMailingConst.campNames.length > 0">
+ <select
+ name="campaign"
+ ui-jq="select2"
+ ui-options="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Select Campaign')}"
+ ng-model="mailing.campaign_id"
+ ng-options="campaign.id as campaign.name for campaign in crmMailingConst.campNames|orderBy:'name'"
+ >
+ <option value=""></option>
+ </select>
+ </div>
+ </div>
+</div>
<!--
Controller: EditMailingCtrl
Required vars: mailing
-FIXME: Don't hardcode table-based layout!
-->
-<table class="form-layout-compressed">
- <tbody>
- <tr>
- <td>
- <input name="url_tracking" type="checkbox" ng-model="mailing.url_tracking" ng-true-value="1" ng-false-value="0" />
- <label crm-ui-label crm-for="url_tracking">{{ts('Track Click Throughs')}}</label>
- </td>
- </tr>
- <tr>
- <td>
- <div id="help">
- {{ts('Track the number of times recipients click each link in this mailing. NOTE: When this feature is enabled, all links in the message body will be automatically re-written to route through your CiviCRM server prior to redirecting to the target page.')}}
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <input name="open_tracking" type="checkbox" ng-model="mailing.open_tracking" ng-true-value="1" ng-false-value="0" />
- <label crm-ui-label crm-for="open_tracking">{{ts('Track Opens')}}</label>
- </td>
- </tr>
- <tr>
- <td>
- <div id="help">
- {{ts('Track the number of times recipients open this mailing in their email software.')}}
- </div>
- </td>
- </tr>
- </tbody>
-</table>
+<div class="crm-block">
+ <div class="crm-group">
+ <div crm-ui-field="url_tracking" crm-title="ts('Track Click Throughs')" crm-layout="checkbox">
+ <input name="url_tracking" type="checkbox" ng-model="mailing.url_tracking" ng-true-value="1" ng-false-value="0" />
+ </div>
+ <div class="crm-section" id="help">
+ {{ts('Track the number of times recipients click each link in this mailing. NOTE: When this feature is enabled, all links in the message body will be automatically re-written to route through your CiviCRM server prior to redirecting to the target page.')}}
+ </div>
+ <div crm-ui-field="open_tracking" crm-title="ts('Track Opens')" crm-layout="checkbox">
+ <input name="open_tracking" type="checkbox" ng-model="mailing.open_tracking" ng-true-value="1" ng-false-value="0" />
+ </div>
+ <div class="crm-section" id="help">
+ {{ts('Track the number of times recipients open this mailing in their email software.')}}
+ </div>
+ </div>
+</div>