/**
 * with_successive_milestones helper
 *
 * @param array $params
 * @param Smarty $smarty
 * @return string
 */
function smarty_function_with_successive_milestones($params, &$smarty)
{
    static $counter = 1;
    $name = array_var($params, 'name');
    if (empty($name)) {
        return new InvalidParamError('name', $name, '$name value is required', true);
    }
    // if
    $milestone = array_var($params, 'milestone');
    if (!instance_of($milestone, 'Milestone')) {
        return new InvalidParamError('milestone', $milestone, '$milestone value is expected to be an instance of Milestone class', true);
    }
    // if
    $id = array_var($params, 'id');
    if (empty($id)) {
        $id = 'with_successive_milestones_' . $counter;
        $counter++;
    }
    // if
    $value = array_var($params, 'value');
    $action = array_var($value, 'action', 'dont_move');
    $milestones = array_var($value, 'milestones');
    if (!is_array($milestones)) {
        $milestones = array();
    }
    // if
    $logged_user = $smarty->get_template_vars('logged_user');
    $successive_milestones = Milestones::findSuccessiveByMilestone($milestone, STATE_VISIBLE, $logged_user->getVisibility());
    if (!is_foreachable($successive_milestones)) {
        return '<p class="details">' . lang('This milestone does not have any successive milestones') . '</p>';
    }
    // if
    $result = "<div class=\"with_successive_milestones\">\n<div class=\"options\">\n";
    $options = array('dont_move' => lang("Don't change anything"), 'move_all' => lang('Adjust all successive milestone by the same number of days'), 'move_selected' => lang('Adjust only selected successive milestones by the same number of days'));
    foreach ($options as $k => $v) {
        $radio = radio_field($name . '[action]', $k == $action, array('value' => $k, 'id' => $id . '_' . $k));
        $label = label_tag($v, $id . '_' . $k, false, array('class' => 'inline'), '');
        $result .= '<span class="block">' . $radio . ' ' . $label . "</span>\n";
    }
    // if
    $result .= "</div>\n<div class=\"successive_milestones\">";
    foreach ($successive_milestones as $successive_milestone) {
        $input_attributes = array('name' => $name . '[milestones][]', 'id' => $id . '_milestones_' . $successive_milestone->getId(), 'type' => 'checkbox', 'value' => $successive_milestone->getId(), 'class' => 'auto');
        if (in_array($successive_milestone->getId(), $milestones)) {
            $input_attributes['checked'] = true;
        }
        // if
        $input = open_html_tag('input', $input_attributes, true);
        $label = label_tag($successive_milestone->getName(), $id . '_milestones_' . $successive_milestone->getId(), false, array('class' => 'inline'), '');
        $result .= '<span class="block">' . $input . ' ' . $label . "</span>\n";
    }
    // foreach
    $result .= "</div>\n</div>\n";
    return $result;
}
Пример #2
0
					</tr>
					<tr>
						<td colspan="2" style="vertical-align:middle; height: 22px;">
							<label><?php 
echo radio_field('file[default_subject_sel]', true, array('value' => 'default')) . "&nbsp;" . lang('use default subject');
?>
</label>
						</td>
					</tr>
					<tr>
						<td colspan="2" style="vertical-align:middle; height: 22px;"><?php 
$sel = false;
if (array_var($file_data, 'default_subject') != "") {
    $sel = true;
}
echo radio_field('file[default_subject_sel]', $sel, array('value' => 'subject'));
echo "&nbsp;" . text_field('file[default_subject_text]', array_var($file_data, 'default_subject'), array('style' => 'width:300px', 'placeholder' => lang('enter a custom subject')));
?>
</td>
					</tr>
				</table>
			</div>
		
		</div>

	<?php 
if ($object->isNew() || $object->canLinkObject(logged_user())) {
    ?>
		<div id="<?php 
    echo $genid;
    ?>
Пример #3
0
  <fieldset>
    <legend><?php 
    echo lang('password');
    ?>
</legend>
    <div>
      <?php 
    echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'random', array('value' => 'random', 'class' => 'checkbox', 'id' => 'userFormRandomPassword', 'onclick' => 'App.modules.addUserForm.generateRandomPasswordClick()', 'tabindex' => '700'));
    ?>
 <?php 
    echo label_tag(lang('user password generate'), 'userFormRandomPassword', false, array('class' => 'checkbox'), '');
    ?>
    </div>
    <div>
      <?php 
    echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'specify', array('value' => 'specify', 'class' => 'checkbox', 'id' => 'userFormSpecifyPassword', 'onclick' => 'App.modules.addUserForm.generateSpecifyPasswordClick()', 'tabindex' => '800'));
    ?>
 <?php 
    echo label_tag(lang('user password specify'), 'userFormSpecifyPassword', false, array('class' => 'checkbox'), '');
    ?>
    </div>
    <div id="userFormPasswordInputs">
      <div>
        <?php 
    echo label_tag(lang('password'), 'userFormPassword', true);
    ?>
        <?php 
    echo password_field('user[password]', null, array('id' => 'userFormPassword', 'tabindex' => '900'));
    ?>
      </div>
      
Пример #4
0
      <?php echo text_field('contact[location_details]', array_var($contact_data, 'location_details'), array('id' => 'contactFormLocationDetails')) ?>
    </div>
    
  </fieldset>



<?php if (is_array($im_types) && count($im_types)) { ?>
  <fieldset>
    <legend><?php echo lang('instant messengers') ?></legend>
    <table id="im" class="blank">
      <tr>
        <th colspan="2"><?php echo lang('im service') ?></th>
        <th><?php echo lang('value') ?></th>
        <th><?php echo lang('primary im service') ?></th>
      </tr>
<?php foreach ($im_types as $im_type) { ?>
      <tr>
        <td><img src="<?php echo $im_type->getIconUrl() ?>" alt="<?php echo $im_type->getName() ?> icon" /></td>
        <td><label class="checkbox" for="<?php echo 'profileFormIm' . $im_type->getId() ?>"><?php echo $im_type->getName() ?></label></td>
        <td><?php echo text_field('contact[im_' . $im_type->getId() . ']', array_var($contact_data, 'im_' . $im_type->getId()), array('id' => 'profileFormIm' . $im_type->getId())) ?></td>
        <td><?php echo radio_field('contact[default_im]', array_var($contact_data, 'default_im') == $im_type->getId(), array('value' => $im_type->getId())) ?></td>
      </tr>
<?php } // foreach ?>
    </table>
    <p class="desc"><?php echo lang('primary im description') ?></p>
  </fieldset>
<?php } // if ?>

  <?php echo submit_button($contact->isNew() ? lang('add contact') : lang('edit contact')) ?>
</form>
Пример #5
0
				}
			};
			</script>
		</div>
	</fieldset>
 </div>

  
<?php if($user->isNew() || logged_user()->isAdministrator()) { ?>
  <fieldset>
    <legend><?php echo lang('password') ?></legend>
    <div>
      <?php echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'random', array('value' => 'random', 'class' => 'checkbox', 'id' => 'userFormRandomPassword', 'onclick' => 'App.modules.addUserForm.generateRandomPasswordClick()', 'tabindex' => '700')) ?> <?php echo label_tag(lang('user password generate'), 'userFormRandomPassword', false, array('class' => 'checkbox'), '') ?>
    </div>
    <div>
      <?php echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'specify', array('value' => 'specify', 'class' => 'checkbox', 'id' => 'userFormSpecifyPassword', 'onclick' => 'App.modules.addUserForm.generateSpecifyPasswordClick()', 'tabindex' => '800')) ?> <?php echo label_tag(lang('user password specify'), 'userFormSpecifyPassword', false, array('class' => 'checkbox'), '') ?>
    </div>
    <div id="userFormPasswordInputs">
      <div>
        <?php echo label_tag(lang('password'), 'userFormPassword', true) ?>
        <?php echo password_field('user[password]', null, array('id' => 'userFormPassword', 'tabindex' => '900')) ?>
      </div>
      
      <div>
        <?php echo label_tag(lang('password again'), 'userFormPasswordA', true) ?>
        <?php echo password_field('user[password_a]', null, array('id' => 'userFormPasswordA', 'tabindex' => '1000')) ?>
      </div>
    </div>
    <div style="margin-top:10px">
    <label class="checkbox">
    <?php echo checkbox_field('user[send_email_notification]', array_var($user, 'send_email_notification', 1), array('id' => $genid . 'notif', 'tabindex' => '1050')) ?>
Пример #6
0
  <fieldset>
    <legend><?php 
    echo lang('password');
    ?>
</legend>
    <div>
      <?php 
    echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'random', array('value' => 'random', 'class' => 'checkbox', 'id' => 'userFormRandomPassword'));
    ?>
 <?php 
    echo label_tag(lang('user password generate'), 'userFormRandomPassword', false, array('class' => 'checkbox'), '');
    ?>
    </div>
    <div>
      <?php 
    echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'specify', array('value' => 'specify', 'class' => 'checkbox', 'id' => 'userFormSpecifyPassword'));
    ?>
 <?php 
    echo label_tag(lang('user password specify'), 'userFormSpecifyPassword', false, array('class' => 'checkbox'), '');
    ?>
    </div>
    <div id="userFormPasswordInputs">
      <div>
        <?php 
    echo label_tag(lang('password'), 'userFormPassword', true);
    ?>
        <?php 
    echo password_field('user[password]', null, array('id' => 'userFormPassword'));
    ?>
      </div>
      
Пример #7
0
echo render_select_mail_account('mail[account_id]', $mail_accounts, isset($mail_data['account_id']) ? $mail_data['account_id'] : (isset($default_account) ? $default_account : (count($mail_accounts) > 0 ? $mail_accounts[0]->getId() : 0)), array('id' => $genid . 'mailAccount', 'tabindex' => '44', 'onchange' => "og.changeSignature('{$genid}', this.value);"));
?>
	</div>
  
	<div id="add_mail_options" style="display:none;">
		<fieldset>
	    <legend><?php 
echo lang('mail format options');
?>
</legend>
	    <label><?php 
echo radio_field('mail[format]', $type == 'html', array('id' => $genid . 'format_html', 'value' => 'html', 'tabindex' => '45', 'onchange' => "og.mailAlertFormat('{$genid}','html')")) . " " . lang('format html');
?>
</label>
	    <label><?php 
echo radio_field('mail[format]', $type == 'plain', array('id' => $genid . 'format_plain', 'value' => 'plain', 'tabindex' => '46', 'onchange' => "og.mailAlertFormat('{$genid}','plain')")) . " " . lang('format plain');
?>
</label>
		</fieldset>
	</div>
	
	<div id="add_mail_attachments" style="display:none;">
 	<fieldset>
 	    <legend><?php 
echo lang('mail attachments');
?>
</legend>
 	    <div id="<?php 
echo $genid;
?>
attachments"></div>
Пример #8
0
/**
 * Render yes no widget
 *
 * @access public
 * @param string $name
 * @param $id_base
 * @param boolean $value If true YES will be selected, otherwise NO will be selected
 * @param string $yes_lang
 * @param string $no_lang
 * @return null
 */
function yes_no_widget($name, $id_base, $value, $yes_lang, $no_lang)
{
    $yes_input = radio_field($name, $value, array('id' => $id_base . 'Yes', 'class' => 'yes_no', 'value' => 1));
    $no_input = radio_field($name, !$value, array('id' => $id_base . 'No', 'class' => 'yes_no', 'value' => 0));
    $yes_label = label_tag($yes_lang, $id_base . 'Yes', false, array('class' => 'yes_no'), '');
    $no_label = label_tag($no_lang, $id_base . 'No', false, array('class' => 'yes_no'), '');
    return $yes_input . ' ' . $yes_label . ' ' . $no_input . ' ' . $no_label;
}
Пример #9
0
  
  <div id="linkFormExistingObjectControls">
    <fieldset>
      <legend><?php 
echo lang('select object');
?>
</legend>
      <?php 
echo select_project_object('link[object_id]', active_project(), array_var($object_data, 'object_id'), $already_linked_objects_ids, array('id' => 'linkFormSelectObject', 'style' => 'width: 300px'));
?>
    </fieldset>
  </div>
  
  <div>
    <?php 
echo radio_field('link[what]', array_var($link_data, 'what') != 'existing_object', array('value' => 'new_object', 'id' => 'linkFormNewObject', 'onclick' => 'App.modules.linkToObjectForm.toggleLinkForms()'));
?>
 <label for="linkFormNewObject" class="checkbox"><?php 
echo lang('upload and link');
?>
</label>
  </div>
  
  <div id="linkFormNewObjectControls">
    <?php 
echo render_linked_objects();
?>
  </div>
  
  <script>
    App.modules.linkToObjectForm.toggleLinkForms();
Пример #10
0
?>
 <?php 
echo label_tag(lang('project form action add comment'), 'projectFormActionAddComment', false, array('class' => 'checkbox'), '');
?>
</td>
          <td><?php 
echo lang('add comment to message short');
?>
: <?php 
echo select_message('project_form[message_id]', active_project(), array_var($project_form_data, 'message_id'), array('id' => 'projectFormActionSelectMessage'));
?>
</td>
        </tr>
        <tr>
          <td><?php 
echo radio_field('project_form[action]', array_var($project_form_data, 'action') == ProjectForm::ADD_TASK_ACTION, array('value' => ProjectForm::ADD_TASK_ACTION, 'id' => 'projectFormActionAddTask'));
?>
 <?php 
echo label_tag(lang('project form action add task'), 'projectFormActionAddTask', false, array('class' => 'checkbox'), '');
?>
</td>
          <td><?php 
echo lang('add task to list short');
?>
: <?php 
echo select_task_list('project_form[task_list_id]', active_project(), array_var($project_form_data, 'task_list_id'), false, array('id' => 'projectFormActionSelectTaskList'));
?>
</td>
        </tr>
      </table>
    </fieldset>
		  	<td align=center style="padding:0 10px;width:100px;"><a href="#" class="internalLink radio-title-1" onclick="og.userPermissions.ogPermSetLevel('<?php echo $genid ?>', 1);return false;"><?php echo lang('read only') ?></a></td>
		  	<td align=center style="padding:0 10px;width:100px;"><a href="#" class="internalLink radio-title-0" onclick="og.userPermissions.ogPermSetLevel('<?php echo $genid ?>', 0);return false;"><?php echo lang('none no bars') ?></a></td></tr>
		  	
		<?php 
			$row_cls = "";
			foreach ($allowed_object_types as $ot) {
				$row_cls = $row_cls == "" ? "altRow" : "";
				$id_suffix = $ot->getId();
				$change_parameters = '\'' . $genid . '\', ' . $ot->getId();
		?>
		  	<tr class="<?php echo $row_cls?>">
		  		<td style="padding-right:20px"><span id="<?php echo $genid.'obj_type_label'.$id_suffix?>"><?php echo lang($ot->getName()) ?></span></td>
		  		<td align=center><?php echo radio_field($genid .'rg_'.$id_suffix, false, array('onchange' => 'og.userPermissions.ogPermValueChanged('. $change_parameters .')', 'value' => '3', 'style' => 'width:16px', 'id' => $genid . 'rg_3_'.$id_suffix, 'class' => "radio_3")) ?></td>
		  		<td align=center><?php echo radio_field($genid .'rg_'.$id_suffix, false, array('onchange' => 'og.userPermissions.ogPermValueChanged('. $change_parameters .')', 'value' => '2', 'style' => 'width:16px', 'id' => $genid . 'rg_2_'.$id_suffix, 'class' => "radio_2")) ?></td>
		  		<td align=center><?php echo radio_field($genid .'rg_'.$id_suffix, false, array('onchange' => 'og.userPermissions.ogPermValueChanged('. $change_parameters .')', 'value' => '1', 'style' => 'width:16px', 'id' => $genid . 'rg_1_'.$id_suffix, 'class' => "radio_1")) ?></td>
		  		<td align=center><?php echo radio_field($genid .'rg_'.$id_suffix, false, array('onchange' => 'og.userPermissions.ogPermValueChanged('. $change_parameters .')', 'value' => '0', 'style' => 'width:16px', 'id' => $genid . 'rg_0_'.$id_suffix, 'class' => "radio_0")) ?></td>
		    </tr>
		<?php }?>
		    
		    </table>
		<!-- 
		    <br/><?php echo checkbox_field($genid . 'chk_0', false, array('id' => $genid . 'chk_0', 'onclick' => 'og.userPermissions.ogPermValueChanged("' . $genid . '")')) ?> <label style="font-weight:normal" for="<?php echo $genid ?>chk_0" class="checkbox"><?php echo lang('can assign to owners') ?></label>
		    <br/><?php echo checkbox_field($genid . 'chk_1', false, array('id' => $genid . 'chk_1', 'onclick' => 'og.userPermissions.ogPermValueChanged("' . $genid . '")')) ?> <label style="font-weight:normal" for="<?php echo $genid ?>chk_1" class="checkbox"><?php echo lang('can assign to other') ?></label>
		 -->
	  	
	  </div>
	</td></tr></table>


<script>
Пример #12
0
          <fieldset>
            <legend><?php 
    echo lang('password');
    ?>
</legend>
            <div>
              <?php 
    echo radio_field('contact[new][user][password_generator]', array_var($user_data, 'password_generator', 'random') == 'random', array('value' => 'random', 'class' => 'checkbox', 'id' => 'userFormRandomPassword'));
    ?>
 <?php 
    echo label_tag(lang('user password generate'), 'userFormRandomPassword', false, array('class' => 'checkbox'), '');
    ?>
            </div>
            <div>
              <?php 
    echo radio_field('contact[new][user][password_generator]', array_var($user_data, 'password_generator', 'random') == 'specify', array('value' => 'specify', 'class' => 'checkbox', 'id' => 'userFormSpecifyPassword'));
    ?>
 <?php 
    echo label_tag(lang('user password specify'), 'userFormSpecifyPassword', false, array('class' => 'checkbox'), '');
    ?>
            </div>
            <div id="userFormPasswordInputs">
              <div>
                <?php 
    echo label_tag(lang('password'), 'userFormPassword', true);
    ?>
                <?php 
    echo password_field('contact[new][user][password]', null, array('id' => 'userFormPassword'));
    ?>
              </div>
Пример #13
0
  
  <div id="attachFormExistingFileControls">
    <fieldset>
      <legend><?php 
echo lang('select file');
?>
</legend>
      <?php 
echo select_project_file('attach[file_id]', active_project(), array_var($attach_data, 'file_id'), $already_attached_file_ids, array('id' => 'attachFormSelectFile', 'style' => 'width: 300px'));
?>
    </fieldset>
  </div>
  
  <div>
    <?php 
echo radio_field('attach[what]', array_var($attach_data, 'what') != 'existing_file', array('value' => 'new_file', 'id' => 'attachFormNewFile'));
?>
 <label for="attachFormNewFile" class="checkbox"><?php 
echo lang('upload and attach');
?>
</label>
  </div>
  
  <div id="attachFormNewFileControls">
    <?php 
echo render_attach_files();
?>
  </div>

  <?php 
echo submit_button(lang('attach files'));
Пример #14
0
							</script>
							
								<tr><td colspan="2" style="vertical-align:middle; height: 22px;">
									<?php 
echo radio_field('event[repeat_option]', $rsel1, array('id' => $genid . 'repeat_opt_forever', 'value' => '1', 'onclick' => 'og.viewDays(false)')) . "&nbsp;" . lang('CAL_REPEAT_FOREVER');
?>
								</td></tr>
								<tr><td colspan="2" style="vertical-align:middle">
									<?php 
echo radio_field('event[repeat_option]', $rsel2, array('id' => $genid . 'repeat_opt_times', 'value' => '2', 'onclick' => 'og.viewDays(true)')) . "&nbsp;" . lang('CAL_REPEAT');
echo "&nbsp;" . text_field('event[repeat_num]', $rnum, array('size' => '3', 'id' => 'repeat_num', 'maxlength' => '3', 'style' => 'width:25px', 'onchange' => 'og.selectRepeatMode(2);')) . "&nbsp;" . lang('CAL_TIMES');
?>
								</td></tr>
								<tr><td style="vertical-align:middle">
									<?php 
echo radio_field('event[repeat_option]', $rsel3, array('id' => $genid . 'repeat_opt_until', 'value' => '3', 'onclick' => 'og.viewDays(false)')) . "&nbsp;" . lang('CAL_REPEAT_UNTIL');
?>
								</td><td style="padding-left:8px;">
									<?php 
echo pick_date_widget2('event[repeat_end]', $rend, $genid, 95);
?>
								</td></tr>
							</table>
						</div>
						<div id="cal_extra3" style="width: 400px; align: center; text-align: left; <?php 
echo $hide2;
?>
'">
							<?php 
echo lang('CAL_REPEAT') . "&nbsp;";
$options = array(option_tag(lang('1st'), 1, array_var($event_data, 'repeat_wnum') == 1 ? array("selected" => "selected") : null), option_tag(lang('2nd'), 2, array_var($event_data, 'repeat_wnum') == 2 ? array("selected" => "selected") : null), option_tag(lang('3rd'), 3, array_var($event_data, 'repeat_wnum') == 3 ? array("selected" => "selected") : null), option_tag(lang('4th'), 4, array_var($event_data, 'repeat_wnum') == 4 ? array("selected" => "selected") : null));
Пример #15
0
  
  <div id="attachFormExistingFileControls">
    <fieldset>
      <legend><?php 
echo lang('select file');
?>
</legend>
      <?php 
echo select_project_file('attach[file_id]', active_project(), array_var($attach_data, 'file_id'), $already_attached_file_ids, array('id' => 'attachFormSelectFile', 'style' => 'width: 300px'));
?>
    </fieldset>
  </div>
  
  <div>
    <?php 
echo radio_field('attach[what]', array_var($attach_data, 'what') != 'existing_file', array('value' => 'new_file', 'id' => 'attachFormNewFile', 'onclick' => 'App.modules.attachToObjectForm.toggleAttachForms()'));
?>
 <label for="attachFormNewFile" class="checkbox"><?php 
echo lang('upload and attach');
?>
</label>
  </div>
  
  <div id="attachFormNewFileControls">
    <?php 
echo render_attach_files();
?>
  </div>

  <?php 
echo submit_button(lang('attach files'));
Пример #16
0
    <?php echo text_field('user[email]', array_var($user_data, 'email'), array('class' => 'long', 'id' => 'userFormEmail')) ?>
  </div>
  
  <div>
    <?php echo label_tag(lang('timezone'), 'userFormTimezone', true)?>
    <?php echo select_timezone_widget('user[timezone]', array_var($user_data, 'timezone'), array('id' => 'userFormTimezone', 'class' => 'long combobox')) ?>
  </div>
  
<?php if ($user->isNew() || logged_user()->isAdministrator()) { ?>
  <fieldset>
    <legend><?php echo lang('password') ?></legend>
    <div>
      <?php echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'random', array('value' => 'random', 'class' => 'checkbox', 'id' => 'userFormRandomPassword')) ?> <?php echo label_tag(lang('user password generate'), 'userFormRandomPassword', false, array('class' => 'checkbox'), '') ?>
    </div>
    <div>
      <?php echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'specify', array('value' => 'specify', 'class' => 'checkbox', 'id' => 'userFormSpecifyPassword')) ?> <?php echo label_tag(lang('user password specify'), 'userFormSpecifyPassword', false, array('class' => 'checkbox'), '') ?>
    </div>
    <div id="userFormPasswordInputs">
      <div>
        <?php echo label_tag(lang('password'), 'userFormPassword', true) ?>
        <?php echo password_field('user[password]', null, array('id' => 'userFormPassword')) ?>
      </div>
      
      <div>
        <?php echo label_tag(lang('password again'), 'userFormPasswordA', true) ?>
        <?php echo password_field('user[password_a]', null, array('id' => 'userFormPasswordA')) ?>
      </div>
    </div>
  </fieldset>
<?php } // if ?>
Пример #17
0
/**
 * Render yes no widget
 *
 * @access public
 * @param string $name
 * @param $id_base
 * @param boolean $value If true YES will be selected, otherwise NO will be selected
 * @param string $yes_lang
 * @param string $no_lang
 * @return null
 */
function yes_no_widget($name, $id_base, $value, $yes_lang, $no_lang, $tabindex = null, $attributes = null)
{
    $yes_attributes = array('id' => $id_base . 'Yes', 'class' => 'yes_no', 'value' => 1);
    $no_attributes = array('id' => $id_base . 'No', 'class' => 'yes_no', 'value' => 0);
    if ($tabindex != null) {
        $yes_attributes['tabindex'] = $tabindex;
        $no_attributes['tabindex'] = $tabindex;
    }
    if (is_array($attributes)) {
        foreach ($attributes as $attr_name => $attr_value) {
            $yes_attributes[$attr_name] = $attr_value;
            $no_attributes[$attr_name] = $attr_value;
        }
    }
    $yes_input = radio_field($name, $value, $yes_attributes);
    $no_input = radio_field($name, !$value, $no_attributes);
    $yes_label = label_tag($yes_lang, $id_base . 'Yes', false, array('class' => 'yes_no'), '');
    $no_label = label_tag($no_lang, $id_base . 'No', false, array('class' => 'yes_no'), '');
    return $yes_input . ' ' . $yes_label . ' ' . $no_input . ' ' . $no_label;
}
Пример #18
0
								if(view){
									if (btn) btn.dom.style.display = 'block';
								}else{
									if (btn) btn.dom.style.display = 'none';
								}
							}
						</script>
						<table>
							<tr><td colspan="2" style="vertical-align:middle; height: 22px;">
								<?php echo radio_field('task[repeat_option]', $rsel1, array('id' => $genid.'repeat_opt_forever','value' => '1', 'style' => 'vertical-align:middle', 'tabindex' => '95', 'onclick' => 'og.viewDays(false)')) ."&nbsp;". lang('CAL_REPEAT_FOREVER')?>
							</td></tr>
							<tr><td colspan="2" style="vertical-align:middle">
								<?php echo radio_field('task[repeat_option]', $rsel2, array('id' => $genid.'repeat_opt_times','value' => '2', 'style' => 'vertical-align:middle', 'tabindex' => '96', 'onclick' => 'og.viewDays(true)')) ."&nbsp;". lang('CAL_REPEAT');
								echo "&nbsp;" . text_field('task[repeat_num]', $rnum, array('size' => '3', 'id' => $genid.'repeat_num', 'maxlength' => '3', 'style'=>'width:25px', 'tabindex' => '97', 'onchange' => 'og.selectRepeatMode(2);')) ."&nbsp;". lang('CAL_TIMES') ?>
							</td></tr>
							<tr><td style="vertical-align:middle"><?php echo radio_field('task[repeat_option]', $rsel3,array('id' => $genid.'repeat_opt_until','value' => '3', 'style' => 'vertical-align:middle', 'tabindex' => '98', 'onclick' => 'og.viewDays(false)')) ."&nbsp;". lang('CAL_REPEAT_UNTIL');?></td>
								<td style="padding-left:8px;"><?php echo pick_date_widget2('task[repeat_end]', $rend, $genid, 99);?>
							</td></tr>
						</table>
						<script type="text/javascript">
							var els = document.getElementsByName('task[repeat_end]');
							for (i=0; i<els.length; i++) {
								els[i].onchange = function() {
									og.selectRepeatMode(3);
								}
							}
						</script>
						<div style="padding-top: 4px;">
							<?php echo lang('repeat by') . ' ' ?>
							<select name="task[repeat_by]" tabindex="100">
								<option value="start_date" id="<?php echo $genid ?>rep_by_start_date"<?php if (array_var($task_data, 'repeat_by') == 'start_date') echo ' selected="selected"'?>><?php echo lang('field ProjectTasks start_date')?></option>
Пример #19
0
    ?>
addFileFilenameExists" style="display: none">
				<h2><?php 
    echo lang("duplicate filename");
    ?>
</h2>
				<p><?php 
    echo lang("filename exists");
    ?>
</p>
				<div style="padding-top: 10px">
				<table>
					<tr>
						<td style="height: 20px; padding-right: 4px">
							<?php 
    echo radio_field('file[_option]', true, array("id" => $genid . 'radioAddFileAnyway', "value" => -1, 'tabindex' => '30'));
    ?>
						</td><td>
							<?php 
    echo lang('upload anyway');
    ?>
						</td>
					</tr>
				</table>
				<table id="<?php 
    echo $genid;
    ?>
upload-table">
				</table>
				</div>
			</div>
Пример #20
0
echo lang('seconds');
?>
</td>
		</tr>
	</table>

	<?php 
if ($show_billing) {
    ?>
		<br/>
		<?php 
    echo radio_field('timeslot[is_fixed_billing]', !$timeslot_data['is_fixed_billing'], array('onchange' => 'og.showAndHide("' . $genid . 'hbilling",["' . $genid . 'fbilling"])', 'value' => '0', 'style' => 'width:16px'));
    echo '<b>' . lang('hourly billing') . '</b>';
    ?>
		<?php 
    echo radio_field('timeslot[is_fixed_billing]', $timeslot_data['is_fixed_billing'], array('onchange' => 'og.showAndHide("' . $genid . 'fbilling",["' . $genid . 'hbilling"])', 'value' => '1', 'style' => 'width:16px'));
    echo '<b>' . lang('fixed billing') . '</b>';
    ?>
	  	<div id="<?php 
    echo $genid;
    ?>
hbilling" style="<?php 
    echo $timeslot_data['is_fixed_billing'] ? 'display:none' : '';
    ?>
">
	    	<?php 
    echo label_tag(lang('hourly rates'), 'addTimeslotHourlyBilling', false);
    ?>
	  		<?php 
    echo text_field('timeslot[hourly_billing]', array_var($timeslot_data, 'hourly_billing'), array('id' => 'addTimeslotHourlyBilling'));
    ?>
Пример #21
0
        ?>
 icon" /></td>
					<td style="vertical-align: middle"><label class="checkbox"
						for="<?php 
        echo 'profileFormIm' . $im_type->getId();
        ?>
"><?php 
        echo $im_type->getName();
        ?>
</label></td>
					<td style="vertical-align: middle"><?php 
        echo text_field('contact[im_' . $im_type->getId() . ']', array_var($contact_data, 'im_' . $im_type->getId()), array('id' => $genid . 'profileFormIm' . $im_type->getId(), 'tabindex' => '145'));
        ?>
</td>
					<td style="vertical-align: middle"><?php 
        echo radio_field('contact[default_im]', array_var($contact_data, 'default_im') == $im_type->getId(), array('value' => $im_type->getId(), 'tabindex' => '150'));
        ?>
</td>
				</tr>
				<?php 
    }
    // foreach
    ?>
			</table>
			<p class="desc"><?php 
    echo lang('primary im description');
    ?>
</p>
			</fieldset>
			<?php 
}
    </tr>
    <tr>
  		<td style="padding-right:20px"><?php 
echo lang('events');
?>
</td>
  		<td align=center><?php 
echo radio_field($genid . 'rg_8', false, array('onchange' => 'og.ogPermValueChanged("' . $genid . '")', 'value' => '2', 'style' => 'width:16px', 'class' => "readWritePermission"));
?>
</td>
  		<td align=center><?php 
echo radio_field($genid . 'rg_8', false, array('onchange' => 'og.ogPermValueChanged("' . $genid . '")', 'value' => '1', 'style' => 'width:16px'));
?>
</td>
  		<td align=center><?php 
echo radio_field($genid . 'rg_8', false, array('onchange' => 'og.ogPermValueChanged("' . $genid . '")', 'value' => '0', 'style' => 'width:16px'));
?>
</td>
    </tr>
    
    </table>
    <br/>
    <?php 
echo checkbox_field($genid . 'chk_0', false, array('id' => $genid . 'chk_0', 'onclick' => 'og.ogPermValueChanged("' . $genid . '")'));
?>
 <label style="font-weight:normal" for="<?php 
echo $genid;
?>
chk_0" class="checkbox"><?php 
echo lang('can assign to owners');
?>
Пример #23
0
							</div>
							<table>
								<tr><td colspan="2" style="vertical-align:middle; height: 22px;">
									<?php 
echo radio_field('event[repeat_option]', $rsel1, array('id' => 'cal_repeat_option', 'value' => '1', 'tabindex' => '60')) . "&nbsp;" . lang('CAL_REPEAT_FOREVER');
?>
								</td></tr>
								<tr><td colspan="2" style="vertical-align:middle">
									<?php 
echo radio_field('event[repeat_option]', $rsel2, array('id' => 'cal_repeat', 'value' => '2', 'tabindex' => '70')) . "&nbsp;" . lang('CAL_REPEAT');
echo "&nbsp;" . text_field('event[repeat_num]', $rnum, array('size' => '3', 'id' => 'repeat_num', 'maxlength' => '3', 'style' => 'width:25px', 'tabindex' => '80')) . "&nbsp;" . lang('CAL_TIMES');
?>
								</td></tr>
								<tr><td style="vertical-align:middle">
									<?php 
echo radio_field('event[repeat_option]', $rsel3, array('id' => 'cal_repeat_until', 'value' => '3', 'tabindex' => '90')) . "&nbsp;" . lang('CAL_REPEAT_UNTIL');
?>
								</td><td style="padding-left:8px;">
									<?php 
echo pick_date_widget2('event[repeat_end]', $rend, $genid, 95);
?>
								</td></tr>
							</table>
						</div>
						<div id="cal_extra3" style="width: 400px; align: center; text-align: left; <?php 
echo $hide2;
?>
'">
							<?php 
echo lang('CAL_REPEAT') . "&nbsp;";
$options = array(option_tag(lang('1st'), 1, array_var($event_data, 'repeat_wnum') == 1 ? array("selected" => "selected") : null), option_tag(lang('2nd'), 2, array_var($event_data, 'repeat_wnum') == 2 ? array("selected" => "selected") : null), option_tag(lang('3rd'), 3, array_var($event_data, 'repeat_wnum') == 3 ? array("selected" => "selected") : null), option_tag(lang('4th'), 4, array_var($event_data, 'repeat_wnum') == 4 ? array("selected" => "selected") : null));
Пример #24
0
        echo format_datetime($revision->getCreatedOn());
        ?>
</td>
	<td><a href="<?php 
        echo $revision->getCreatedBy()->getCardUrl();
        ?>
"><?php 
        echo $revision->getCreatedBy()->getUsername();
        ?>
</a></td>
	<td><?php 
        echo radio_field('rev1', $iteration == 2, array('value' => $revision->getRevision()));
        ?>
</td>
	<td><?php 
        echo radio_field('rev2', $iteration == 1, array('value' => $revision->getRevision()));
        ?>
</td>
	<?php 
        if ($can_edit) {
            ?>
	<td>
		<?php 
            if ($cur_revision->getRevision() != $revision->getRevision()) {
                ?>
		<a href="<?php 
                echo $revision->getRevertUrl();
                ?>
"><?php 
                echo lang('revert');
                ?>
Пример #25
0
        echo $im_type->getName();
        ?>
 icon" /></td>
        <td style="vertical-align: middle"><label class="checkbox" for="<?php 
        echo 'profileFormIm' . $im_type->getId();
        ?>
"><?php 
        echo $im_type->getName();
        ?>
</label></td>
        <td style="vertical-align: middle"><?php 
        echo text_field('user[im_' . $im_type->getId() . ']', array_var($user_data, 'im_' . $im_type->getId()), array('id' => 'profileFormIm' . $im_type->getId()));
        ?>
</td>
        <td style="vertical-align: middle"><?php 
        echo radio_field('user[default_im]', array_var($user_data, 'default_im') == $im_type->getId(), array('value' => $im_type->getId()));
        ?>
</td>
      </tr>
<?php 
    }
    // foreach
    ?>
    </table>
    <p class="desc"><?php 
    echo lang('primary im description');
    ?>
</p>
  </fieldset>
<?php 
}
Пример #26
0
		<div class="content">
			<div id="<?php echo $genid ?>addFileFilenameCheck" style="display: none">
				<h2><?php echo lang("checking filename") ?></h2>
			</div>
			<div id="<?php echo $genid ?>addFileUploadingFile" style="display: none">
				<h2><?php echo lang("uploading file") ?></h2>
			</div>

			<div id="<?php echo $genid ?>addFileFilenameExists" style="display: none">
				<h2><?php echo lang("duplicate filename")?></h2>
				<p><?php echo lang("filename exists") ?></p>
				<div style="padding-top: 10px">
				<table>
					<tr>
						<td style="height: 20px; padding-right: 4px">
							<?php echo radio_field('file[upload_option]',true, array("id" => $genid . 'radioAddFileUploadAnyway', "value" => -1, 'tabindex' => '30')) ?>
						</td>
						<td>
							<?php echo lang('upload anyway')?>
						</td>
					</tr>
				</table>
				<table id="<?php echo $genid ?>upload-table">
				</table>
				</div>
			</div>
		</div>
		<?php if ($comments_required) { ?>
			<?php echo label_tag(lang('revision comment'), $genid.'fileFormRevisionComment', $comments_required) ?>
			<?php echo textarea_field('file[revision_comment]', array_var($file_data, 'revision_comment', lang('initial versions')), array('id' => $genid.'fileFormRevisionComment', 'class' => 'long')) ?>
		<?php } else { ?>
Пример #27
0
 <div>
   <?php echo label_tag(lang('success message'), 'projectFormSuccessMessage',true) ?>
   <?php echo textarea_field('project_form[success_message]', array_var($project_form_data, 'success_message'), array('id' => 'projectFormSuccessMessage', 'class' => 'short')) ?>
 </div>
 
 <div class="formBlock" id="projectFormAction">
   <fieldset>
     <legend><?php echo lang('project form action') ?></legend>
     
     <table class="blank">
       <tr>
         <td><?php echo radio_field('project_form[action]', array_var($project_form_data, 'action') == ProjectForm::ADD_COMMENT_ACTION, array('value' => ProjectForm::ADD_COMMENT_ACTION, 'id' => 'projectFormActionAddComment', 'onclick' => 'App.modules.addProjectForm.formActionClick()')) ?> <?php echo label_tag(lang('project form action add comment'), 'projectFormActionAddComment', false, array('class' => 'checkbox'), '') ?></td>
         <td><?php echo lang('add comment to message short') ?>: <?php echo select_message('project_form[message_id]', active_project(), array_var($project_form_data, 'message_id'), array('id' => 'projectFormActionSelectMessage')) ?></td>
       </tr>
       <tr>
         <td><?php echo radio_field('project_form[action]', array_var($project_form_data, 'action') == ProjectForm::ADD_TASK_ACTION, array('value' => ProjectForm::ADD_TASK_ACTION , 'id' => 'projectFormActionAddTask', 'onclick' => 'App.modules.addProjectForm.formActionClick()')) ?> <?php echo label_tag(lang('project form action add task'), 'projectFormActionAddTask', false, array('class' => 'checkbox'), '') ?></td>
         <td><?php echo lang('add task to list short') ?>: <?php echo select_task_list('project_form[task_list_id]', active_project(), array_var($project_form_data, 'task_list_id'), false, array('id' => 'projectFormActionSelectTaskList')) ?></td>
       </tr>
     </table>
     <script>
       App.modules.addProjectForm.formActionClick();
     </script>
   </fieldset>
 </div>
 
 <div class="formBlock" id="projectFormOptions">
   <fieldset>
     <legend><?php echo lang('options') ?></legend>
     <table class="blank">
       <tr>
         <td><?php echo label_tag(lang('project form enabled')) ?></td>
        ?>
</span></td>
				<td align=center><?php 
        echo radio_field($genid . 'rg_' . $id_suffix, false, array('onchange' => 'og.ogPermValueChanged(' . $change_parameters . ')', 'value' => '3', 'style' => 'width:16px', 'id' => $genid . 'rg_3_' . $id_suffix, 'class' => "radio_3"));
        ?>
</td>
				<td align=center><?php 
        echo radio_field($genid . 'rg_' . $id_suffix, false, array('onchange' => 'og.ogPermValueChanged(' . $change_parameters . ')', 'value' => '2', 'style' => 'width:16px', 'id' => $genid . 'rg_2_' . $id_suffix, 'class' => "radio_2"));
        ?>
</td>
				<td align=center><?php 
        echo radio_field($genid . 'rg_' . $id_suffix, false, array('onchange' => 'og.ogPermValueChanged(' . $change_parameters . ')', 'value' => '1', 'style' => 'width:16px', 'id' => $genid . 'rg_1_' . $id_suffix, 'class' => "radio_1"));
        ?>
</td>
				<td align=center><?php 
        echo radio_field($genid . 'rg_' . $id_suffix, false, array('onchange' => 'og.ogPermValueChanged(' . $change_parameters . ')', 'value' => '0', 'style' => 'width:16px', 'id' => $genid . 'rg_0_' . $id_suffix, 'class' => "radio_0"));
        ?>
</td>
			</tr>
<?php 
    }
    ?>
    
	    </table>
		<div style="width: 100%; text-align: right; margin: 15px 0;">
			<div>
				<a href="#" class="internalLink underline" onclick="og.ogPermApplyToSubmembers('<?php 
    echo $genid;
    ?>
', '<?php 
    echo $dimension->getId();
Пример #29
0
</legend>
  <div>
    <?php 
echo radio_field('load[what]', true, array('value' => 'locale', 'id' => 'loadFormWhatLocale'));
?>
    <?php 
echo label_tag(lang('locale'), 'loadFormLocale', false);
?>
    <?php 
echo select_locale('load[locale]', array_var($load_data, 'locales1'), array('value' => 'existing', 'id' => 'loadFormLocale'));
?>
  </div>

  <div>
    <?php 
echo radio_field('load[what]', false, array('value' => 'file', 'id' => 'loadFormWhatFile'));
?>
    <?php 
echo label_tag(lang('files'), 'loadFormFile', false);
?>
    <?php 
echo select_locale('load[file]', array_var($load_data, 'locales2'), array('id' => 'loadFormFile'));
?>
  </div>
  </fieldset>

  <p><?php 
echo lang('maximum execution time', $load_data['max_time']) . ' ' . $load_data['max_time'] . ' seconds';
?>
</p>
							}
						</script>
						<table>
							<tr><td colspan="2" style="vertical-align:middle; height: 22px;">
								<?php 
    echo radio_field('task[repeat_option]', $rsel1, array('id' => $genid . 'repeat_opt_forever', 'value' => '1', 'style' => 'vertical-align:middle', 'onclick' => 'og.viewDays(true)')) . "&nbsp;" . lang('CAL_REPEAT_FOREVER');
    ?>
							</td></tr>
							<tr><td colspan="2" style="vertical-align:middle">
								<?php 
    echo radio_field('task[repeat_option]', $rsel2, array('id' => $genid . 'repeat_opt_times', 'value' => '2', 'style' => 'vertical-align:middle', 'onclick' => 'og.viewDays(true)')) . "&nbsp;" . lang('CAL_REPEAT');
    echo "&nbsp;" . text_field('task[repeat_num]', $rnum, array('size' => '3', 'id' => $genid . 'repeat_num', 'maxlength' => '3', 'style' => 'width:25px', 'onchange' => 'og.selectRepeatMode(2);')) . "&nbsp;" . lang('CAL_TIMES');
    ?>
							</td></tr>
							<tr><td style="vertical-align:middle"><?php 
    echo radio_field('task[repeat_option]', $rsel3, array('id' => $genid . 'repeat_opt_until', 'value' => '3', 'style' => 'vertical-align:middle', 'onclick' => 'og.viewDays(true)')) . "&nbsp;" . lang('CAL_REPEAT_UNTIL');
    ?>
</td>
								<td style="padding-left:8px;"><?php 
    echo pick_date_widget2('task[repeat_end]', $rend, $genid, 99);
    ?>
							</td></tr>
						</table>
						<script type="text/javascript">
							var els = document.getElementsByName('task[repeat_end]');
							for (i=0; i<els.length; i++) {
								els[i].onchange = function() {
									og.selectRepeatMode(3);
								}
							}
						</script>