Jump to content
zimbahost

Adjust sidebars button position

Recommended Posts

Which file can I move to put the option to add funds below and the two centered?

Due to native translation it does not appear completely

 

invoice.JPG

 

exampleinvoice.jpg

Edited by zimbahost

Share this post


Link to post
Share on other sites
15 hours ago, zimbahost said:

Which file can I move to put the option to add funds below and the two centered?

there wouldn't really be a file/template you can edit.... well maybe sidebar.tpl, but the coding would be a pain.

a quick way to do this would be to use a hook....

<?php

# Modify Sidebat Footer Hook
# Written by brian!

use WHMCS\View\Menu\Item as MenuItem;
 
add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) {
	
	$invoicesummary = $primarySidebar->getChild("My Invoices Summary");
	if (!is_null($invoicesummary)) {
		$invoicesummary->setFooterHtml(str_replace(array("col-xs-6 col-button-left","col-xs-6 col-button-right"),"col-xs-",$invoicesummary->getFooterHtml())); 
	}
});

3ICLmNX.pngnKrwdsg.png

Share this post


Link to post
Share on other sites
7 hours ago, brian! said:

there wouldn't really be a file/template you can edit.... well maybe sidebar.tpl, but the coding would be a pain.

a quick way to do this would be to use a hook....


<?php

# Modify Sidebat Footer Hook
# Written by brian!

use WHMCS\View\Menu\Item as MenuItem;
 
add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) {
	
	$invoicesummary = $primarySidebar->getChild("My Invoices Summary");
	if (!is_null($invoicesummary)) {
		$invoicesummary->setFooterHtml(str_replace(array("col-xs-6 col-button-left","col-xs-6 col-button-right"),"col-xs-",$invoicesummary->getFooterHtml())); 
	}
});

3ICLmNX.pngnKrwdsg.png

Your code solved my problem, how do I leave a space between the two buttons?

Share this post


Link to post
Share on other sites
10 hours ago, zimbahost said:

Your code solved my problem, how do I leave a space between the two buttons?

I would just put a spacer div between the two buttons and you can adjust the height to suit your needs...

<?php

# Modify Sidebat Footer Hook
# Written by brian!

use WHMCS\View\Menu\Item as MenuItem;
 
add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) {
	
	$invoicesummary = $primarySidebar->getChild("My Invoices Summary");
	if (!is_null($invoicesummary)) {
		$footer = str_replace(array("col-xs-6 col-button-left","col-xs-6 col-button-right"),"col-xs-",$invoicesummary->getFooterHtml());
		$footer = str_replace("/div><div","/div><div style=\"height: 5px\"></div><div",$footer);
		$invoicesummary->setFooterHtml($footer); 
	}
});

JOdgeZj.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated