[ Index ]

MailPress 544

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/class/options/form/field_types/checkbox/ -> checkbox.php (source)

   1  <?php
   2  class MP_Form_field_type_checkbox extends MP_form_field_type_
   3  {
   4      var $file    = __FILE__;
   5  
   6      var $id    = 'checkbox';
   7  
   8      var $category = 'html';
   9      var $order    = 40;
  10  
  11  	function submitted($field)
  12      {
  13          if (!isset($_POST[$this->prefix][$field->form_id][$field->id]))
  14          {
  15              $field->submitted['value'] = false;
  16              $field->submitted['text']  = __('not checked', MP_TXTDOM);
  17              return $field;
  18          }
  19          return parent::submitted($field);
  20      }
  21  
  22  	function attributes_filter($no_reset)
  23      {
  24          if (!$no_reset) return;
  25  
  26          unset($this->field->settings['attributes']['checked']);
  27          if (isset($_POST[$this->prefix][$this->field->form_id][$this->field->id])) $this->field->settings['attributes']['checked'] = 'checked';
  28  
  29          $this->attributes_filter_css();
  30      }
  31  }
  32  new MP_Form_field_type_checkbox(__('Checkbox', MP_TXTDOM));


Generated: Thu Apr 28 18:38:52 2016 Cross-referenced by PHPXref 0.7.1