CRM-12299 Fix misalignments in profile/view, profile view when embedded in Confirm...
authorDave Greenberg <dave@civicrm.org>
Tue, 9 Apr 2013 00:48:31 +0000 (17:48 -0700)
committerDave Greenberg <dave@civicrm.org>
Tue, 9 Apr 2013 00:48:31 +0000 (17:48 -0700)
----------------------------------------
* CRM-12299: Profile view and profile pop-up layout fixes
  http://issues.civicrm.org/jira/browse/CRM-12299

css/civicrm.css
templates/CRM/Contribute/Form/Contribution/Confirm.tpl
templates/CRM/Contribute/Form/Contribution/ThankYou.tpl
templates/CRM/Event/Form/Registration/DisplayProfile.tpl
templates/CRM/Profile/Form/Dynamic.tpl
templates/CRM/Profile/Page/View.tpl

index 253af570853f52a32806150f17316044c1b6dac2..2f805a802d54bf7fc213867c2e6d7c52b4dac6df 100644 (file)
   border: none;
 }
 
-.crm-container .crm-section {
+.crm-container .crm-section,
+.crm-container-snippet .crm-section {
   margin-bottom: 1em;
 }
 
-.crm-container .crm-section .label {
+.crm-container .crm-section .label,
+.crm-container-snippet .crm-section .label {
   float: left;
-  width: 15%;
+  width: 17%;
   text-align: right;
 }
 
   text-align: left;
 }
 
-.crm-container .crm-section .content {
-  margin-left: 16%;
+.crm-container .crm-section .content,
+.crm-container-snippet .crm-section .content {
+  margin-left: 19%;
 }
 
 .crm-container .no-label .content {
   color: #000080;
 }
 
-.crm-container .crm-marker {
+.crm-container .crm-marker,
+.crm-container-snippet .crm-marker {
   color: #8A1F11;
   font-weight: bold;
   margin-right: 5px;
@@ -3777,6 +3781,10 @@ div.m ul#civicrm-menu,
   padding-top: 6px;
 }
 
+.crm-public .crm-profile-view .content {
+  padding-top: 6px;
+}
+
 #crm-container.crm-public .calc-value {
   padding-top: 6px;
   font-size: 15px;
index 3e5a42ebcfbf428bb560b9b9ded03cb31e9b7695..1c495358e7dec0d2d240eef0589c670a0dc0cc75 100644 (file)
     {include file="CRM/Contribute/Form/Contribution/Honor.tpl"}
 
     {if $customPre}
-            <fieldset class="label-left">
-                {include file="CRM/UF/Form/Block.tpl" fields=$customPre}
-            </fieldset>
+      <fieldset class="label-left crm-profile-view">
+        {include file="CRM/UF/Form/Block.tpl" fields=$customPre}
+      </fieldset>
     {/if}
 
     {if $pcpBlock}
     {/if}
 
     {if $onbehalfProfile}
-      <div class="crm-group onBehalf_display-group">
+      <div class="crm-group onBehalf_display-group label-left crm-profile-view">
          {include file="CRM/UF/Form/Block.tpl" fields=$onbehalfProfile}
          <div class="crm-section organization_email-section">
             <div class="label">{ts}Organization Email{/ts}</div>
                 {/if}
             {else}
                 <div class="crm-section no-label credit_card_details-section">
-                    <div class="content">{$credit_card_type}</div>
+                  <div class="content">{$credit_card_type}</div>
                   <div class="content">{$credit_card_number}</div>
                   <div class="content">{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}</div>
                   <div class="clear"></div>
     {include file="CRM/Contribute/Form/Contribution/PremiumBlock.tpl" context="confirmContribution"}
 
     {if $customPost}
-            <fieldset class="label-left">
-                {include file="CRM/UF/Form/Block.tpl" fields=$customPost}
-            </fieldset>
+      <fieldset class="label-left crm-profile-view">
+        {include file="CRM/UF/Form/Block.tpl" fields=$customPost}
+      </fieldset>
     {/if}
 
     {if $contributeMode NEQ 'notify' and $is_monetary and ( $amount GT 0 OR $minimum_fee GT 0 ) } {* In 'notify mode, contributor is taken to processor payment forms next *}
index 28c6e9831229395755e93e660b2e0cb5cbda8477..0252de3c4bbbb66de733f2ad1e17039e2b6ada98 100644 (file)
     {include file="CRM/Contribute/Form/Contribution/Honor.tpl"}
 
     {if $customPre}
-            <fieldset class="label-left">
-                {include file="CRM/UF/Form/Block.tpl" fields=$customPre}
-            </fieldset>
+      <fieldset class="label-left crm-profile-view">
+        {include file="CRM/UF/Form/Block.tpl" fields=$customPre}
+      </fieldset>
     {/if}
 
     {if $pcpBlock}
     {/if}
 
     {if $onbehalfProfile}
-      <div class="crm-group onBehalf_display-group">
+      <div class="crm-group onBehalf_display-group label-left crm-profile-view">
          {include file="CRM/UF/Form/Block.tpl" fields=$onbehalfProfile}
          <div class="crm-section organization_email-section">
             <div class="label">{ts}Organization Email{/ts}</div>
     {include file="CRM/Contribute/Form/Contribution/PremiumBlock.tpl" context="thankContribution"}
 
     {if $customPost}
-            <fieldset class="label-left">
-                {include file="CRM/UF/Form/Block.tpl" fields=$customPost}
-            </fieldset>
+      <fieldset class="label-left crm-profile-view">
+        {include file="CRM/UF/Form/Block.tpl" fields=$customPost}
+      </fieldset>
     {/if}
 
     <div id="thankyou_footer" class="contribution_thankyou_footer-section">
index eb3aab568a825d9b48e6353f92f0551f4ba3b513..d8bac68ec67bab08d15f71c2a3ff988de5320c0c 100644 (file)
          {if $primaryParticipantProfile.CustomPost}
                {foreach from=$primaryParticipantProfile.CustomPost item=value key=field}
                   <fieldset class="label-left no-border"><div class="bold crm-profile-view-title">{$primaryParticipantProfile.CustomPostGroupTitle.$field.groupTitle}</div>
+                    <div class="crm-profile-view">
                       {foreach from=$primaryParticipantProfile.CustomPost.$field item=value key=field}
-                          <div class="crm-section {$field}-section">
-                              <div class="label">{$field}</div>
-                              <div class="content">{$value}</div>
-                              <div class="clear"></div>
-                          </div>
+                        <div class="crm-section {$field}-section">
+                          <div class="label">{$field}</div>
+                          <div class="content">{$value}</div>
+                          <div class="clear"></div>
+                        </div>
                       {/foreach}
+                    </div>
                   </fieldset>
                {/foreach}
             {/if}
                     {ts 1=$participantNo}Participant %1{/ts}
                 </div>
             {if $participant.additionalCustomPre}
-    <fieldset class="label-left no-border"><div class="bold crm-additional-profile-view-title">{$participant.additionalCustomPreGroupTitle}</div>
-                    {foreach from=$participant.additionalCustomPre item=value key=field}
-                        <div class="crm-section {$field}-section">
-                            <div class="label">{$field}</div>
-                            <div class="content">{$value}</div>
-                            <div class="clear"></div>
-                        </div>
-                    {/foreach}
-                </fieldset>
+              <fieldset class="label-left no-border"><div class="bold crm-additional-profile-view-title">{$participant.additionalCustomPreGroupTitle}</div>
+                <div class="crm-profile-view">
+                  {foreach from=$participant.additionalCustomPre item=value key=field}
+                    <div class="crm-section {$field}-section">
+                      <div class="label">{$field}</div>
+                      <div class="content">{$value}</div>
+                      <div class="clear"></div>
+                    </div>
+                  {/foreach}
+                </div>
+              </fieldset>
             {/if}
 
             {if $participant.additionalCustomPost}
-    {foreach from=$participant.additionalCustomPost item=value key=field}
-        <fieldset class="label-left no-border"><div class="bold crm-additional-profile-view-title">{$participant.additionalCustomPostGroupTitle.$field.groupTitle}</div>
-                        {foreach from=$participant.additionalCustomPost.$field item=value key=field}
-                            <div class="crm-section {$field}-section">
-                                <div class="label">{$field}</div>
-                                <div class="content">{$value}</div>
-                                <div class="clear"></div>
-                            </div>
-                        {/foreach}
-                    </fieldset>
-    {/foreach}
+              {foreach from=$participant.additionalCustomPost item=value key=field}
+                <fieldset class="label-left no-border"><div class="bold crm-additional-profile-view-title">{$participant.additionalCustomPostGroupTitle.$field.groupTitle}</div>
+                  <div class="crm-profile-view">
+                    {foreach from=$participant.additionalCustomPost.$field item=value key=field}
+                      <div class="crm-section {$field}-section">
+                        <div class="label">{$field}</div>
+                        <div class="content">{$value}</div>
+                        <div class="clear"></div>
+                      </div>
+                    {/foreach}
+                  </div>
+                </fieldset>
+              {/foreach}
             {/if}
             </div>
             <div class="spacer"></div>
index 3a8b6bc112ed595df2663aed82c19a134481bb8e..f8d2638faf4d3c497b5aef62e8662f99e93d745e 100644 (file)
@@ -83,9 +83,9 @@ function proccessMultiRecordForm(formData, jqForm, options) {
 {* Replace div id "crm-container" only when profile is not loaded in civicrm container, i.e for profile shown in my account and in profile standalone mode otherwise id should be "crm-profile-block" *}
 
   {if $action eq 1 or $action eq 2 or $action eq 4 }
-  <div id="crm-profile-block">
+  <div id="crm-profile-block" class="crm-container-snippet crm-public">
     {else}
-  <div id="crm-container" class="crm-container" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
+  <div id="crm-container" class="crm-container crm-public" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
   {/if}
 
   {if $isDuplicate and ( ($action eq 1 and $mode eq 4 ) or ($action eq 2) or ($action eq 8192) ) }
index 1e8bf0f1ce836aa95d2bd3e7079853c755fc900b..5d8b7a66b1ef534e145fcc8fcfb874c54f728eaa 100644 (file)
@@ -35,7 +35,7 @@
 {else}
     {foreach from=$profileGroups item=group}
         <h2>{$group.title}</h2>
-        <div id="profilewrap{$groupID}">
+        <div id="profilewrap{$groupID}" class="crm-profile-view">
            {$group.content}
         </div>
     {/foreach}