예제 #1
0
파일: configure.php 프로젝트: rair/yacs
     $context['files_path'] = '';
 }
 $label = i18n::s('Local path');
 $input = '<input type="text" name="files_path" size="45" value="' . encode_field($context['files_path']) . '" maxlength="255" />';
 $hint = i18n::s('The place where shared files will be written.');
 $fields[] = array($label, $input, $hint);
 // the ftp prefix
 if (!isset($context['files_url'])) {
     $context['files_url'] = '';
 }
 $label = i18n::s('FTP prefix');
 $input = '<input type="text" name="files_url" size="45" value="' . encode_field($context['files_url']) . '" maxlength="255" />';
 $hint = i18n::s('The ftp:// address that is inserted in links used to download files remotely');
 $fields[] = array($label, $input, $hint);
 // put the set of fields in the page
 $store .= Skin::build_form($fields);
 $fields = array();
 //
 // assemble all tabs
 //
 $all_tabs = array(array('extensions', i18n::s('Extensions'), 'extensions_panel', $extensions), array('store', i18n::s('Storage'), 'store_panel', $store));
 // let YACS do the hard job
 $context['text'] .= Skin::build_tabs($all_tabs);
 //
 // bottom commands
 //
 $menu = array();
 // the submit button
 $menu[] = Skin::build_submit_button(i18n::s('Submit'), i18n::s('Press [s] to submit data'), 's');
 // control panel
 if (file_exists('../parameters/control.include.php')) {
예제 #2
0
파일: new.php 프로젝트: rair/yacs
    $hint = i18n::s('Used as message subject line');
    $fields[] = array($label, $input, $hint);
    // letter content
    $label = i18n::s('Content');
    $input = Surfer::get_editor('letter_body', $context['letter_body']);
    $fields[] = array($label, $input, $hint);
    // letter recipients
    $label = i18n::s('Recipients');
    $input = '<input type="radio" name="letter_recipients" size="40" value="all" checked="checked" /> ' . i18n::s('All subscribers of the community') . BR . "\n";
    $input .= '<input type="radio" name="letter_recipients" size="40" value="members" /> ' . i18n::s('Members only') . BR . "\n";
    $input .= '<input type="radio" name="letter_recipients" size="40" value="associates" /> ' . i18n::s('Associates only') . BR . "\n";
    $input .= '<input type="radio" name="letter_recipients" size="40" value="custom" /> ' . i18n::s('Specific addresses:') . ' <input type="text" name="mail_to"  onfocus="document.main_form.letter_recipients[3].checked=\'checked\'" size="40" />' . BR . "\n";
    $hint = i18n::s('The recipients that will receive the letter');
    $fields[] = array($label, $input, $hint);
    // build the form
    $context['text'] .= Skin::build_form($fields);
    // the submit button
    $context['text'] .= '<p>' . Skin::build_submit_button(i18n::s('Send'), i18n::s('Press [s] to submit data'), 's') . '</p>' . "\n";
    // end of the form
    $context['text'] .= '</div></form>';
    // the script used for form handling at the browser
    Page::insert_script('func' . 'tion validateDocumentPost(container) {' . "\n" . '	// letter_title is mandatory' . "\n" . '	if(!container.letter_title.value) {' . "\n" . '		alert("' . i18n::s('No title has been provided.') . '");' . "\n" . '		Yacs.stopWorking();' . "\n" . '		return false;' . "\n" . '	}' . "\n" . '	return true;' . "\n" . '}' . "\n" . "\n" . 'document.main_form.letter_title.focus();' . "\n");
    // no mail in demo mode
} elseif (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST' && file_exists($context['path_to_root'] . 'parameters/demo.flag')) {
    Safe::header('Status: 401 Unauthorized', TRUE, 401);
    Logger::error(i18n::s('You are not allowed to perform this operation in demonstration mode.'));
    // handle posted data
} elseif (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
    // ensure all letters will be sent even if the browser connection dies
    Safe::ignore_user_abort(TRUE);
    // always archive the letter
예제 #3
0
파일: configure.php 프로젝트: rair/yacs
     $input .= ' checked="checked"';
 }
 $input .= '/> ' . i18n::s('Similar to the first option, except that displayed information is scrolling.');
 $input .= BR . '<input type="radio" name="root_news_layout" value="rotate"';
 if (isset($context['root_news_layout']) && $context['root_news_layout'] == 'rotate') {
     $input .= ' checked="checked"';
 }
 $input .= '/> ' . i18n::s('Similar to the first option, except that news are rotated.');
 $input .= BR . '<input type="radio" name="root_news_layout" value="none"';
 if (isset($context['root_news_layout']) && $context['root_news_layout'] == 'none') {
     $input .= ' checked="checked"';
 }
 $input .= '/> ' . i18n::s('Do not list news.');
 $fields[] = array($label, $input);
 // build the form
 $extra .= Skin::build_form($fields);
 $fields = array();
 //
 // assemble all tabs
 //
 $all_tabs = array(array('main', i18n::s('Main panel'), 'main_content', $main), array('extra', i18n::s('Side panel'), 'extra_content', $extra));
 // let YACS do the hard job
 $context['text'] .= Skin::build_tabs($all_tabs);
 //
 // bottom commands
 //
 $menu = array();
 // the submit button
 $menu[] = Skin::build_submit_button(i18n::s('Submit'), i18n::s('Press [s] to submit data'), 's');
 // control panel
 if (file_exists('parameters/control.include.php')) {
예제 #4
0
                 $selected = '';
                 if ($overlay_name == $overlay_type) {
                     $selected = ' selected="selected"';
                 }
                 $input .= '<option value="' . $overlay_name . '"' . $selected . '>' . $overlay_name . "</option>\n";
             }
         }
     }
     $input .= '</select>';
     $fields[] = array($label, $input, $hint);
     // remember overlay type
 } elseif (is_object($overlay)) {
     $text .= '<input type="hidden" name="overlay_type" value="' . encode_field($overlay->get_type()) . '" />';
 }
 // add a folded box
 $text .= Skin::build_box(i18n::s('More options'), Skin::build_form($fields), 'folded');
 $fields = array();
 // display in a separate panel
 if ($text) {
     $panels[] = array('options', i18n::s('Options'), 'options_panel', $text);
 }
 // preserve attributes coming from template duplication
 if (!isset($item['id'])) {
     $hidden = array('behaviors', 'extra', 'icon_url', 'index_map', 'prefix', 'suffix', 'trailer');
     foreach ($hidden as $name) {
         if (isset($item[$name])) {
             $context['text'] .= '<input type="hidden" name="' . $name . '" value="' . $item[$name] . '" />';
         }
     }
 }
 // or preserve attributes not managed interactively
예제 #5
0
파일: configure.php 프로젝트: rair/yacs
 //
 $uploads = '';
 // the splash message
 $uploads .= '<p>' . i18n::s('Following parameters are used for files uploaded to this server, for example via FTP. These do not apply to pages submitted through web forms or XML-RPC.') . "</p>\n";
 // uploads_nick_name
 $label = i18n::s('Author nick name or id');
 $input = '<input type="text" name="uploads_nick_name" size="40" value="' . encode_field(isset($context['uploads_nick_name']) ? $context['uploads_nick_name'] : '') . '" maxlength="255" />';
 $hint = i18n::s('To impersonate the default user that has uploaded a file');
 $fields[] = array($label, $input, $hint);
 // uploads_anchor
 $label = i18n::s('Section');
 $input = '<input type="text" name="uploads_anchor" size="40" value="' . encode_field(isset($context['uploads_anchor']) ? $context['uploads_anchor'] : '') . '" maxlength="255" />';
 $hint = i18n::s('The section to post new pages (e.g., \'section:2343\')');
 $fields[] = array($label, $input, $hint);
 // build the form
 $uploads .= Skin::build_form($fields);
 $fields = array();
 //
 // assemble all tabs
 //
 $all_tabs = array(array('messages', i18n::s('Messages'), 'messages_panel', $messages), array('uploads', i18n::s('Uploads'), 'uploads_panel', $uploads));
 // let YACS do the hard job
 $context['text'] .= Skin::build_tabs($all_tabs);
 //
 // bottom commands
 //
 $menu = array();
 // the submit button
 $menu[] = Skin::build_submit_button(i18n::s('Submit'), i18n::s('Press [s] to submit data'), 's');
 // control panel
 if (file_exists('../parameters/control.include.php')) {
예제 #6
0
파일: configure.php 프로젝트: rair/yacs
 }
 $label = i18n::s('Maximum news');
 $input = '<input type="text" name="maximum_news" size="10" value="' . encode_field($context['maximum_news']) . '" maxlength="5" />';
 $hint = i18n::s('Oldest news entries will be deleted');
 $fields[] = array($label, $input, $hint);
 // debug_feeds
 $label = i18n::s('Debug feeds');
 $checked = '';
 if (isset($context['debug_feeds']) && $context['debug_feeds'] == 'Y') {
     $checked = 'checked="checked" ';
 }
 $input = '<input type="checkbox" name="debug_feeds" value="Y" ' . $checked . '/> ' . i18n::s('Save data sent and received in temporary/debug.txt');
 $hint = i18n::s('Use this option only for troubleshooting');
 $fields[] = array($label, $input, $hint);
 // build the form
 $inbound .= Skin::build_form($fields);
 $fields = array();
 //
 // assemble all tabs
 //
 $all_tabs = array(array('outbound', i18n::s('Outbound'), 'outbound_panel', $outbound), array('inbound', i18n::s('Inbound'), 'inbound_panel', $inbound));
 // let YACS do the hard job
 $context['text'] .= Skin::build_tabs($all_tabs);
 //
 // bottom commands
 //
 $menu = array();
 // the submit button
 $menu[] = Skin::build_submit_button(i18n::s('Submit'), i18n::s('Press [s] to submit data'), 's');
 // control panel
 if (file_exists('../parameters/control.include.php')) {
예제 #7
0
파일: derive.php 프로젝트: rair/yacs
                $box['text'] .= $skin;
            }
        }
    }
    $box['text'] .= '</select>';
    $context['text'] .= Skin::build_box($box['title'], $box['text']);
    // step 2 - name the new skin
    $box = array();
    $box['title'] = i18n::s('Step 2- Name the new skin');
    // the name for the new skin
    $label = i18n::s('Skin name');
    $input = '<input type="text" name="directory" value="' . encode_field(i18n::s('my_skin')) . '" size="45" maxlength="255" accesskey="d" />';
    $hint = i18n::s('Also the name of the sub-directory for skin files');
    $fields[] = array($label, $input, $hint);
    // build the form
    $box['text'] = Skin::build_form($fields);
    $context['text'] .= Skin::build_box($box['title'], $box['text']);
    // step 3 - do the job
    $box = array();
    $box['title'] = i18n::s('Step 3- Do the job');
    // the submit button
    $box['text'] = '<p>' . Skin::build_submit_button(i18n::s('Copy and transcode files'), i18n::s('Press [s] to submit data'), 's') . '</p>' . "\n";
    $context['text'] .= Skin::build_box($box['title'], $box['text']);
    // end of the form
    $context['text'] .= '</div></form>';
    // general help on this form
    $help = '<p>' . sprintf(i18n::s('For more information on skins, visit %s'), Skin::build_link(i18n::s('http://www.yacs.fr/'), 'the YACS web site', 'external')) . '</p>';
    $context['components']['boxes'] = Skin::build_box(i18n::s('Help'), $help, 'boxes', 'help');
}
// render the skin
render_skin();
예제 #8
0
파일: edit.php 프로젝트: rair/yacs
 $label = i18n::s('Source');
 $input = '<input type="text" name="source" size="45" value="' . encode_field(isset($item['source']) ? $item['source'] : '') . '" maxlength="255" accesskey="u" />';
 $hint = i18n::s('If you have got this file from outside source, please describe it here');
 $fields[] = array($label, $input, $hint);
 // keywords
 $label = i18n::s('Keywords');
 $input = '<input type="text" name="keywords" size="45" value="' . encode_field(isset($item['keywords']) ? $item['keywords'] : '') . '" maxlength="255" accesskey="o" />';
 $hint = i18n::s('As this field may be searched by surfers, please choose adequate searchable words');
 $fields[] = array($label, $input, $hint);
 // alternate href
 $label = i18n::s('Alternate link');
 $input = '<input type="text" name="alternate_href" size="45" value="' . encode_field(isset($item['alternate_href']) ? $item['alternate_href'] : '') . '" maxlength="255" />';
 $hint = i18n::s('Paste here complicated peer-to-peer href (ed2k, torrent, etc.)');
 $fields[] = array($label, $input, $hint);
 // append fields
 $text .= Skin::build_form($fields);
 $fields = array();
 // display in a separate panel
 if ($text) {
     $panels[] = array('options', i18n::s('Options'), 'options_panel', $text);
 }
 //
 // assemble all tabs
 //
 $context['text'] .= Skin::build_tabs($panels);
 // bottom commands
 if (!$render_overlaid) {
     $menu = array();
     $menu[] = Skin::build_submit_button(i18n::s('Submit'), i18n::s('Press [s] to submit data'), 's');
     if (is_object($anchor) && $anchor->is_viewable()) {
         $menu[] = Skin::build_link($anchor->get_url(), i18n::s('Cancel'), 'span');
예제 #9
0
파일: event.php 프로젝트: rair/yacs
 /**
  * add some tabs
  *
  * Manage the event in a separate panel
  *
  * Accepted action codes:
  * - 'edit' - embedded into the main form page
  *
  * @see overlays/overlay.php
  *
  * @param string the on-going action
  * @param array the hosting record
  * @return an array of array('tab_id', 'tab_label', 'panel_id', 'panel_content') or NULL
  */
 function &get_tabs($variant = 'view', $host = NULL)
 {
     global $context, $local;
     // returned tabs
     $tabs = array();
     $now = strftime('%Y-%m-%d %H:%M:%S', time() + (Surfer::get_gmt_offset() - intval($context['gmt_offset'])) * 3600);
     // trackings
     //
     $manage = '';
     $fields = array();
     // manage the event
     if ($variant == 'edit') {
         // event preparation
         $manage .= Skin::build_block(i18n::s('Event preparation'), 'header2');
         // induction message
         $label = i18n::s('Induction message');
         if (!isset($this->attributes['induction_message'])) {
             $this->attributes['induction_message'] = $this->get_induction_default_message();
         }
         $input = Surfer::get_editor('induction_message', $this->attributes['induction_message']);
         $hint = i18n::s('Displayed until the beginning of the event.');
         $fields[] = array($label, $input, $hint);
         // other event details
         $fields = array_merge($fields, $this->get_event_fields());
         // should we manage enrolment?
         if ($this->with_enrolment()) {
             // enrolment
             $label = i18n::s('Enrolment');
             // none
             if (!isset($this->attributes['enrolment'])) {
                 $this->attributes['enrolment'] = 'none';
             }
             $input = '<input type="radio" name="enrolment" value="none"';
             if (!isset($this->attributes['enrolment']) || $this->attributes['enrolment'] == 'none') {
                 $input .= ' checked="checked"';
             }
             $input .= '/> ' . i18n::s('Any page visitor can participate') . BR;
             // apply-and-validate
             $input .= '<input type="radio" name="enrolment" value="validate"';
             if (!isset($this->attributes['enrolment']) || $this->attributes['enrolment'] == 'validate') {
                 $input .= ' checked="checked"';
             }
             $input .= '/> ' . i18n::s('Accept applications, to be confirmed by page owner') . BR;
             // manual registration
             $input .= '<input type="radio" name="enrolment" value="manual"';
             if (isset($this->attributes['enrolment']) && $this->attributes['enrolment'] == 'manual') {
                 $input .= ' checked="checked"';
             }
             $input .= '/> ' . i18n::s('Registration is managed by page owner') . BR;
             // expand the form
             $fields[] = array($label, $input);
         }
         $manage .= Skin::build_form($fields);
         $fields = array();
         // meeting initiation
         $manage .= Skin::build_block(i18n::s('During the event'), 'header2');
         // lobby message
         $label = i18n::s('Lobby message');
         if (!isset($this->attributes['lobby_message'])) {
             $this->attributes['lobby_message'] = $this->get_lobby_default_message();
         }
         $input = '<textarea name="lobby_message" rows="2" cols="50">' . encode_field($this->attributes['lobby_message']) . '</textarea>';
         $hint = i18n::s('Displayed one hour ahead the beginning of the event.');
         $fields[] = array($label, $input, $hint);
         // welcome message
         $label = i18n::s('Welcome message');
         if (!isset($this->attributes['welcome_message'])) {
             $this->attributes['welcome_message'] = '';
         }
         $input = Surfer::get_editor('welcome_message', $this->attributes['welcome_message']);
         $hint = i18n::s('Displayed only during the event.');
         $fields[] = array($label, $input, $hint);
         // assemble the form
         $manage .= Skin::build_form($fields);
         $fields = array();
         // event follow-up
         $manage .= Skin::build_block(i18n::s('After the event'), 'header2');
         // splash message
         $label = i18n::s('Follow-up message');
         if (!isset($this->attributes['follow_up_message'])) {
             $this->attributes['follow_up_message'] = $this->get_follow_up_default_message();
         }
         $input = Surfer::get_editor('follow_up_message', $this->attributes['follow_up_message']);
         $hint = i18n::s('Congratulate participants, and drive people to complementary information or action.');
         $fields[] = array($label, $input, $hint);
         $manage .= Skin::build_form($fields);
         $fields = array();
     }
     // finalize this tab
     if ($manage) {
         $tabs[] = array('management', i18n::s('Management'), 'management_panel', $manage);
     }
     // add these tabs
     return $tabs;
 }
예제 #10
0
파일: configure.php 프로젝트: rair/yacs
 $fields[] = array($label, $input);
 // with anonymous comments
 $label = i18n::s('Comments');
 $input = '<input type="radio" name="users_with_anonymous_comments" value="N"';
 if (!isset($context['users_with_anonymous_comments']) || $context['users_with_anonymous_comments'] != 'Y') {
     $input .= ' checked="checked"';
 }
 $input .= '/> ' . i18n::s('Only authenticated surfers can send comments.');
 $input .= BR . '<input type="radio" name="users_with_anonymous_comments" value="Y"';
 if (isset($context['users_with_anonymous_comments']) && $context['users_with_anonymous_comments'] == 'Y') {
     $input .= ' checked="checked"';
 }
 $input .= '/> ' . i18n::s('Allow anonymous surfers to post comments.');
 $fields[] = array($label, $input);
 // build the form
 $submission .= Skin::build_form($fields);
 $fields = array();
 //
 // assemble all tabs
 //
 $all_tabs = array(array('registration', i18n::s('Registration'), 'registration_panel', $registration), array('authentication', i18n::s('Authentication'), 'authentication_panel', $authentication), array('content', i18n::s('Content'), 'content_panel', $content), array('submission', i18n::s('Submission'), 'submission_panel', $submission));
 // let YACS do the hard job
 $context['text'] .= Skin::build_tabs($all_tabs);
 //
 // bottom commands
 //
 $menu = array();
 // the submit button
 $menu[] = Skin::build_submit_button(i18n::s('Submit'), i18n::s('Press [s] to submit data'), 's');
 // control panel
 if (file_exists('../parameters/control.include.php')) {
예제 #11
0
파일: issue.php 프로젝트: rair/yacs
 /**
  * add some tabs
  *
  * Display additional information in panels.
  *
  * Accepted action codes:
  * - 'edit' - embedded into the main form page
  *
  * @see overlays/overlay.php
  *
  * @param string the on-going action
  * @param array the hosting record
  * @return an array of array('tab_id', 'tab_label', 'panel_id', 'panel_content') or NULL
  */
 function &get_tabs($variant = 'view', $host = NULL)
 {
     global $context, $local;
     // returned tabs
     $tabs = array();
     $now = strftime('%Y-%m-%d %H:%M:%S', time() + (Surfer::get_gmt_offset() - intval($context['gmt_offset'])) * 3600);
     // trackings
     //
     $tracking = '';
     // only associates and page owners can change the status
     if ($variant == 'edit' && isset($this->anchor) && $this->anchor->is_owned()) {
         // a table of fields
         $fields = array();
         // owner
         $label = i18n::s('Owner');
         if (isset($host['owner_id']) && ($user = Users::get($host['owner_id']))) {
             $value = $user['nick_name'];
         } else {
             $value = '';
         }
         $input = '<input type="text" name="owner" id="owner" value ="' . encode_field($value) . '" size="25" maxlength="32" />';
         $hint = i18n::s('Type some letters of the name and select in the list');
         $fields[] = array($label, $input, $hint);
         // enable owner autocompletion
         Page::insert_script('$(function() { Yacs.autocomplete_names("owner",true); });');
         // priority
         $label = i18n::s('Priority');
         if (!isset($this->attributes['color'])) {
             $this->attributes['color'] = 'green';
         }
         $input = self::get_color_as_radio_buttons($this->attributes['color']);
         $fields[] = array($label, $input);
         // type
         $label = i18n::s('Workflow');
         if (!isset($this->attributes['type'])) {
             $this->attributes['type'] = 'incident';
         }
         $input = '<select name="type" id="type">' . self::get_type_options($this->attributes['type']) . '</select>';
         $fields[] = array($label, $input);
         // format these fields
         $tracking .= Skin::build_form($fields);
         $fields = array();
         // to represent transitions from one step to the next one
         Skin::define_img('NEXT_STEP', 'overlays/next_step.gif', 'V');
         // status
         if (!isset($this->attributes['status'])) {
             $this->attributes['status'] = 'on-going:suspect';
         }
         // create_date
         if (!isset($host['create_date']) || !$host['create_date']) {
             $host['create_date'] = gmstrftime('%Y-%m-%d %H:%M:%S');
         }
         $host['create_date'] = Surfer::from_GMT($host['create_date']);
         if ($this->attributes['type'] == 'feature') {
             $label = i18n::s('Feature request has been created on %s');
         } elseif ($this->attributes['type'] == 'patch') {
             $label = i18n::s('Patch has been submitted on %s');
         } else {
             $label = i18n::s('Page has been created on %s');
         }
         $tracking .= '<div class="bottom" style="margin-bottom: 1em;">' . sprintf($label, Skin::build_input_time('create_date', $host['create_date'], 'date_time') . ' <a onclick="$(\'#create_date\').val(\'' . $now . '\')" style="cursor: pointer;" class="details">' . i18n::s('now') . '</a>') . '</div>';
         $tracking .= NEXT_STEP;
         // qualification_date
         if (isset($this->attributes['qualification_date'])) {
             $this->attributes['qualification_date'] = Surfer::from_GMT($this->attributes['qualification_date']);
         }
         $tracking .= '<div style="margin-top: 1em">' . sprintf(i18n::s('Qualification has taken place on %s'), Skin::build_input_time('qualification_date', isset($this->attributes['qualification_date']) ? $this->attributes['qualification_date'] : NULL_DATE, 'date_time') . ' <a onclick="$(\'#qualification_date\').val(\'' . $now . '\')" style="cursor: pointer;" class="details">' . i18n::s('now') . '</a>') . '<p>';
         $checked = '';
         if (isset($this->attributes['status']) && $this->attributes['status'] == 'on-going:problem') {
             $checked = 'checked="checked"';
         }
         $tracking .= '<input type="radio" name="status" value ="on-going:problem" ' . $checked . ' />&nbsp;' . $this->get_status_label('on-going:problem');
         $checked = '';
         if (isset($this->attributes['status']) && $this->attributes['status'] == 'cancelled:suspect') {
             $checked = 'checked="checked"';
         }
         $tracking .= BR . '<input type="radio" name="status" value ="cancelled:suspect" ' . $checked . ' />&nbsp;' . $this->get_status_label('cancelled:suspect') . '</p></div>';
         $tracking .= NEXT_STEP;
         // analysis_date, except for maintenance cases
         if ($this->attributes['type'] != 'maintenance') {
             if (isset($this->attributes['analysis_date'])) {
                 $this->attributes['analysis_date'] = Surfer::from_GMT($this->attributes['analysis_date']);
             }
             $tracking .= '<div style="margin-top: 1em">' . sprintf(i18n::s('Analysis has ended on %s'), Skin::build_input_time('analysis_date', isset($this->attributes['analysis_date']) ? $this->attributes['analysis_date'] : NULL_DATE, 'date_time') . ' <a onclick="$(\'#analysis_date\').val(\'' . $now . '\')" style="cursor: pointer;" class="details">' . i18n::s('now') . '</a>') . '<p>';
             $checked = '';
             if (isset($this->attributes['status']) && $this->attributes['status'] == 'on-going:issue') {
                 $checked = 'checked="checked"';
             }
             $tracking .= '<input type="radio" name="status" value ="on-going:issue" ' . $checked . ' />&nbsp;' . $this->get_status_label('on-going:issue');
             $checked = '';
             if (isset($this->attributes['status']) && $this->attributes['status'] == 'cancelled:problem') {
                 $checked = 'checked="checked"';
             }
             $tracking .= BR . '<input type="radio" name="status" value ="cancelled:problem" ' . $checked . ' />&nbsp;' . $this->get_status_label('cancelled:problem') . '</p></div>';
             $tracking .= NEXT_STEP;
         }
         // resolution_date
         if (isset($this->attributes['resolution_date'])) {
             $this->attributes['resolution_date'] = Surfer::from_GMT($this->attributes['resolution_date']);
         }
         if ($this->attributes['type'] == 'feature') {
             $label = i18n::s('Assignment has been finalized on %s');
         } elseif ($this->attributes['type'] == 'maintenance') {
             $label = i18n::s('Change has been finalized on %s');
         } elseif ($this->attributes['type'] == 'patch') {
             $label = i18n::s('Assignment has been finalized on %s');
         } else {
             $label = i18n::s('Resolution has been finalized on %s');
         }
         $tracking .= '<div style="margin-top: 1em">' . sprintf($label, Skin::build_input_time('resolution_date', isset($this->attributes['resolution_date']) ? $this->attributes['resolution_date'] : NULL_DATE, 'date_time') . ' <a onclick="$(\'#resolution_date\').val(\'' . $now . '\')" style="cursor: pointer;" class="details">' . i18n::s('now') . '</a>') . '<p>';
         $checked = '';
         if (isset($this->attributes['status']) && $this->attributes['status'] == 'on-going:solution') {
             $checked = 'checked="checked"';
         }
         $tracking .= '<input type="radio" name="status" value ="on-going:solution" ' . $checked . ' />&nbsp;' . $this->get_status_label('on-going:solution');
         $checked = '';
         if (isset($this->attributes['status']) && $this->attributes['status'] == 'cancelled:issue') {
             $checked = 'checked="checked"';
         }
         $tracking .= BR . '<input type="radio" name="status" value ="cancelled:issue" ' . $checked . ' />&nbsp;' . $this->get_status_label('cancelled:issue') . '</p></div>';
         $tracking .= NEXT_STEP;
         // close_date
         if (isset($this->attributes['close_date'])) {
             $this->attributes['close_date'] = Surfer::from_GMT($this->attributes['close_date']);
         }
         $tracking .= '<div style="margin-top: 1em">' . sprintf(i18n::s('Case has been closed on %s'), Skin::build_input_time('close_date', isset($this->attributes['close_date']) ? $this->attributes['close_date'] : NULL_DATE, 'date_time') . ' <a onclick="$(\'#close_date\').val(\'' . $now . '\')" style="cursor: pointer;" class="details">' . i18n::s('now') . '</a>') . '<p>';
         $checked = '';
         if (isset($this->attributes['status']) && $this->attributes['status'] == 'completed:solution') {
             $checked = 'checked="checked"';
         }
         $tracking .= '<input type="radio" name="status" value ="completed:solution" ' . $checked . ' />&nbsp;' . $this->get_status_label('completed:solution');
         $checked = '';
         if (isset($this->attributes['status']) && $this->attributes['status'] == 'cancelled:solution') {
             $checked = 'checked="checked"';
         }
         $tracking .= BR . '<input type="radio" name="status" value ="cancelled:solution" ' . $checked . ' />&nbsp;' . $this->get_status_label('cancelled:solution') . '</p></div>';
     }
     // finalize this tab
     if ($tracking) {
         $tabs[] = array('tracking', i18n::s('Tracking'), 'tracking_panel', $tracking);
     }
     // add these tabs
     return $tabs;
 }
예제 #12
0
파일: configure.php 프로젝트: rair/yacs
 // freemind articles bgcolor, color and style
 if (!isset($context['skins_freemind_article_bgcolor'])) {
     $context['skins_freemind_article_bgcolor'] = '';
 }
 if (!isset($context['skins_freemind_article_color'])) {
     $context['skins_freemind_article_color'] = '';
 }
 if (!isset($context['skins_freemind_article_style'])) {
     $context['skins_freemind_article_style'] = '';
 }
 $label = i18n::s('Pages');
 $input = sprintf(i18n::s('Color: %s'), '<input type="text" name="skins_freemind_article_color" size="8" value="' . encode_field($context['skins_freemind_article_color']) . '" maxlength="8" />') . ' ' . sprintf(i18n::s('Background color: %s'), '<input type="text" name="skins_freemind_article_bgcolor" size="8" value="' . encode_field($context['skins_freemind_article_bgcolor']) . '" maxlength="8" />') . ' ' . sprintf(i18n::s('Style: %s'), '<input type="text" name="skins_freemind_article_style" size="8" value="' . encode_field($context['skins_freemind_article_style']) . '" maxlength="8" />');
 $hint = i18n::s('Use HTML codes for colors, and "fork" or "bubble" for style.');
 $fields[] = array($label, $input, $hint);
 // build the form
 $freemind .= Skin::build_form($fields);
 $fields = array();
 //
 // assemble all tabs
 //
 $all_tabs = array(array('meta', i18n::s('Meta-information'), 'meta_panel', $meta), array('components', i18n::s('Components'), 'components_panel', $components), array('search', i18n::s('Search'), 'search_panel', $search), array('options', i18n::s('Options'), 'options_panel', $options), array('images', i18n::s('Images'), 'images_panel', $images), array('gmap', i18n::s('Google Map'), 'gmap_panel', $gmap), array('freemind', i18n::s('Freemind'), 'freemind_panel', $freemind));
 // let YACS do the hard job
 $context['text'] .= Skin::build_tabs($all_tabs);
 //
 // bottom commands
 //
 $menu = array();
 // the submit button
 $menu[] = Skin::build_submit_button(i18n::s('Submit'), i18n::s('Press [s] to submit data'), 's');
 // control panel
 if (file_exists('../parameters/skins.include.php')) {
예제 #13
0
파일: configure.php 프로젝트: rair/yacs
 $input = '<input class="color {hash:true,required:false}" name="flexible_footer_h_color" size="10" value="' . encode_field($context['flexible_footer_h_color']) . '" maxlength="8" onchange="$(\'div#f_sample a.current\').each(function(){$(this).css({ \'color\': this.value})});" />' . ' <input class="color {hash:true,required:false}" name="flexible_footer_h_bg" size="8" value="' . encode_field($context['flexible_footer_h_bg']) . '" maxlength="12" onchange="$(\'div#f_sample a.current\').each(function(){$(this).css({\'backgroundColor\': this.value})})" />' . ' ' . select_helper('flexible_footer_h_decoration', $text_decorations, 'div#f_sample a.current', 'textDecoration');
 $fields[] = array($label, $input);
 Page::insert_script('$("#f_sample .current").each(function(){$(this).css({"backgroundColor": "' . $context['flexible_footer_h_bg'] . '", "color": "' . $context['flexible_footer_h_color'] . '", "textDecoration": "' . $context['flexible_footer_h_decoration'] . '"});});');
 // put the set of fields in the page
 $text .= Skin::build_folded_box(i18n::s('Links'), Skin::build_form($fields));
 $fields = array();
 // the background
 $text .= Skin::build_folded_box(i18n::s('Background'), background_helper('flexible_footer_bg', 'f_sample', 'skins/flexible/footers') . '<br style="clear: left" />' . Skin::build_link('skins/flexible/upload.php?directory=footers', i18n::s('Add a file'), 'span'));
 // height
 $fields[] = array(i18n::s('Height'), property_helper('flexible_footer', 'height', 'f_sample'));
 // padding
 $fields[] = array(i18n::s('Padding'), property_helper('flexible_footer', 'padding', 'f_sample'));
 // borders
 $fields[] = array(i18n::s('Borders'), borders_helper('flexible_footer', 'f_sample'));
 // put the set of fields in the page
 $text .= Skin::build_folded_box(i18n::s('Disposition'), Skin::build_form($fields));
 $fields = array();
 // finalize this panel
 $panels[] = array('f', i18n::s('Footer'), 'f_panel', $text);
 //
 // assemble all panels
 //
 // let YACS do the hard job
 $context['text'] .= Skin::build_tabs($panels);
 //
 // bottom commands
 //
 $menu = array();
 // the submit button
 $menu[] = Skin::build_submit_button(i18n::s('Submit'), i18n::s('Press [s] to submit data'), 's');
 // insert the menu in the page
예제 #14
0
파일: configure.php 프로젝트: rair/yacs
 if (!isset($context['mail_logger_recipient'])) {
     $context['mail_logger_recipient'] = '';
 }
 $input = '<input type="text" name="mail_logger_recipient" size="45" value="' . encode_field($context['mail_logger_recipient']) . '" maxlength="255" />';
 $hint = i18n::s('To forward logged events to one or several recipients.');
 $fields[] = array($label, $input, $hint);
 // debug mail
 $label = i18n::s('Debug mail services');
 $checked = '';
 if (isset($context['debug_mail']) && $context['debug_mail'] == 'Y') {
     $checked = ' checked="checked" ';
 }
 $input = '<input type="checkbox" name="debug_mail" value="Y" ' . $checked . '/> ' . i18n::s('Copy messages in the file temporary/debug.txt. Use this option only for troubleshooting.');
 $fields[] = array($label, $input);
 // build the form
 $mail .= Skin::build_form($fields);
 $fields = array();
 //
 // change the skin
 //
 $skin = '';
 // drive people to the visual index, but not on first install
 if (file_exists($context['path_to_root'] . 'parameters/control.include.php')) {
     $skin .= '<p>' . sprintf(i18n::s('Check %s to manage and preview all available styles.'), Skin::build_link('skins/', i18n::s('the index page of skins'))) . "</p>\n";
 }
 // list skins available on this system
 if ($dir = Safe::opendir("../skins")) {
     // valid skins have a template.php file
     $skins = array();
     while (($file = Safe::readdir($dir)) !== FALSE) {
         if ($file[0] == '.' || !is_dir('../skins/' . $file)) {
예제 #15
0
파일: edit.php 프로젝트: rair/yacs
         $input .= '/> ' . i18n::s('Instead of the embedded image, but only for large files (>20&nbsp;kbytes)') . BR . "\n";
         $input .= '<input type="radio" name="use_thumbnail" value="A"';
         if (isset($item['use_thumbnail']) && $item['use_thumbnail'] == 'A') {
             $input .= ' checked="checked"';
         }
         $input .= '/> ' . i18n::s('Always use the thumbnail. Users will click on it to see the full image.') . BR . "\n";
         $input .= '<input type="radio" name="use_thumbnail" value="N"';
         if (isset($item['use_thumbnail']) && $item['use_thumbnail'] == 'N') {
             $input .= ' checked="checked"';
         }
         $input .= '/> ' . i18n::s('Never. Response times for surfers using modem links may be degraded on big images.') . "\n";
         $fields[] = array($label, $input);
     }
     // add a folded box
     if (count($fields)) {
         $context['text'] .= '<h3>' . i18n::s('Options') . "</h3>\n" . Skin::build_form($fields);
         $fields = array();
     }
 } else {
     $context['text'] .= '<input type="hidden" name="automatic_process" value="Y" />';
 }
 // bottom commands
 $menu = array();
 $menu[] = Skin::build_submit_button(i18n::s('Submit'), i18n::s('Press [s] to submit data'), 's');
 if (is_object($anchor) && $anchor->is_viewable()) {
     $menu[] = Skin::build_link($anchor->get_url(), i18n::s('Cancel'), 'span');
 }
 $context['text'] .= Skin::finalize_list($menu, 'assistant_bar');
 // associates may decide to not stamp changes -- complex command
 if (isset($item['id']) && $item['id'] && (Surfer::is_associate() || Surfer::is_member() && is_object($anchor) && $anchor->is_assigned()) && Surfer::has_all()) {
     $context['text'] .= '<p><input type="checkbox" name="silent" value="Y" /> ' . i18n::s('Do not change modification date of the main page.') . '</p>';