-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,358 additions
and
1,542 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,4 @@ | ||
## module-extended_client_fields | ||
module_extended_client_fields | ||
============================= | ||
|
||
The Extended Client Fields module lets you construct any number of form fields to store additional information for your client accounts. The module comes with a number of nifty features, including: | ||
|
||
* Control whether the fields appear in the Edit Client -> Main tab or -> Settings tab. | ||
* Control the location and order they appear in the pages. | ||
* Choose whether the field should only appear for the administrator, or the client as well. | ||
* Each field can be of any of the following field types: textbox, textarea, select or multi-select dropdown, radio buttons or checkboxes. | ||
* You can define a default value for the fields. | ||
* Group related field under a section header (optional) | ||
|
||
For more information, check out the documentation. | ||
|
||
### Documentation | ||
|
||
[http://modules.formtools.org/custom_fields/](http://modules.formtools.org/custom_fields/) | ||
|
||
### Form Tools Extensions | ||
|
||
For further information about Form Tools extensions, check out the following link: | ||
[http://www.formtools.org/extensions.php](http://www.formtools.org/extensions.php) | ||
The Extended Client Fields module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,37 @@ | ||
<?php | ||
|
||
require("../../global/library.php"); | ||
ft_init_module_page(); | ||
|
||
if (isset($_POST["add"])) | ||
list($g_success, $g_message) = ecf_add_field($_POST); | ||
use FormTools\Core; | ||
use FormTools\Modules; | ||
use FormTools\Modules\ExtendedClientFields\Fields; | ||
|
||
$module = Modules::initModulePage("admin"); | ||
|
||
$LANG = Core::$L; | ||
$L = $module->getLangStrings(); | ||
|
||
$success = true; | ||
$message = ""; | ||
if (isset($_POST["add"])) { | ||
list($success, $message) = Fields::addField($_POST, $L); | ||
} | ||
|
||
$page_vars = array(); | ||
$page_vars["head_title"] = $L["phrase_add_field"]; | ||
$page_vars["head_string"] = "<script src=\"global/scripts/field_options.js\"></script>"; | ||
$page_vars["js_messages"] = array("word_delete"); | ||
$page_vars["head_js"] =<<< EOF | ||
var rules = []; | ||
rules.push("required,template_hook,{$L["validation_no_template_hook"]}"); | ||
rules.push("required,field_label,{$L["validation_no_field_label"]}"); | ||
rules.push("required,field_type,{$L["validation_no_field_type"]}"); | ||
$(function() { | ||
ecf_ns.add_field_option(null, null); | ||
ecf_ns.add_field_option(null, null); | ||
$("#field_type").val("").bind("change keyup", function() { | ||
ecf_ns.change_field_type(this.value); | ||
}); | ||
ecf_ns.add_field_option(null, null); | ||
ecf_ns.add_field_option(null, null); | ||
$("#field_type").val("").bind("change keyup", function() { | ||
ecf_ns.change_field_type(this.value); | ||
}); | ||
}); | ||
EOF; | ||
|
||
ft_display_module_page("templates/add.tpl", $page_vars); | ||
$module->displayPage("templates/add.tpl", $page_vars); |
Oops, something went wrong.