field_info(_tbl('entry')); $custom_fields = array(); // Fill $edit_entry_field_order with not yet specified entries. $entry_fields = array('create_by', 'name', 'description', 'start_time', 'end_time', 'room_id', 'type', 'confirmation_status', 'privacy_status'); foreach ($entry_fields as $field) { if (!in_array($field, $edit_entry_field_order)) { $edit_entry_field_order[] = $field; } } $custom_fields_map = array(); foreach ($fields as $field) { $key = $field['name']; if (!in_array($key, $standard_fields['entry'])) { $custom_fields_map[$key] = $field; if (!in_array($key, $edit_entry_field_order)) { $edit_entry_field_order[] = $key; } } } function get_field_create_by(string $create_by, bool $disabled=false) : Field { $params = array('label' => get_vocab('createdby'), 'name' => 'create_by', 'field' => 'entry.create_by', 'value' => $create_by, 'required' => true, 'disabled' => $disabled); return get_user_field($params); } function get_field_name(string $value, bool $disabled=false) : Field { $params = array('label' => get_vocab('namebooker'), 'name' => 'name', 'field' => 'entry.name', 'value' => $value, 'required' => true, 'disabled' => $disabled); return get_field_entry_input($params); } function get_field_description(string $value, int $area_id, bool $disabled=false) : Field { $params = array('label' => get_vocab('fulldescription'), 'name' => 'description', 'field' => 'entry.description', 'value' => $value, 'required' => is_mandatory_field('entry.description', $area_id), 'disabled' => $disabled); return get_field_entry_input($params); } // Generate a time or period selector starting with $first and ending with $last. // $time is a full Unix timestamp and is the current value. The selector returns // the start time in seconds since the beginning of the day for the start of that slot. // Note that these are nominal seconds and do not take account of any DST changes that // may have happened earlier in the day. (It's this way because we don't know what day // it is as that's controlled by the date selector - and we can't assume that we have // JavaScript enabled to go and read it) // // $display_none parameter sets the display style of the s, // s and