Changeset 288
- Timestamp:
- 04/20/08 10:40:32 (8 months ago)
- Files:
-
- form/form.php (modified) (1 diff)
- form/import_profile.php (modified) (1 diff)
- form/lib.php (modified) (6 diffs)
- form/mysql.sql (modified) (2 diffs)
- form/plugin.info (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
form/form.php
r277 r288 54 54 $body = form_save($result->data,$_SESSION['userid'],$preview); 55 55 $body = '<p>'.$form->response_text.'</p>'.$body; 56 if ($form->notification) { 57 $msg = "Someone has submitted the form '$title'. \n\n" 58 ."To export the form results or turn form notification off, please login as a site administrator and visit:\n\n" 59 ."{$CFG->wwwroot}mod/form/index.php"; 60 $subject = "Form submission for '$title'"; 61 notify_user($form->owner, $subject, $msg); 62 } 56 63 } 57 64 } form/import_profile.php
r277 r288 192 192 $fd = new stdClass; 193 193 $fd->internal_name = $field->internal_name; 194 $fd->original_internal_name = $field->internal_name; 194 195 $fd->title = $field->name; 195 196 $fd->description = $field->description; form/lib.php
r277 r288 79 79 $response_text = $form->response_text; 80 80 $access = $form->access; 81 $notification = $form->notification; 81 82 $field_list = '<h1>'.__gettext("Current fields").'</h1><br />'; 82 83 if (isset($form->fields) && count($form->fields) > 0 ) { … … 173 174 $response_text = ''; 174 175 $access = $CFG->default_access; 176 $notification = 0; 175 177 $field_list = ''; 176 178 $buttons = ''; … … 191 193 $response_description = __gettext("Enter the content that will be displayed after the form has been submitted."); 192 194 $access_label = __gettext("Access"); 193 $access_description = __gettext("The access determines who is allowed to see this form."); 195 $access_description = __gettext("The access determines who is allowed to see this form."); 196 $notification_label = __gettext("Notification"); 197 $notification_description = __gettext("Tick this box to receive a notification each time someone submits this form."); 198 if ($notification) { 199 $notification_checked = 'checked'; 200 } else { 201 $notification_checked = ''; 202 } 203 194 204 195 205 $body = <<<END … … 263 273 $access_select 264 274 <p class="description">$access_description</p> 275 <label class="labelclass" for="notification">$notification_label</label> 276 <input type="checkbox" name="notification" value="1" $notification_checked> 277 <p class="description">$notification_description</p> 265 278 <br /> 266 <input type="submit" name="submit" value="$form_manage_button">279 <input type="submit" name="submit" value="$form_manage_button"> 267 280 </form> 268 281 END; … … 428 441 $form->response_text = optional_param('response_text',''); 429 442 $form->access = optional_param('access',''); 443 $form->notification = optional_param('notification',0,PARAM_INT); 430 444 if ($action == 'change') { 431 445 $form->ident = optional_param('form_id',0,PARAM_INT); … … 492 506 $obj = new stdClass; 493 507 $obj->name = $field->title; 494 $obj->internal_name = $field-> internal_name; // Short / unique internal name508 $obj->internal_name = $field->original_internal_name; // Short / unique internal name 495 509 $obj->description = $field->description; // User instructions for entering data 496 510 $obj->user_type = $user_type; // Type of user that can see this field form/mysql.sql
r277 r288 8 8 owner int(11) NOT NULL, 9 9 access varchar(20) NOT NULL, 10 notification int(1) NOT NULL, 10 11 PRIMARY KEY (ident), 11 12 KEY owner (owner), … … 17 18 ident int(11) NOT NULL auto_increment, 18 19 internal_name varchar(128) NOT NULL, 20 original_internal_name varchar(128) NOT NULL, 19 21 field_type varchar(128) NOT NULL, 20 22 title text, form/plugin.info
r277 r288 1 1 Maintainer: Kevin Jardine <kevin@radagast.biz> 2 2 Title: Form builder 3 Version: 0. 13 Version: 0.2 4 4 Package: form 5 5 Source-URL: https://svn.elgg.org/plugins/form
