<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Implementing Approval Method Related to AJAX in FA]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=2178&amp;type=atom" />
	<updated>2012-07-04T04:53:53Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=2178</id>
		<entry>
			<title type="html"><![CDATA[Re: Implementing Approval Method Related to AJAX in FA]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=12835#p12835" />
			<content type="html"><![CDATA[<p>hi bhoo-day,<br />how is your code? does janusz reply solve your problem?<br />i just searching approval module in many step in purchasing, sale, etc. <br />i hope bhoo-day can spread the code if it&#039;s good result.</p>]]></content>
			<author>
				<name><![CDATA[jojobbing]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=10137</uri>
			</author>
			<updated>2012-07-04T04:53:53Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=12835#p12835</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Implementing Approval Method Related to AJAX in FA]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9571#p9571" />
			<content type="html"><![CDATA[<p>Try use div_start(&#039;buttons&#039;), div_end() instead of &lt;p&gt; tags.<br />Paragraph tags need additional coding to make it working (see div_start/end code in ui_controls.inc).<br />Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2011-06-29T08:45:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9571#p9571</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Implementing Approval Method Related to AJAX in FA]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9526#p9526" />
			<content type="html"><![CDATA[<p>Hello everybody, </p><p>I&#039;m developing a custom module for budgeting usage. There is a approval feature to determine whether the budgeting usage is okay or not. <br />The problem I faced is I can&#039;t hide the approval button after I press the button and the Ajax run. The approval button is still there and I also can&#039;t display the notifications. </p><p>Here is my snippet codes<br /></p><div class="codebox"><pre><code>if($_POST[&#039;approve&#039;])
{
    $budget_usage_id = $_POST[&#039;budget_usage_id&#039;];
    
    approve_budget_usage($budget_usage_id);       
    
    display_notification_centered(_(&quot;The Budget usage has been approved.&quot;));  // Can&#039;t display it

    $_POST[&#039;approved&#039;] = &#039;1&#039;; // Approved

    $Ajax-&gt;activate(&#039;buttons&#039;);  // Should I use ajax here??
    
}</code></pre></div><p>For display<br /></p><div class="codebox"><pre><code>        &lt;p id=&quot;buttons&quot; style=&quot;text-align: center&quot;&gt;
        &lt;?php if($_POST[&#039;approved&#039;] == &#039;0&#039;): ?&gt; // Cek if the budget is approved or not
                &lt;?php submit(&#039;approve&#039;, _(&quot;Approve&quot;), true, &#039;&#039;, &#039;default&#039;); ?&gt;
        &lt;?php endif; ?&gt;
        &lt;/p&gt;     </code></pre></div><p>I&#039;m still curious about it even though I can use JQuery for it but it could be great if I can use Ajax from FA. </p><p>Thanks.</p>]]></content>
			<author>
				<name><![CDATA[bhoo-day]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=6251</uri>
			</author>
			<updated>2011-06-24T04:16:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9526#p9526</id>
		</entry>
</feed>
