class SettingsForm

Methods

static boolean
isSettingsPost()

Check for incoming settings post data

static boolean
handleSettingsPost()

Handle incoming settings post data

static 
buttonText($right = false)

Emit a properly styled "settings" button

static 
button($right = false)

Emit a properly styled "settings" button

static 
link($right = false)

Emit a properly styled "settings" link

static 
attr()

Return the attributes to add to a tag to connect to activate the settings modal

static 
start()

No description

static 
end($ajax = false)

Finish the form output

static 
select(string $name, string $default = false, array $fields = false)

Handle a settings selector box

static 
text($name, $title = false)

Handle a settings text box

static 
number($name, $title = false)

Handle a settings number box

static 
textarea($name, $title = false)

Handle a settings textarea box

static 
checkbox($name, $title = false)

Handle a settings checkbox

static 
getDueDate()

Get the due data data in an object

static 
getDueDateDelta($time)

Show a due date delta in reasonable units

static 
dueDate()

Emit the text and form fields to support due dates

static 
done()

Emit the text and form fields to support the done option

Details

at line 29
static boolean isSettingsPost()

Check for incoming settings post data

Return Value

boolean Returns true if there were settings to handle and false if there was nothing done. Generally the calling tool will redirect when true is returned.

if ( SettingsForm::isSettingsPost() ) {
    // Do form validation if you like
    SettingsForm::handleSettingsPost();
    header( 'Location: '.U::addSession('index.php?howdysuppress=1') ) ;
    return;
}

at line 47
static boolean handleSettingsPost()

Handle incoming settings post data

Return Value

boolean Returns true if there were settings to handle and false if there was nothing done. Generally the calling tool will redirect when true is returned.

if ( SettingsForm::handleSettingsPost() ) {
    header( 'Location: '.U::addSession('index.php?howdysuppress=1') ) ;
    return;
}

at line 74
static buttonText($right = false)

Emit a properly styled "settings" button

This is just the button, using the pencil icon. Wrap in a span or div tag if you want to move it around

Parameters

$right

at line 92
static button($right = false)

Emit a properly styled "settings" button

This is just the button, using the pencil icon. Wrap in a span or div tag if you want to move it around

Parameters

$right

Emit a properly styled "settings" link

This is just the link, using the pencil icon and label.

Parameters

$right

at line 120
static attr()

Return the attributes to add to a tag to connect to activate the settings modal

at line 126
static start()

at line 154
static end($ajax = false)

Finish the form output

Parameters

$ajax

at line 207
static select(string $name, string $default = false, array $fields = false)

Handle a settings selector box

Parameters

string $name The name of the setting value
string $default What to display as the first entry in the drop down
array $fields The options to provide for the user (required)

at line 253
static text($name, $title = false)

Handle a settings text box

Parameters

$name
$title

at line 282
static number($name, $title = false)

Handle a settings number box

Parameters

$name
$title

at line 311
static textarea($name, $title = false)

Handle a settings textarea box

Parameters

$name
$title

at line 339
static checkbox($name, $title = false)

Handle a settings checkbox

Parameters

$name
$title

at line 388
static getDueDate()

Get the due data data in an object

at line 448
static getDueDateDelta($time)

Show a due date delta in reasonable units

Parameters

$time

at line 465
static dueDate()

Emit the text and form fields to support due dates

at line 522
static done()

Emit the text and form fields to support the done option