* but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see http://www.gnu.org/licenses/gpl.html. * * @package Client * @author Indicia Team * @license http://www.gnu.org/licenses/gpl.html GPL 3.0 * @link http://code.google.com/p/indicia/ */ /** * A simple script to return the parameters form for an input prebuilt form name. */ // Use iform to load the helpers, so it can set the configuration variables if running in Drupal require_once "form_helper.php"; // Let params forms internationalise. require_once "lang.php"; // set the path to JS and CSS files. This script runs standalone, so has to do this itself. $link = form_helper::get_reload_link_parts(); $path = dirname(dirname($link['path'])) . '/media'; form_helper::$js_path = "{$path}/js/"; form_helper::$css_path = "{$path}/css/"; form_helper::$is_ajax = true; form_helper::$base_url = $_POST['base_url']; $readAuth = form_helper::get_read_auth($_POST['website_id'], $_POST['password']); echo form_helper::prebuilt_form_params_form(array('form' => $_POST['form'], 'readAuth' => $readAuth, 'expandFirst' => true, 'generator' => isset($_POST['generator']) ? $_POST['generator'] : 'No generator metatag posted')); data_entry_helper::$dumped_resources[] = 'jquery'; data_entry_helper::$dumped_resources[] = 'jquery_ui'; echo form_helper::dump_javascript(true);
<div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'subject', 'field' => array('keyword' => 'active', 'type' => 'boolean'), 'value' => $subject)); ?> </div> </div> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_subject' => 1)); ?> </section> <?php view::load('cp/system/fields/multilang'); ?> <?php view::load('cp/system/elements/template/footer');
<?php echo form_helper::submit(isset($name) ? $name : 'submit', isset($value) ? $value : __('submit', 'system'), array('onclick' => isset($onclick) ? $onclick : '', 'class' => 'button submit ' . (isset($class) ? $class : '')));
<?php if (isset($actions) && $actions) { ?> <div class="actions"> <?php echo __('actions', 'system'); ?> <?php echo form_helper::select('action', $actions, '', array('class' => 'select', 'onchange' => "confirmForm('" . __('action_apply?', 'system') . "', '" . $form . "');this.value=0;")); ?> </div> <?php }
} ?> <?php if (isset($actions) && $actions) { ?> <?php view::load('cp/system/elements/form-actions', array('form' => 'form_pictures', 'actions' => $actions)); ?> <?php } ?> </div> <?php } ?> <?php echo form_helper::closeForm(array('do_action' => 1)); ?> <?php } ?> </section> <?php view::load('cp/system/elements/template/footer');
?> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php } ?> <?php echo form_helper::closeForm(array('do_save_meta_tags' => 1)); ?> </section> <script type="text/javascript"> $(function(){ $("#tabs ul").tabs({current:currentTab}); }); </script> <?php view::load('cp/system/fields/multilang'); ?> <?php
view::load('system/elements/field/edit', array('prefix' => 'page', 'field' => $field, 'value' => $comment)); ?> </div> </div> <?php } ?> <?php } ?> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_comment' => 1)); ?> </section> <?php view::load('cp/system/elements/template/footer');
<div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'user_privacy', 'field' => $setting, 'value' => isset($setting['value']) ? array($setting['keyword'] => $setting['value']) : array())); ?> </div> </div> <?php } ?> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_privacy' => 1)); ?> </section> <?php view::load('cp/system/elements/template/footer');
<?php echo form_helper::hidden('picture_thumb_x', 0, array('id' => 'picture_thumb_x')); ?> <?php echo form_helper::hidden('picture_thumb_y', 0, array('id' => 'picture_thumb_y')); ?> <?php echo form_helper::hidden('picture_thumb_w', config::item('picture_dimensions_l_width', 'users'), array('id' => 'picture_thumb_w')); ?> <?php echo form_helper::hidden('picture_thumb_h', config::item('picture_dimensions_l_height', 'users'), array('id' => 'picture_thumb_h')); ?> <?php echo form_helper::closeForm(array('do_save_thumbnail' => 1)); ?> </div> </section> <script type="text/javascript"> function createCropArea() { var jcrop_api; var bounds, boundx, boundy; $('.profile-picture-thumbnail figure.source img').Jcrop({ onChange: showPreview, onSelect: showPreview,
<?php echo __('active', 'system'); ?> </label> <div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'package', 'field' => array('keyword' => 'active', 'type' => 'boolean'), 'value' => $package)); ?> </div> </div> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_package' => 1)); ?> </section> <?php view::load('cp/system/elements/template/footer');
<label for="input_edit_user_account_password"> <?php echo __('password_current', 'users'); ?> </label> <div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'user_account', 'field' => array('keyword' => 'password', 'type' => 'password', 'maxlength' => 128))); ?> </div> </div> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_username' => 1)); ?> </section> <?php view::load('footer');
</label> <div class="field"> <?php view::load('system/elements/field/edit', array('field' => array('keyword' => 'keyword', 'type' => 'text', 'class' => 'input-xlarge'), 'error' => false, 'value' => $language)); ?> <?php echo form_helper::error('keyword'); ?> </div> </div> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_language' => 1)); ?> </section> <?php view::load('cp/system/elements/template/footer');
<?php if (config::item('templates_active', 'messages') && $templates) { ?> <?php echo html_helper::anchor('#', __('message_template_help', 'messages'), array('class' => 'template-help', 'onclick' => "\$('#messages-templates').slideToggle('fast');return false;")); ?> <?php } ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_conversation' => 1)); ?> <?php if (config::item('templates_active', 'messages') && $templates) { ?> <div id="messages-templates" class="hidden"> <h3><?php echo __('message_template_select', 'messages'); ?> </h3> <ul class="unstyled icon-list arrow"> <?php
<?php view::load('system/elements/field/edit', array('prefix' => 'newsletter', 'field' => array('keyword' => 'message_text', 'type' => 'textarea', 'multilang' => true), 'error' => false, 'value' => $newsletter)); ?> <?php echo form_helper::error('message_text'); ?> </div> </div> <div class="row actions"> <?php view::load('system/elements/button', array('value' => __('next', 'system'))); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_newsletter' => 1)); ?> </section> <?php view::load('cp/system/fields/multilang'); ?> <?php view::load('cp/system/elements/template/footer');
/** * Generates the parameters form required for configuring a prebuilt form. * Fieldsets are given classes which define that they are collapsible and normally initially * collapsed, though the css for handling this must be defined elsewhere. For Drupal usage this * css is normally handled by default in the template. * @param array $options Options array with the following possibilities:<ul> * <li><b>form</b> * Name of the form file without the .php extension, e.g. mnhnl_dynamic_1.</li> * <li><b>currentSettings</b> * Associative array of default values to load into the form controls.</li> * <li><b>expandFirst</b> * Optional. If set to true, then the first fieldset on the form is initially expanded.</li> * <li><b>siteSpecific</b> * Optional. Defaults to false. If true then only parameters marked as specific to a site * are loaded. Used to provide a reduced version of the params form after migrating a * form between sites (e.g. when installing a Drupal feature).</li> * <li><b>generator</b> * Optional. A string which, if it contains 'Drupal 7' is used to output * html specific to that CMS. </li> * </ul> */ public static function prebuilt_form_params_form($options) { if (function_exists('hostsite_add_library')) { hostsite_add_library('collapse'); } require_once 'data_entry_helper.php'; // temporarily disable caching because performance is not as important as reflecting // the latest available parameters, surveys etc. in the drop downs $oldnocache = self::$nocache; if (!isset($options['siteSpecific'])) { $options['siteSpecific'] = false; } self::$nocache = true; $formparams = self::get_form_parameters($options['form']); $fieldsets = array(); $r = ''; foreach ($formparams as $control) { // skip hidden controls or non-site specific controls when displaying the reduced site specific // version of the form if (isset($control['visible']) && !$control['visible'] || $options['siteSpecific'] && !(isset($control['siteSpecific']) && $control['siteSpecific'])) { continue; } $fieldset = isset($control['group']) ? $control['group'] : 'Other IForm Parameters'; // apply default options to the control $ctrlOptions = array_merge(array('id' => $control['fieldname'], 'sep' => '<br/>', 'class' => '', 'blankText' => '<' . lang::get('please select') . '>', 'extraParams' => array(), 'readAuth' => $options['readAuth']), $control); $type = self::map_type($control); // current form settings will overwrite the default if (isset($options['currentSettings']) && isset($options['currentSettings'][$control['fieldname']])) { $ctrlOptions['default'] = $options['currentSettings'][$control['fieldname']]; } $ctrlOptions['extraParams'] = array_merge($ctrlOptions['extraParams'], $options['readAuth']); // standardise the control width unless specified already in the control options if (strpos($ctrlOptions['class'], 'control-width') == false && $type != 'checkbox' && $type != 'report_helper::report_picker') { $ctrlOptions['class'] .= ' control-width-6'; } if (!isset($fieldsets[$fieldset])) { $fieldsets[$fieldset] = ''; } // form controls can specify the report helper class if (substr($type, 0, 15) == 'report_helper::') { $type = substr($type, 15); require_once 'report_helper.php'; $fieldsets[$fieldset] .= report_helper::$type($ctrlOptions); } else { $fieldsets[$fieldset] .= data_entry_helper::$type($ctrlOptions); } } $class = isset($options['expandFirst']) && $options['expandFirst'] ? 'collapsible' : 'collapsible collapsed'; foreach ($fieldsets as $fieldset => $content) { $r .= "<fieldset class=\"{$class}\">\n"; // In Drupal 7 the fieldset output includes an extra span // When called from within Drupal, DRUPAL_CORE_COMPATIBILITY can determine // version. When called by Ajax version has to be sent in $options. if (defined('DRUPAL_CORE_COMPATIBILITY') && DRUPAL_CORE_COMPATIBILITY === '7.x' || isset($options['generator']) && stristr($options['generator'], 'Drupal 7')) { $legendContent = "<span class=\"fieldset-legend\">{$fieldset}</span>"; } else { $legendContent = $fieldset; } $r .= "<legend>{$legendContent}</legend>\n"; $r .= "<div class=\"fieldset-wrapper\">\n"; $r .= $fieldsets[$fieldset]; $r .= "</div>\n"; $r .= "\n</fieldset>\n"; // any subsequent fieldset should be collapsed $class = 'collapsible collapsed'; } self::$nocache = $oldnocache; return $r; }
</label> <div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'user_account', 'field' => array('keyword' => 'old_password', 'type' => 'password', 'maxlength' => 128))); ?> </div> </div> <?php } ?> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_password' => 1)); ?> </section> <?php view::load('footer');
<div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'feedback_edit', 'field' => array('keyword' => 'captcha', 'type' => 'captcha'), 'value' => '')); ?> </div> </div> <?php } ?> <div class="row actions"> <?php view::load('system/elements/button', array('value' => __('send', 'system'))); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_send_feedback' => 1)); ?> </section> <?php view::load('footer');
* it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see http://www.gnu.org/licenses/gpl.html. * * @package Client * @author Indicia Team * @license http://www.gnu.org/licenses/gpl.html GPL 3.0 * @link http://code.google.com/p/indicia/ */ /** * A simple script to return the parameters form for an input prebuilt form name. */ // Use iform to load the helpers, so it can set the configuration variables if running in Drupal require_once "form_helper.php"; // set the path to JS and CSS files. This script runs standalone, so has to do this itself. $link = form_helper::get_reload_link_parts(); $path = dirname(dirname($link['path'])) . '/media'; form_helper::$js_path = "{$path}/js/"; form_helper::$css_path = "{$path}/css/"; form_helper::$is_ajax = true; form_helper::$base_url = $_POST['base_url']; $readAuth = form_helper::get_read_auth($_POST['website_id'], $_POST['password']); echo form_helper::prebuilt_form_params_form(array('form' => $_POST['form'], 'readAuth' => $readAuth, 'expandFirst' => true)); echo form_helper::dump_javascript();
view::load('system/elements/field/edit', array('prefix' => 'picture_album', 'field' => $option, 'value' => isset($album[$option['keyword']]) ? $album : $option)); ?> </div> </div> <?php } ?> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php } ?> <?php echo form_helper::closeForm(array('do_save_album' => 1)); ?> </section> <?php view::load('footer');
</div> <?php } ?> <div class="row actions"> <?php view::load('system/elements/button', array('value' => __('next', 'system'))); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_account' => 1)); ?> <?php } ?> <?php if (!session::item('connection', 'remote_connect')) { ?> <div class="remote-connect <?php echo config::item('auth_methods', 'users', 'default') && count(config::item('auth_methods', 'users')) > 1 ? 'extra' : ''; ?> "> <?php
<?php echo __('active', 'system'); ?> </label> <div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'banner', 'field' => array('keyword' => 'active', 'type' => 'boolean'), 'value' => $banner)); ?> </div> </div> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_banner' => 1)); ?> </section> <?php view::load('cp/system/elements/template/footer');
<div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'template', 'field' => array('keyword' => 'active', 'type' => 'boolean'), 'value' => $template)); ?> </div> </div> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_template' => 1)); ?> </section> <?php view::load('cp/system/fields/multilang'); ?> <?php view::load('cp/system/elements/template/footer');
<div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'storage_setting', 'field' => $setting, 'value' => $service['settings'])); ?> </div> </div> <?php } ?> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_settings' => 1)); ?> </section> <?php view::load('cp/system/elements/template/footer');
<div class="remote-connect extra"> <?php foreach (users_helper::authButtons('login', 'small') as $button) { ?> <?php echo $button; ?> <?php } ?> </div> </div> </fieldset> <?php echo form_helper::closeForm(array('do_login' => 1)); ?> <?php } elseif (uri::getURI() != 'users/login') { ?> <div class="remote-connect single"> <?php foreach (users_helper::authButtons('login') as $button) { ?> <?php echo $button; ?> <?php }
} ?> </ul> <fieldset class="form"> <div class="row actions"> <?php view::load('system/elements/button', array('value' => __('update', 'system'))); ?> <?php echo html_helper::anchor('pictures/index/' . $album['album_id'] . '/' . text_helper::slug($album['data_title'], 100), __('cancel', 'system')); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_pictures' => 1)); ?> <?php } ?> </section> <?php view::load('footer');
<div class="row"> <div class="field"> <?php echo __('file_max_size', 'system_files', array('%size' => $maxsize . __('size_mb', 'system_files'))); ?> <br/> <?php echo __('file_extensions', 'system_files', array('%extensions' => str_replace(',', ', ', $extensions))); ?> </div> </div> </fieldset> <?php echo form_helper::closeForm(array('do_upload' => 1)); ?> </div> <?php echo html_helper::style('externals/plupload/style.css'); ?> <script type="text/javascript"> var uploader = null; head.js('<?php echo html_helper::baseURL('externals/plupload/plupload.full.js'); ?> '); $(function () {
/** * Generates the parameters form required for configuring a prebuilt form. * Fieldsets are given classes which define that they are collapsible and normally initially * collapsed, though the css for handling this must be defined elsewhere. For Drupal usage this * css is normally handled by default in the template. * @param array $options Options array with the following possibilities:<ul> * <li><b>form</b> * Name of the form file without the .php extension, e.g. mnhnl_dynamic_1.</li> * <li><b>currentSettings</b> * Associative array of default values to load into the form controls.</li> * <li><b>expandFirst</b> * Optional. If set to true, then the first fieldset on the form is initially expanded.</li> * <li><b>siteSpecific</b> * Optional. Defaults to false. If true then only parameters marked as specific to a site * are loaded. Used to provide a reduced version of the params form after migrating a * form between sites (e.g. when installing a Drupal feature).</li> * </ul> */ public static function prebuilt_form_params_form($options) { require_once 'data_entry_helper.php'; // temporarily disable caching because performance is not as important as reflecting // the latest available parameters, surveys etc. in the drop downs $oldnocache = self::$nocache; if (!isset($options['siteSpecific'])) { $options['siteSpecific'] = false; } self::$nocache = true; $formparams = self::get_form_parameters($options['form']); $fieldsets = array(); $r = ''; foreach ($formparams as $control) { // skip hidden controls or non-site specific controls when displaying the reduced site specific // version of the form if (isset($control['visible']) && !$control['visible'] || $options['siteSpecific'] && !(isset($control['siteSpecific']) && $control['siteSpecific'])) { continue; } $fieldset = isset($control['group']) ? $control['group'] : 'Other IForm Parameters'; // apply default options to the control $ctrlOptions = array_merge(array('id' => $control['fieldname'], 'sep' => '<br/>', 'class' => '', 'blankText' => '<' . lang::get('please select') . '>', 'extraParams' => array(), 'readAuth' => $options['readAuth']), $control); $type = self::map_type($control); // current form settings will overwrite the default if (isset($options['currentSettings']) && isset($options['currentSettings'][$control['fieldname']])) { $ctrlOptions['default'] = $options['currentSettings'][$control['fieldname']]; } $ctrlOptions['extraParams'] = array_merge($ctrlOptions['extraParams'], $options['readAuth']); // standardise the control width unless specified already in the control options if (strpos($ctrlOptions['class'], 'control-width') == false && $type != 'checkbox') { $ctrlOptions['class'] .= ' control-width-6'; } if (!isset($fieldsets[$fieldset])) { $fieldsets[$fieldset] = ''; } // form controls can specify the report helper class if (substr($type, 0, 15) == 'report_helper::') { $type = substr($type, 15); require_once 'report_helper.php'; $fieldsets[$fieldset] .= report_helper::$type($ctrlOptions); } else { $fieldsets[$fieldset] .= data_entry_helper::$type($ctrlOptions); } } $class = isset($options['expandFirst']) && $options['expandFirst'] ? 'collapsible' : 'collapsible collapsed'; foreach ($fieldsets as $fieldset => $content) { $r .= "<fieldset class=\"{$class}\"><legend>{$fieldset}</legend>\n"; $r .= $fieldsets[$fieldset]; $r .= "\n</fieldset>\n"; // any subsequent fieldset should be collapsed if (isset($options['expandFirst']) && $options['expandFirst']) { $class .= ' collapsed'; } } self::$nocache = $oldnocache; return $r; }
<div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'user_notifications', 'field' => $setting, 'value' => isset($setting['value']) ? array($setting['keyword'] => $setting['value']) : array())); ?> </div> </div> <?php } ?> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_notifications' => 1)); ?> </section> <?php view::load('footer');
echo __('message', 'timeline'); ?> <span class="required">*</span> </label> <div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'message_edit', 'field' => array('keyword' => 'message', 'type' => 'textarea'), 'value' => $message)); ?> </div> </div> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_save_message' => 1)); ?> </section> <?php view::load('cp/system/elements/template/footer');
<?php echo __('report_message', 'reports'); ?> </label> <div class="field"> <?php view::load('system/elements/field/edit', array('prefix' => 'report_edit', 'field' => array('keyword' => 'message', 'type' => 'textarea', 'class' => 'input-wide'), 'value' => '')); ?> </div> </div> <div class="row actions"> <?php view::load('system/elements/button'); ?> </div> </fieldset> <?php echo form_helper::closeForm(array('do_submit_report' => 1)); ?> </section> <?php view::load('footer');