file Pages-and-items: save & close buttons @ frontend

More
11 years 5 months ago - 11 years 5 months ago #706 by nf1
It would be nice to have the save and close buttons not just at the start of the page but also at the bottom in the frontend edit/submit. This way if the itemtype has many fields, when the user is filling them up, he can click save right after he's finished and will not have the need to go to the top of the page for this. I guess this is an easy one. I'll be glad to look in to myself and will write here if I find a solution (I'm terrible at code, but I guess that I need to find the section of the code for save and close buttons and copy it somewhere at the bottom of the code).
Last edit: 11 years 5 months ago by nf1.

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #707 by nf1
As I said I looked at the code and found it. If anyone want to duplicate the save and close buttons to appear at the end of the frontend edit/submit form paste the following code:
<?php echo '<div class="right_align">';
echo '<input type="button" value="'._pi_lang_save.'" onclick="submitbutton2(\'item_save\')" />&nbsp;&nbsp;&nbsp;';
echo '<input type="button" value="'._pi_lang_cancel.'" onclick="history.back();" />';
echo '</div>'; ?>

into your /administrator/components/com_pi_pages_and_items/admin/item.php

right before the closing </form> tag (the tag should be at line 1999 for version 1.4.2).

Note: this is a hack and your changes will be deleted upon reinstall or upgrade to newer version.

@Carsten888 - if you find this useful, I believe we can see it in the future version of Pages and Items :)

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago - 11 years 5 months ago #721 by carsten888
Replied by carsten888 on topic Re:frontpage editing - save & close buttons
I will include this in tomorrows patch: version 1.4.3.

thank you for this usefull suggestion. got any more?
Last edit: 11 years 5 months ago by carsten888.

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #723 by nf1
When I have some I'll keep posted :).

However I just saw that my change to the code reflects also the back-end edit form. So the buttons are also visible there and the cancel is working because it's a history.back function but the save is not working there. I'm not sure how to disable these buttons for the back-end or make them both work.

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #727 by carsten888
Replied by carsten888 on topic Re:frontpage editing - save & close buttons

I'm not sure how to disable these buttons for the back-end or make them both work.

I did. The frontend buttons get repeated and in the backend the backend buttons get repeated.
:)

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #728 by nf1
It looks nice :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.108 seconds
Powered by Kunena Forum
 
spicy-sacerdotal