Add Addtional Submit on large pages

12 years 7 months ago #179380 by rklein
Add Addtional Submit on large pages was created by rklein
I have a large profile edit page and was wanting to provide the user with a submit button at the top of the page and at the bottom. Is that possible?
Attachments:

Please Log in to join the conversation.

12 years 7 months ago #179441 by krileon
Replied by krileon on topic Re: Add Addtional Submit on large pages
It's possible to move the button by editing your CB default templates PHP file (or PHP file of whatever CB template you're using). Please see the below example.

IN: components/com_comprofiler/plugin/templates/default/default.php
ON: Line 184
[code type=php-brief]
function _renderEdit( ) {
[/code]

In the function above there's just a few minimal amount of lines of code. You'll notice "echo $this->tabcontent;" which outputs the profile edit. Below that is the HTML for the buttons. You could just copy and paste those and place them above "echo $this->tabcontent;" and would have buttons at the top as well.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 7 months ago #179471 by rklein
Replied by rklein on topic Re: Add Addtional Submit on large pages
I have tried to do what you mentioned but it keeps placing two at the bottom. I have attached the source code. Any help you could provide is always appreciated.

File Attachment:

File Name: ProfileProSource.txt
File Size:16 KB
Attachments:

Please Log in to join the conversation.

12 years 7 months ago #179489 by krileon
Replied by krileon on topic Re: Add Addtional Submit on large pages
IN: components/com_comprofiler/plugin/templates/default/default.php
ON: Line 184
FROM:
	function _renderEdit( ) {
		echo $this->tabcontent;
?>

		<span class="cb_button_wrapper"><input class="button cbProfileEditSubmit" type="submit" id="cbbtneditsubmit" value="<?php echo $this->submitValue; ?>" /></span>
		<span class="cb_button_wrapper"><input class="button cbProfileEditCancel" type="button" id="cbbtncancel" name="btncancel" value="<?php echo $this->cancelValue; ?>" /></span>
		<div id="cbIconsBottom">
			<?php echo $this->bottomIcons; ?>

		</div>

<?php
	}
TO:
	function _renderEdit( ) {
?>

		<span class="cb_button_wrapper"><input class="button cbProfileEditSubmit" type="submit" id="cbbtneditsubmit" value="<?php echo $this->submitValue; ?>" /></span>
		<span class="cb_button_wrapper"><input class="button cbProfileEditCancel" type="button" id="cbbtncancel" name="btncancel" value="<?php echo $this->cancelValue; ?>" /></span>

<?php
		echo $this->tabcontent;
?>

		<span class="cb_button_wrapper"><input class="button cbProfileEditSubmit" type="submit" id="cbbtneditsubmit" value="<?php echo $this->submitValue; ?>" /></span>
		<span class="cb_button_wrapper"><input class="button cbProfileEditCancel" type="button" id="cbbtncancel" name="btncancel" value="<?php echo $this->cancelValue; ?>" /></span>
		<div id="cbIconsBottom">
			<?php echo $this->bottomIcons; ?>

		</div>

<?php
	}

You'll probably need to make extra changes to the HTML or add extra CSS so the buttons aren't so close to the tabs, but that'll give you the top button display on a standard CB install. Given your profile edit is no longer tabbed am guessing you've modified core files or are using some sort of extension to get a 1 page display, which I can't help any further with. I've tested the above as guaranteed to work on clean CB install.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.201 seconds

Facebook Twitter LinkedIn