commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / templates / CRM / common / CMSUser.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25 *}
26 {if $showCMS }{*true if is_cms_user field is set *}
27 <fieldset class="crm-group crm_user-group">
28 <div class="messages help cms_user_help-section">
29 {if !$isCMS}
30 {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}
31 {else}
32 {ts}Please enter a Username to create an account.{/ts}
33 {/if}
34 {ts 1=$loginURL}If you already have an account <a href='%1'>please login</a> before completing this form.{/ts}
35 </div>
36 <div>{$form.cms_create_account.html} {$form.cms_create_account.label}</div>
37 <div id="details" class="crm_user_signup-section">
38
39 <div class="form-layout-compressed">
40 <div class="crm-section cms_name-section">
41 <div class="label">
42 <label for="cms_name">{$form.cms_name.label}</label>
43 </div>
44 <div class="content">
45 {$form.cms_name.html} <a id="checkavailability" href="#" onClick="return false;">{ts}<strong>Check Availability</strong>{/ts}</a>
46 <span id="msgbox" style="display:none"></span><br />
47 <span class="description">{ts}Punctuation is not allowed in a Username with the exception of periods, hyphens and underscores.{/ts}</span>
48 </div>
49 </div>
50
51 {if $form.cms_pass}
52 <div class="crm-section cms_pass-section">
53 <div class="label">
54 <label for="cms_pass">{$form.cms_pass.label}</label>
55 </div>
56 <div class="content">
57 {$form.cms_pass.html}
58 </div>
59 <div class="clear"></div>
60 <div class="label">
61 <label for="crm_confirm_pass-section">{$form.cms_confirm_pass.label}</label>
62 </div>
63 <div class="content">
64 {$form.cms_confirm_pass.html}<br/>
65 <span class="description">{ts}Provide a password for the new account in both fields.{/ts}</span>
66 </div>
67 </div>
68 {/if}
69 </div>
70
71 </div>
72 </fieldset>
73
74 {literal}
75 <script type="text/javascript">
76 {/literal}
77 {if !$isCMS}
78 {literal}
79 if ( document.getElementsByName("cms_create_account")[0].checked ) {
80 cj('#details').show();
81 } else {
82 cj('#details').hide();
83 }
84 {/literal}
85 {/if}
86 {literal}
87 function showMessage( frm )
88 {
89 var cId = {/literal}'{$cId}'{literal};
90 if ( cId ) {
91 alert('{/literal}{ts escape="js"}You are logged-in user{/ts}{literal}');
92 frm.checked = false;
93 } else {
94 var siteName = {/literal}'{$config->userFrameworkBaseURL}'{literal};
95 alert('{/literal}{ts escape="js"}Please login if you have an account on this site with the link{/ts}{literal} ' + siteName );
96 }
97 }
98 {/literal}
99 {include file="CRM/common/checkUsernameAvailable.tpl"}
100 {literal}
101 </script>
102 {/literal}
103 {if !$isCMS}
104 {include file="CRM/common/showHideByFieldValue.tpl"
105 trigger_field_id ="cms_create_account"
106 trigger_value =""
107 target_element_id ="details"
108 target_element_type ="block"
109 field_type ="radio"
110 invert = 0
111 }
112 {/if}
113 {/if}