public function job_settings_init()
{
- add_settings_section(
- 'staffordsjobs_setting_section_two',
- 'Edit Confirmations',
- array($this, 'staffords_settings_two_section_callback'),
- 'staffordsjobs_settings'
- );
- add_settings_field(
- 'thank_you_text',
- 'Thank You Message',
- array($this, 'render_textarea_field'),
- 'staffordsjobs_settings',
- 'staffordsjobs_setting_section_two',
- 'thank_you_text'
- );
+ //add_settings_section(
+ //'staffordsjobs_setting_section_two',
+ //'Edit Confirmations',
+ //array($this, 'staffords_settings_two_section_callback'),
+ //'staffordsjobs_settings'
+ //);
+ //add_settings_field(
+ //'thank_you_text',
+ //'Thank You Message',
+ //array($this, 'render_textarea_field'),
+ //'staffordsjobs_settings',
+ //'staffordsjobs_setting_section_two',
+ //'thank_you_text'
+ //);
add_settings_section(
'staffordsjobs_setting_section',
- 'Edit Notifications',
+ 'Edit Form Settings',
array($this, 'staffords_settings_section_callback'),
'staffordsjobs_settings'
);
$fieldNames = array(
array(
- 'name' => 'notification_name',
- 'label' => 'Staffords Notify: Name',
- 'type' => 'text'
- ),
- array(
- 'name' => 'notification_email',
- 'label' => 'Staffords Notify: Email',
- 'type' => 'text'
- ),
- array(
- 'name' => 'from_name',
- 'label' => 'From: Name',
- 'type' => 'text'
- ),
- array(
- 'name' => 'from_email',
- 'label' => 'From: Email',
- 'type' => 'text'
- ),
- array(
- 'name' => 'replyto_name',
- 'label' => 'Reply-To: Name',
- 'type' => 'text'
- ),
- array(
- 'name' => 'replyto_email',
- 'label' => 'Reply-To: Email',
- 'type' => 'text'
- ),
- array(
- 'name' => 'notification_message',
- 'label' => 'Notification Message',
- 'type' => 'textarea'
- ),
- );
- $terms = get_terms(
- STAFFORDS_EMP_TAX_DEPARTMENTS,
- array(
- 'hide_empty' => false
+ 'name' => 'employment_form_page',
+ 'label' => 'Page for the Form',
+ 'type' => 'page'
)
+ //array(
+ //'name' => 'notification_name',
+ //'label' => 'Staffords Notify: Name',
+ //'type' => 'text'
+ //),
+ //array(
+ //'name' => 'notification_email',
+ //'label' => 'Staffords Notify: Email',
+ //'type' => 'text'
+ //),
+ //array(
+ //'name' => 'from_name',
+ //'label' => 'From: Name',
+ //'type' => 'text'
+ //),
+ //array(
+ //'name' => 'from_email',
+ //'label' => 'From: Email',
+ //'type' => 'text'
+ //),
+ //array(
+ //'name' => 'replyto_name',
+ //'label' => 'Reply-To: Name',
+ //'type' => 'text'
+ //),
+ //array(
+ //'name' => 'replyto_email',
+ //'label' => 'Reply-To: Email',
+ //'type' => 'text'
+ //),
+ //array(
+ //'name' => 'notification_message',
+ //'label' => 'Notification Message',
+ //'type' => 'textarea'
+ //),
);
- foreach ($terms as $term) {
- $termArray[] = $term->name;
- $fieldNames[] = array(
- 'name' => $term->slug . '_notification_name',
- 'label' => $term->name . ': Name',
- 'type' => 'text'
- );
- $fieldNames[] = array(
- 'name' => $term->slug . '_notification_email',
- 'label' => $term->name . ': Email',
- 'type' => 'text'
- );
- }
+ //$terms = get_terms(
+ //STAFFORDS_EMP_TAX_DEPARTMENTS,
+ //array(
+ //'hide_empty' => false
+ //)
+ //);
+ //foreach ($terms as $term) {
+ //$termArray[] = $term->name;
+ //$fieldNames[] = array(
+ //'name' => $term->slug . '_notification_name',
+ //'label' => $term->name . ': Name',
+ //'type' => 'text'
+ //);
+ //$fieldNames[] = array(
+ //'name' => $term->slug . '_notification_email',
+ //'label' => $term->name . ': Email',
+ //'type' => 'text'
+ //);
+ //}
foreach ($fieldNames as $field) {
$this->staffords_add_setting_text_field(
case 'state':
$callback = 'glmclientinfoRenderStateSelect';
break;
+ case 'page':
+ $callback = 'render_page_field';
+ break;
default:
return false;
break;
);
}
+ public function render_page_field($fieldName)
+ {
+ static $options;
+ if (!$options) {
+ $options = get_option(STAFFORDS_EMP_SETTINGS);
+ }
+ include $this->pluginDirName . 'views/page.php';
+ }
+
public function render_text_field($fieldName)
{
static $options;
public function staffords_settings_section_callback()
{
- echo __('Employment Form Email Notification', 'wordpress');
+ echo __('Employment Form Page', 'wordpress');
}
public function staffords_settings_two_section_callback()