dev/translation#65 Further remove moneyValueFormat
[civicrm-core.git] / templates / CRM / Admin / Form / Job.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {* This template is used for adding/configuring Scheduled Jobs. *}
11 <h3>{if $action eq 1}{ts}New Scheduled Job{/ts}{elseif $action eq 2}{ts}Edit Scheduled Job{/ts}{elseif $action eq 4}{ts}Execute Scheduled Job{/ts}{else}{ts}Delete Scheduled Job{/ts}{/if}</h3>
12 <div class="crm-block crm-form-block crm-job-form-block">
13 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
14
15 {if $action eq 8}
16 <div class="messages status no-popup">
17 {icon icon="fa-info-circle"}{/icon}
18 {ts}WARNING: Deleting this Scheduled Job will cause some important site functionality to stop working.{/ts} {ts}Do you want to continue?{/ts}
19 </div>
20 {elseif $action eq 4}
21 <div class="messages status no-popup">
22 {icon icon="fa-info-circle"}{/icon}
23 {ts 1=$jobName}Are you sure you would like to execute %1 job?{/ts}
24 </div>
25 {else}
26 <table class="form-layout-compressed">
27 <tr class="crm-job-form-block-name">
28 <td class="label">{$form.name.label}</td><td>{$form.name.html}</td>
29 </tr>
30 <tr class="crm-job-form-block-description">
31 <td class="label">{$form.description.label}</td><td>{$form.description.html}</td>
32 </tr>
33 <tr class="crm-job-form-block-run_frequency">
34 <td class="label">{$form.run_frequency.label}</td><td>{$form.run_frequency.html}</td>
35 </tr>
36 <tr class="crm-job-form-block-api_action">
37 <td class="label"><label>{ts}API call:{/ts}</label></td>
38 <td>
39
40 <div id="fname"><br/>
41 </div>
42 <select name="api_entity" type="text" id="api_entity" class="crm-form-select required">
43 {crmAPI entity="Entity" var="entities"}
44 {foreach from=$entities.values item=entity}
45 <option value="{$entity}"{if $entity eq $form.api_entity.value} selected="selected"{/if}>{$entity}</option>
46 {/foreach}
47 </select>
48 {$form.api_action.html}
49
50 <div class="description">{ts}Put in the API method name. You need to enter pieces of full API function name as described in the documentation.{/ts}</div>
51 <script>
52 {literal}
53 CRM.$(function($) {
54 function assembleName( ) {
55
56 // dunno yet
57 var apiName = "";
58
59 // building prefix
60 if( $('#api_action').val() == '' ) {
61 $('#fname').html( "<em>API name will start appearing here as you type in fields below.</em>" );
62 return;
63 }
64
65 var apiPrefix = 'api'
66
67 // building entity
68 var apiEntity = $('#api_entity').val().replace( /([A-Z])/g, function($1) {
69 return $1.toLowerCase();
70 });
71 // building action
72 var apiAction = $('#api_action').val().replace(/(\_[a-z])/g, function($1) {return $1.toUpperCase().replace('_','');});
73 apiName = apiPrefix + '.' + apiEntity + '.' + apiAction;
74 $('#fname').text( apiName );
75 }
76
77 // bind to different events to build API name live
78 $('#api_entity').change(assembleName)
79 $('#api_action').change(assembleName).keyup(assembleName);
80 assembleName();
81 });
82
83 {/literal}
84 </script>
85
86 </td>
87 </tr>
88 <tr class="crm-job-form-block-parameters">
89 <td class="label">{$form.parameters.label}<br />{docURL page="user/initial-set-up/scheduled-jobs/#parameters"}</td>
90 <td>{$form.parameters.html}</td>
91 </tr>
92 <tr class="crm-job-form-block-scheduled-run-date">
93 <td class="label">{$form.scheduled_run_date.label}</td>
94 <td>{$form.scheduled_run_date.html}<br />
95 <div dlass="description">{ts}Do not run this job before this date / time. The run frequency selected above will apply thereafter.{/ts}<br />
96 {if $action eq 1}{ts}Leave blank to run as soon as possible.{/ts}{else}{ts}Leave blank to run at next run frequency.{/ts}{/if}
97 </div>
98 </td>
99 </tr>
100 <tr class="crm-job-form-block-is_active">
101 <td></td><td>{$form.is_active.html}&nbsp;{$form.is_active.label}</td>
102 </tr>
103 </table>
104 {/if}
105 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
106 </div>
107