Admin Panel Product Page - Save buttons not working

Hey I am having a problem with the admin panel product page.



I am working on a document manager addon and it has 2 separate but similar views to manage documents.



One is a standalone page that you can access in the admin menu under the Website section, which is used to manage all of the documents, and then there is another view on the product page which is breaking everything.



Because the 2 'views' are the same template, one is just filtering things out based on the product, I am trying to use the same template files for both.



The default document manager page that you access from the menu (and not a product page tab), works fine. The document manager forms and buttons work fine on the tab page also, but when you are on the product page, you can't save on any tab.



I should also mention that the form/button issue, is based in a popup window from the main script. I don't know if any of those particular template files would mess anything up?



I included the 2 template files that I am working with, can anybody spot anything that would break the product page save buttons?


```php







Product:

{foreach from=$doc_products item=product}
{$product.product}
{/foreach}




Type:

Sales Sheet
Assembly Sheet
Other



File:
{include file="common_templates/fileuploader.tpl" var_name="document_data[file]"}



{if !$documentDetails|fn_allow_save_object:"document" && $mode != "add"}
{assign var="hide_first_button" value=true}
{/if}
{include file="buttons/save_cancel.tpl" but_name="dispatch[tv_documentmanager.manage_documents]" cancel_action="close" hide_first_button=$hide_first_button}



```
```php








Product:
{if $mode eq "add"}

{foreach from=$doc_products item=product}

{$product.product}
{/foreach}

{else}
{foreach from=$doc_products item=product}
{if $templateDetails.product_id == $product.product_id || $product_filter == $product.product_id}{$product.product}

{/if}
{/foreach}
{/if}


Product Code:



Size:



Shape:



Layout:



Print Width:



Print Height:



Data Width:



Data Height:



Smart Product:



Smart Option 1:



Smart Option 2:



Material Width:



Use:



File:
{include file="common_templates/fileuploader.tpl" var_name="template_data[file]"}




{if !$templateDetails|fn_allow_save_object:"template" && $mode != "add"}
{assign var="hide_first_button" value=true}
{/if}
{include file="buttons/save_cancel.tpl" but_name="dispatch[tv_documentmanager.manage_documents]" cancel_action="close" hide_first_button=$hide_first_button}



```