Author: deepak
Date: Sat Apr 21 09:26:21 2018
New Revision: 1829700
URL: http://svn.apache.org/viewvc?rev=1829700&view=rev
Log:
Improved: Improve layout and structure of forms
(OFBIZ-10221)
Applied product.template.Main patch from jira issue.
Thanks Dennis Balkir for your contribution.
Modified:
ofbiz/ofbiz-framework/trunk/applications/product/template/Main.ftl
Modified: ofbiz/ofbiz-framework/trunk/applications/product/template/Main.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/template/Main.ftl?rev=1829700&r1=1829699&r2=1829700&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/template/Main.ftl
(original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/template/Main.ftl Sat Apr
21 09:26:21 2018
@@ -17,43 +17,81 @@ specific language governing permissions
under the License.
-->
+
<#if !sessionAttributes.userLogin??>
<div class='label'> ${uiLabelMap.ProductGeneralMessage}.</div>
</#if>
<br />
-<#if security.hasEntityPermission("CATALOG", "_VIEW", session)>
- <div class="label">${uiLabelMap.ProductEditCatalogWithCatalogId}:</div>
- <form method="post" action="<@ofbizUrl>EditProdCatalog</@ofbizUrl>"
style="margin: 0;" name="EditProdCatalogForm">
- <input type="text" size="20" maxlength="20" name="prodCatalogId" value=""/>
- <input type="submit" value=" ${uiLabelMap.ProductEditCatalog}"
class="smallSubmit"/>
- </form>
- <div class="label">${uiLabelMap.CommonOr}: <a
href="<@ofbizUrl>EditProdCatalog</@ofbizUrl>"
class="buttontext">${uiLabelMap.ProductCreateNewCatalog}</a></div>
- <br />
- <div class="label">${uiLabelMap.ProductEditCategoryWithCategoryId}:</div>
- <form method="post" action="<@ofbizUrl>EditCategory</@ofbizUrl>"
style="margin: 0;" name="EditCategoryForm">
- <@htmlTemplate.lookupField name="productCategoryId" id="productCategoryId"
formName="EditCategoryForm" fieldFormName="LookupProductCategory"/>
- <input type="submit" value="${uiLabelMap.ProductEditCategory}"
class="smallSubmit"/>
- </form>
- <br />
- <div class="label">${uiLabelMap.CommonOr}: <a
href="<@ofbizUrl>EditCategory</@ofbizUrl>"
class="buttontext">${uiLabelMap.ProductCreateNewCategory}</a></div>
- <br />
- <div class="label">${uiLabelMap.ProductEditProductWithProductId}:</div>
- <form method="post" action="<@ofbizUrl>EditProduct</@ofbizUrl>"
style="margin: 0;" name="EditProductForm">
- <@htmlTemplate.lookupField name="productId" id="productId"
formName="EditProductForm" fieldFormName="LookupProduct"/>
- <input type="submit" value=" ${uiLabelMap.ProductEditProduct}"
class="smallSubmit"/>
+<#if security.hasEntityPermission( "CATALOG", "_VIEW", session)>
+ <div class="form-container">
+ <form class="basic-form" method="post"
action="<@ofbizUrl>EditProdCatalog</@ofbizUrl>" style="margin: 0;"
name="EditProdCatalogForm">
+ <table class="basic-table form-table">
+ <tr>
+ <td
class="label"><label>${uiLabelMap.ProductEditCatalogWithCatalogId}:</label></td>
+ <td>
+ <input type="text" size="20" maxlength="20" name="prodCatalogId"
value="" />
+ <input type="submit" value=" ${uiLabelMap.ProductEditCatalog}"
class="smallSubmit" />
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label>${uiLabelMap.CommonOr}:</label></td>
+ <td><a href="<@ofbizUrl>EditProdCatalog</@ofbizUrl>"
class="buttontext">${uiLabelMap.ProductCreateNewCatalog}</a></td>
+ </tr>
+ </table>
+ </form>
+ <form class="basic-form" method="post"
action="<@ofbizUrl>EditCategory</@ofbizUrl>" style="margin: 0;"
name="EditCategoryForm">
+ <table class="basic-table">
+ <tr>
+ <td
class="label"><label>${uiLabelMap.ProductEditCategoryWithCategoryId}:</label></td>
+ <td>
+ <@htmlTemplate.lookupField name="productCategoryId"
id="productCategoryId" formName="EditCategoryForm"
fieldFormName="LookupProductCategory" />
+ <input type="submit" value="${uiLabelMap.ProductEditCategory}"
class="smallSubmit" />
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label>${uiLabelMap.CommonOr}:</label></td>
+ <td><a href="<@ofbizUrl>EditCategory</@ofbizUrl>"
class="buttontext">${uiLabelMap.ProductCreateNewCategory}</a></td>
+ </tr>
+ </table>
</form>
- <br />
- <div class="label">${uiLabelMap.CommonOr}: <a
href="<@ofbizUrl>EditProduct</@ofbizUrl>"
class="buttontext">${uiLabelMap.ProductCreateNewProduct}</a></div>
- <br />
- <div class="label">${uiLabelMap.CommonOr}: <a
href="<@ofbizUrl>CreateVirtualWithVariantsForm</@ofbizUrl>"
class="buttontext">${uiLabelMap.ProductQuickCreateVirtualFromVariants}</a></div>
- <br />
- <div class="label">${uiLabelMap.ProductFindProductWithIdValue}:</div>
- <form method="post" action="<@ofbizUrl>FindProductById</@ofbizUrl>"
style="margin: 0;">
- <input type="text" size="20" maxlength="20" name="idValue" value=""/>
- <input type="submit" value=" ${uiLabelMap.ProductFindProduct}"
class="smallSubmit"/>
+ <form class="basic-form" method="post"
action="<@ofbizUrl>EditProduct</@ofbizUrl>" style="margin: 0;"
name="EditProductForm">
+ <table class="basic-table form-table">
+ <tr>
+ <td
class="label"><label>${uiLabelMap.ProductEditProductWithProductId}:</label></td>
+ <td>
+ <@htmlTemplate.lookupField name="productId" id="productId"
formName="EditProductForm" fieldFormName="LookupProduct" />
+ <input type="submit" value=" ${uiLabelMap.ProductEditProduct}"
class="smallSubmit" />
+ </td>
+ </tr>
+ </table>
</form>
- <br />
- <div><a href="<@ofbizUrl>UpdateAllKeywords</@ofbizUrl>" class="buttontext">
${uiLabelMap.ProductAutoCreateKeywordsForAllProducts}</a></div>
- <div><a href="<@ofbizUrl>FastLoadCache</@ofbizUrl>" class="buttontext">
${uiLabelMap.ProductFastLoadCatalogIntoCache}</a></div>
- <br />
+ <form class="basic-form" method="post"
action="<@ofbizUrl>FindProductById</@ofbizUrl>" style="margin: 0;">
+ <table class="basic-table form-table">
+ <tr>
+ <td
class="label"><label>${uiLabelMap.ProductFindProductWithIdValue}:</label>
+ </td>
+ <td>
+ <input type="text" name="idValue" value="" />
+ <input type="submit" value="${uiLabelMap.ProductFindProduct}"
class="smallSubmit" />
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label>${uiLabelMap.CommonOr}:</label>
+ </td>
+ <td> <a href="<@ofbizUrl>EditProduct</@ofbizUrl>"
class="buttontext">${uiLabelMap.ProductCreateNewProduct}</a>
+ <a href="<@ofbizUrl>CreateVirtualWithVariantsForm</@ofbizUrl>"
class="buttontext">${uiLabelMap.ProductQuickCreateVirtualFromVariants}</a></td>
+ </tr>
+ <tr>
+ <td class="label"/>
+ <td><a href="<@ofbizUrl>UpdateAllKeywords</@ofbizUrl>"
class="buttontext"> ${uiLabelMap.ProductAutoCreateKeywordsForAllProducts}</a>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"/>
+ <td>
+ <a href="<@ofbizUrl>FastLoadCache</@ofbizUrl>" class="buttontext">
${uiLabelMap.ProductFastLoadCatalogIntoCache}</a></td>
+ </tr>
+ </table>
+ </form>
+ </div>
</#if>