Merge pull request #22886 from demeritcowboy/contributionview-notice3
[civicrm-core.git] / templates / CRM / Contact / Form / Inline / Website.tpl
CommitLineData
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{* This file provides the template for inline editing of websites *}
11{$form.oplock_ts.html}
12<table class="crm-inline-edit-form">
13 <tr>
14 <td colspan="5">
31037a42 15 <div class="crm-submit-buttons">
6a488035
TO
16 {include file="CRM/common/formButtons.tpl"}
17 </div>
18 </td>
19 </tr>
20
21 <tr>
22 <td>{ts}Website{/ts}
23 {help id="id-website" file="CRM/Contact/Form/Contact.hlp"}
b2975331 24 {if $actualBlockCount lt 25 }
11326657 25 &nbsp;&nbsp;<span id="add-more-website" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
6a488035
TO
26 {/if}
27 </td>
28 <td>{ts}Website Type{/ts}</td>
29 <td>&nbsp;</td>
30 </tr>
31
32 {section name='i' start=1 loop=$totalBlocks}
31037a42 33 {assign var='blockId' value=$smarty.section.i.index}
6a488035
TO
34 <tr id="Website_Block_{$blockId}" {if $blockId gt $actualBlockCount}class="hiddenElement"{/if}>
35 <td>{$form.website.$blockId.url.html|crmAddClass:url}&nbsp;</td>
36 <td>{$form.website.$blockId.website_type_id.html}</td>
f336ee25
EL
37 {if $blockId gt 1}
38 <td><a class="crm-delete-inline crm-hover-button action-item" href="#" title="{ts}Delete Website{/ts}"><span class="icon delete-icon"></span></a></td>
39 {/if}
6a488035
TO
40 </tr>
41 {/section}
42</table>
43
44{literal}
45<script type="text/javascript">
3cc60a06 46 CRM.$(function($) {
6a488035
TO
47 // error handling / show hideen elements duing form validation
48 $('tr[id^="Website_Block_"]' ).each( function() {
49 if( $(this).find('td:first span').length > 0 ) {
50 $(this).removeClass('hiddenElement');
31037a42 51 }
6a488035
TO
52 });
53 });
54</script>
55{/literal}