|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
littlelorly86 Smarty n00b
Joined: 02 Feb 2012 Posts: 2
|
Posted: Wed Feb 15, 2012 7:08 am Post subject: Confuse with this pieces of code in smarty |
|
|
I was asked to repair a page and i'm new to smarty. I found this code below:
Code: | { fieldset class='submit'}
{ field type='submit' value='save'|language }
{ if $smarty.request.category_id && !$smarty.request.saved }
{ field type='cancel' value='cancel'|language name='cancel' url="`$smarty.server.PHP_SELF`?category=1" }
{ else }
{ field type='reset' name='reset' value='reset'|language }
{ /if }
{ /fieldset } |
I am confuse why when i view the source of the page i found on the submit button there is an onlick event and an hidden input type.
This is the source code i got from the web page:
Code: | <fieldset class="submit">
<input type="hidden" name="submit_buttons[]">
<input type="submit" onclick="if (window.Disabled){ return false;} else {window.Disabled = true; }" class="button submit_button" value="Save">
<input type="reset" class="button reset_button" value="Reset" name="reset">
</fieldset> |
I need the onclick to be remove in the submit button. How would i do that? |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Wed Feb 15, 2012 8:47 am Post subject: |
|
|
look for the plugin acting on 'field'. Might be
* a function plugin in file plugins/function.field.php,
* a function plugin registered with register_function() or registerPlugin()
* a prefilter plugin registered with register_prefilter() or registerPlugin() or $autoload_filters (not necessarily having "field" in its name) _________________ Twitter |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Wed Feb 15, 2012 9:17 am Post subject: |
|
|
Also see Question on stackoverflow _________________ Twitter |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|