public function render($value, $errors, $listing, $context)
 {
     if ($this->is_required()) {
         $validators = 'required money';
     } else {
         $validators = 'money';
     }
     $params = array('required' => $this->is_required(), 'value' => $this->format_value($value), 'errors' => $errors, 'label' => $this->get_label(), 'help_text' => '', 'validators' => $validators, 'html' => array('id' => str_replace('_', '-', $this->get_slug()), 'name' => $this->get_slug(), 'readonly' => false));
     return awpcp_render_template('frontend/form-fields/listing-contact-phone-form-field.tpl.php', $params);
 }
 public function render($value, $errors, $listing, $context)
 {
     $characters_limit = $this->get_characters_limit_for_listing($listing);
     if ($characters_limit['characters_allowed'] == 0) {
         $characters_allowed_text = _x('No characters limit.', 'ad details form', 'AWPCP');
         $remaining_characters_text = '';
     } else {
         $characters_allowed_text = _x('characters left.', 'ad details form', 'AWPCP');
         $remaining_characters_text = $characters_limit['remaining_characters'];
     }
     $params = array('required' => true, 'value' => $value, 'errors' => $errors, 'characters_allowed' => $characters_limit['characters_allowed'], 'characters_allowed_text' => $characters_allowed_text, 'remaining_characters' => $characters_limit['remaining_characters'], 'remaining_characters_text' => $remaining_characters_text, 'label' => $this->get_label(), 'html' => array('id' => 'ad-title', 'name' => $this->get_slug()));
     return awpcp_render_template('frontend/form-fields/listing-title-form-field.tpl.php', $params);
 }
 public function render($value, $errors, $listing, $context)
 {
     $characters_limit = $this->get_characters_limit_for_listing($listing);
     if ($characters_limit['characters_allowed'] == 0) {
         $characters_allowed_text = _x('No characters limit.', 'ad details form', 'AWPCP');
         $remaining_characters_text = '';
     } else {
         $characters_allowed_text = _x('characters left.', 'ad details form', 'AWPCP');
         $remaining_characters_text = $characters_limit['remaining_characters'];
     }
     if ($this->is_required()) {
         $validators = 'required';
     } else {
         $validators = '';
     }
     $params = array('required' => $this->is_required(), 'value' => $this->format_value($value), 'errors' => $errors, 'label' => $this->get_label(), 'help_text' => nl2br(get_awpcp_option('htmlstatustext')), 'validators' => $validators, 'characters_allowed' => $characters_limit['characters_allowed'], 'characters_allowed_text' => $characters_allowed_text, 'remaining_characters' => $characters_limit['remaining_characters'], 'remaining_characters_text' => $remaining_characters_text, 'html' => array('id' => str_replace('_', '-', $this->get_slug()), 'name' => $this->get_slug(), 'readonly' => false));
     return awpcp_render_template('frontend/form-fields/listing-details-form-field.tpl.php', $params);
 }
 private function render_datepicker_field($params, $errors)
 {
     $template = AWPCP_EXTRA_FIELDS_MODULE_DIR . '/templates/datepicker-form-field.tpl.php';
     return $this->render_extra_field(awpcp_render_template($template, $params), $params);
 }
 public function render($value, $errors, $listing, $context)
 {
     $params = array('required' => $this->is_required(), 'value' => $value, 'errors' => $errors, 'label' => $this->get_label(), 'html' => array('id' => str_replace('_', '-', $this->get_slug()), 'name' => $this->get_slug()));
     return awpcp_render_template('frontend/form-fields/listing-website-form-field.tpl.php', $params);
 }