/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/form/form_elements/FEButton.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/form/form_elements/FEButton.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jonen, Sat Feb 22 21:07:47 2003 UTC revision 1.4 by jonen, Thu Aug 11 14:09:58 2005 UTC
# Line 4  Line 4 
4   *   *
5   * $Id$   * $Id$
6   *   *
7   * @author Walter A. Boring IV <waboring@buildabetterweb.com>   * @author Walter A. Boring IV <waboring@newsblob.com>
8   * @author Suren Markosyan <suren@bcsweb.com>   * @author Suren Markosyan <suren@bcsweb.com>
9   * @package phpHtmlLib   * @package phpHtmlLib
10   * @subpackage FormProcessing   * @subpackage FormProcessing
# Line 18  Line 18 
18   * input field of type="button". It has no validation method.   * input field of type="button". It has no validation method.
19   *   *
20   *   *
21   * @author Walter A. Boring IV <waboring@buildabetterweb.com>   * @author Walter A. Boring IV <waboring@newsblob.com>
22   * @author Suren Markossian <suren@bcsweb.com>   * @author Suren Markossian <suren@bcsweb.com>
23   * @package phpHtmlLib   * @package phpHtmlLib
24   * @subpackage FormProcessing   * @subpackage FormProcessing
# Line 91  class FEButton extends FEBoxElement { Line 91  class FEButton extends FEBoxElement {
91   * input field of type="submit". It has no validation method.   * input field of type="submit". It has no validation method.
92   *   *
93   *   *
94   * @author Walter A. Boring IV <waboring@buildabetterweb.com>   * @author Walter A. Boring IV <waboring@newsblob.com>
95   * @author Suren Markossian <suren@bcsweb.com>   * @author Suren Markossian <suren@bcsweb.com>
96   * @package phpHtmlLib   * @package phpHtmlLib
97   * @subpackage FormProcessing   * @subpackage FormProcessing
# Line 140  class FESubmitButton extends FEButton { Line 140  class FESubmitButton extends FEButton {
140          return $tag;          return $tag;
141      }      }
142  }  }
143    
144    
145    /**
146     * This builds a button that will do a JS popup
147     * question, asking for yes/no.  if yes, it submits
148     * the form.
149     *
150     * @author Walter A. Boring IV <waboring@newsblob.com>
151     * @author Suren Markossian <suren@bcsweb.com>
152     * @package phpHtmlLib
153     * @subpackage FormProcessing
154     *
155     * @copyright LGPL - See LICENCE
156     */
157    class FEConfirmActionButton extends FEButton {
158    
159        function FEConfirmActionButton($label, $value, $message = NULL, $width = NULL, $height = NULL) {
160            $action = "if (confirm('".$message."')) {this.form.".FORM_ACTION.".value='".$value."'; submit();}";
161            $this->FEButton($label, $value, $action, $width, $height);
162        }
163    }
164  ?>  ?>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed