Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
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 | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | {if $showCMS }{*true if is_cms_user field is set *} | |
11 | <fieldset class="crm-group crm_user-group"> | |
12 | <div class="messages help cms_user_help-section"> | |
13 | {if !$isCMS} | |
21238450 | 14 | {ts}If you would like to create an account on this site, check the box below and enter a Username{/ts}{if $form.cms_pass} {ts}and a password{/ts}.{/if} |
6a488035 | 15 | {else} |
21238450 | 16 | {ts}Please enter a Username to create an account.{/ts} |
6a488035 | 17 | {/if} |
21238450 | 18 | {ts 1=$loginURL}If you already have an account <a href='%1'>please login</a> before completing this form.{/ts} |
6a488035 TO |
19 | </div> |
20 | <div>{$form.cms_create_account.html} {$form.cms_create_account.label}</div> | |
21 | <div id="details" class="crm_user_signup-section"> | |
22 | ||
23 | <div class="form-layout-compressed"> | |
24 | <div class="crm-section cms_name-section"> | |
25 | <div class="label"> | |
26 | <label for="cms_name">{$form.cms_name.label}</label> | |
27 | </div> | |
28 | <div class="content"> | |
29 | {$form.cms_name.html} <a id="checkavailability" href="#" onClick="return false;">{ts}<strong>Check Availability</strong>{/ts}</a> | |
30 | <span id="msgbox" style="display:none"></span><br /> | |
21238450 | 31 | <span class="description">{ts}Punctuation is not allowed in a Username with the exception of periods, hyphens and underscores.{/ts}</span> |
6a488035 TO |
32 | </div> |
33 | </div> | |
34 | ||
35 | {if $form.cms_pass} | |
36 | <div class="crm-section cms_pass-section"> | |
37 | <div class="label"> | |
38 | <label for="cms_pass">{$form.cms_pass.label}</label> | |
39 | </div> | |
40 | <div class="content"> | |
41 | {$form.cms_pass.html} | |
42 | </div> | |
f52b4671 | 43 | <div class="clear"></div> |
6a488035 TO |
44 | <div class="label"> |
45 | <label for="crm_confirm_pass-section">{$form.cms_confirm_pass.label}</label> | |
46 | </div> | |
47 | <div class="content"> | |
48 | {$form.cms_confirm_pass.html}<br/> | |
49 | <span class="description">{ts}Provide a password for the new account in both fields.{/ts}</span> | |
50 | </div> | |
51 | </div> | |
52 | {/if} | |
53 | </div> | |
54 | ||
55 | </div> | |
56 | </fieldset> | |
57 | ||
58 | {literal} | |
59 | <script type="text/javascript"> | |
60 | {/literal} | |
61 | {if !$isCMS} | |
62 | {literal} | |
63 | if ( document.getElementsByName("cms_create_account")[0].checked ) { | |
64 | cj('#details').show(); | |
65 | } else { | |
66 | cj('#details').hide(); | |
67 | } | |
68 | {/literal} | |
69 | {/if} | |
70 | {literal} | |
71 | function showMessage( frm ) | |
72 | { | |
73 | var cId = {/literal}'{$cId}'{literal}; | |
74 | if ( cId ) { | |
75 | alert('{/literal}{ts escape="js"}You are logged-in user{/ts}{literal}'); | |
76 | frm.checked = false; | |
77 | } else { | |
78 | var siteName = {/literal}'{$config->userFrameworkBaseURL}'{literal}; | |
79 | alert('{/literal}{ts escape="js"}Please login if you have an account on this site with the link{/ts}{literal} ' + siteName ); | |
80 | } | |
81 | } | |
82 | {/literal} | |
83 | {include file="CRM/common/checkUsernameAvailable.tpl"} | |
84 | {literal} | |
85 | </script> | |
86 | {/literal} | |
87 | {if !$isCMS} | |
88 | {include file="CRM/common/showHideByFieldValue.tpl" | |
89 | trigger_field_id ="cms_create_account" | |
90 | trigger_value ="" | |
91 | target_element_id ="details" | |
92 | target_element_type ="block" | |
93 | field_type ="radio" | |
94 | invert = 0 | |
95 | } | |
96 | {/if} | |
97 | {/if} |