diff --git a/css/rtl.css b/css/rtl.css index d0fc65c9f5ed8b4fee5f3b117b2d7760328ef0ba..ba61617f51bf5da94191c89f869e33278c9d487a 100644 --- a/css/rtl.css +++ b/css/rtl.css @@ -57,3 +57,9 @@ .rtl .form_table th, .rtl div.section-break { text-align: right; } +.rtl .flush-right { + text-align: left; +} +.rtl .flush-left { + text-align: right; +} diff --git a/include/class.forms.php b/include/class.forms.php index c5cc4b7a4e8e4ed3e337345564949d3a563f25fe..a804786204559fd0f79b7c96e4d1093d5e8731c8 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -131,7 +131,7 @@ class FormField { var $presentation_only = false; static $types = array( - 'Basic Fields' => array( + /* trans */ 'Basic Fields' => array( 'text' => array( /* trans */ 'Short Answer', 'TextboxField'), 'memo' => array( /* trans */ 'Long Answer', 'TextareaField'), 'thread' => array( /* trans */ 'Thread Entry', 'ThreadEntryField', false), diff --git a/include/staff/dynamic-form.inc.php b/include/staff/dynamic-form.inc.php index ddc510f6dc2dbeae4e15c09d317903d636dd4035..79ef67f634f123296cc82d27b7d2734b9c1f62b4 100644 --- a/include/staff/dynamic-form.inc.php +++ b/include/staff/dynamic-form.inc.php @@ -61,8 +61,8 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <th colspan="7"> <em><strong><?php echo __('User Information Fields'); ?></strong> <?php echo sprintf(__('(These fields are requested for new tickets - via the %s form)', - UserForm::objects()->one()->get('title'))); ?></em> + via the %s form)'), + UserForm::objects()->one()->get('title')); ?></em> </th> </tr> <tr> @@ -85,7 +85,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tr> <td></td> <td><?php echo $f->get('label'); ?></td> - <td><?php $t=FormField::getFieldType($f->get('type')); echo $t[0]; ?></td> + <td><?php $t=FormField::getFieldType($f->get('type')); echo __($t[0]); ?></td> <td><input type="checkbox" disabled="disabled"/></td> <td><input type="checkbox" disabled="disabled" <?php echo $f->get('required') ? 'checked="checked"' : ''; ?>/></td> @@ -103,8 +103,8 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </th> </tr> <tr> - <th nowrap><?php echo __('Sort'); ?> - <i class="help-tip icon-question-sign" href="#field_sort"></i></th> + <th nowrap + ><i class="help-tip icon-question-sign" href="#field_sort"></i></th> <th nowrap><?php echo __('Label'); ?> <i class="help-tip icon-question-sign" href="#field_label"></i></th> <th nowrap><?php echo __('Type'); ?> @@ -135,16 +135,16 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <font class="error"><?php if ($ferrors['label']) echo '<br/>'; echo $ferrors['label']; ?> </td> - <td nowrap><select name="type-<?php echo $id; ?>" <?php + <td nowrap><select style="max-width:150px" name="type-<?php echo $id; ?>" <?php if (!$fi->isChangeable()) echo 'disabled="disabled"'; ?>> <?php foreach (FormField::allTypes() as $group=>$types) { - ?><optgroup label="<?php echo Format::htmlchars($group); ?>"><?php + ?><optgroup label="<?php echo Format::htmlchars(__($group)); ?>"><?php foreach ($types as $type=>$nfo) { if ($f->get('type') != $type && isset($nfo[2]) && !$nfo[2]) continue; ?> <option value="<?php echo $type; ?>" <?php if ($f->get('type') == $type) echo 'selected="selected"'; ?>> - <?php echo $nfo[0]; ?></option> + <?php echo __($nfo[0]); ?></option> <?php } ?> </optgroup> <?php } ?> @@ -155,7 +155,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); echo $f->get('id'); ?>" onclick="javascript: $('#overlay').show(); - $('#field-config .body').load($(this).attr('href').substr(1)); + $('#field-config .body').empty().load($(this).attr('href').substr(1)); $('#field-config').show(); return false; "><i class="icon-edit"></i> <?php echo __('Config'); ?></a> @@ -195,14 +195,14 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); value="<?php echo $info["sort-new-$i"]; ?>"/></td> <td><input type="text" size="32" name="label-new-<?php echo $i; ?>" value="<?php echo $info["label-new-$i"]; ?>"/></td> - <td><select name="type-new-<?php echo $i; ?>"> + <td><select style="max-width:150px" name="type-new-<?php echo $i; ?>"> <?php foreach (FormField::allTypes() as $group=>$types) { - ?><optgroup label="<?php echo Format::htmlchars($group); ?>"><?php + ?><optgroup label="<?php echo Format::htmlchars(__($group)); ?>"><?php foreach ($types as $type=>$nfo) { if (isset($nfo[2]) && !$nfo[2]) continue; ?> <option value="<?php echo $type; ?>" <?php if ($info["type-new-$i"] == $type) echo 'selected="selected"'; ?>> - <?php echo $nfo[0]; ?> + <?php echo __($nfo[0]); ?> </option> <?php } ?> </optgroup> @@ -271,10 +271,21 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </form> <div style="display:none;" class="dialog draggable" id="field-config"> + <div id="popup-loading"> + <h1><i class="icon-spinner icon-spin icon-large pull-left"></i> + <?php echo __('Loading ...');?></h1> + </div> <div class="body"></div> </div> <script type="text/javascript"> +$(function() { + $('#popup-loading').hide().ajaxStart( function() { + $(this).show(); // show Loading Div + } ).ajaxStop ( function(){ + $(this).hide(); // hide loading div + }); +}); $('form.manage-form').on('submit.inline', function(e) { var formObj = this, deleted = $('input.delete-box:checked', this); if (deleted.length) { @@ -286,7 +297,7 @@ $('form.manage-form').on('submit.inline', function(e) { .append($('<input/>').attr({type:'checkbox',name:'delete-data-' + $(e).data('fieldId')}) ).append($('<strong>').html( - '<?php echo __('Remove all data entered for <u> %s </u>?'); + ' <?php echo __('Remove all data entered for <u> %s </u>?'); ?>'.replace('%s', $(e).data('fieldLabel')) )) ); diff --git a/include/staff/dynamic-list.inc.php b/include/staff/dynamic-list.inc.php index 6a1d67f6b71725dfa5d7d722bc1f49387e3d730e..a17174b009737a2434ff34418a9bf80549efed03 100644 --- a/include/staff/dynamic-list.inc.php +++ b/include/staff/dynamic-list.inc.php @@ -132,7 +132,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); echo $f->get('id'); ?>" onclick="javascript: $('#overlay').show(); - $('#field-config .body').load($(this).attr('href').substr(1)); + $('#field-config .body').empty().load($(this).attr('href').substr(1)); $('#field-config').show(); return false; "><i class="icon-edit"></i> <?php echo __('Config'); ?></a> @@ -203,7 +203,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tr> <th></th> <th><?php echo __('Value'); ?></th> - <th><?php echo __('Extra'); ?> <em style="display:inline">— + <th><?php echo __('Extra'); ?> <em style="display:inline">— <?php echo __('abbreviations and such'); ?></em></th> <th><?php echo __('Disabled'); ?></th> <th><?php echo __('Delete'); ?></th> @@ -230,7 +230,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); echo $i->get('id'); ?>/properties" onclick="javascript: $('#overlay').show(); - $('#field-config .body').load($(this).attr('href').substr(1)); + $('#field-config .body').empty().load($(this).attr('href').substr(1)); $('#field-config').show(); return false; "><i class="icon-edit"></i> <?php echo __('Properties'); ?></a> @@ -267,5 +267,18 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </form> <div style="display:none;" class="dialog draggable" id="field-config"> + <div id="popup-loading"> + <h1><i class="icon-spinner icon-spin icon-large pull-left"></i> + <?php echo __('Loading ...');?></h1> + </div> <div class="body"></div> </div> +<script type="text/javascript"> +$(function() { + $('#popup-loading').hide().ajaxStart( function() { + $(this).show(); // show Loading Div + } ).ajaxStop ( function(){ + $(this).hide(); // hide loading div + }); +}); +</script> diff --git a/include/staff/templates/collaborators.tmpl.php b/include/staff/templates/collaborators.tmpl.php index c1efc8a62263d814a33e1bbd516be71eaa40d1d8..22d01c8315f06d7439c0860714c334d2c8bd5ae1 100644 --- a/include/staff/templates/collaborators.tmpl.php +++ b/include/staff/templates/collaborators.tmpl.php @@ -37,16 +37,16 @@ if(($users=$ticket->getCollaborators())) {?> <hr style="margin-top:1em"/> <div><a class="collaborator" href="#tickets/<?php echo $ticket->getId(); ?>/add-collaborator" - ><?php echo __('Add New Collaborator'); ?></a></div> + ><i class="icon-plus-sign"></i> <?php echo __('Add New Collaborator'); ?></a></div> <div id="savewarning" style="display:none; padding-top:2px;"><p id="msg_warning"><?php echo __('You have made changes that you need to save.'); ?></p></div> <p class="full-width"> - <span class="buttons" style="float:left"> - <input type="button" value="Cancel" class="close"> - <input type="reset" value="Reset"> + <span class="buttons pull-left"> + <input type="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" value="<?php echo __('Cancel'); ?>" class="close"> </span> - <span class="buttons" style="float:right"> - <input type="submit" value="Save Changes"> + <span class="buttons pull-right"> + <input type="submit" value="<?php echo __('Save Changes'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/dynamic-field-config.tmpl.php b/include/staff/templates/dynamic-field-config.tmpl.php index 3e7d912966238599c8aa6ea88193d72c1af7a453..9c1261e9ace8a02000fb188efb51f62900fc951d 100644 --- a/include/staff/templates/dynamic-field-config.tmpl.php +++ b/include/staff/templates/dynamic-field-config.tmpl.php @@ -14,7 +14,6 @@ }); return false; "> - <table width="100%"> <?php echo csrf_token(); $config = $field->getConfiguration(); @@ -24,56 +23,54 @@ else if ($f->get('default')) $f->value = $f->get('default'); ?> - <tr><td class="multi-line"> - <label for="<?php echo $f->getWidget()->name; ?>" - style="vertical-align:top;padding-top:0.2em"> + <div class="flush-left custom-field"> + <div class="field-label"> + <label for="<?php echo $f->getWidget()->name; ?>"> <?php echo Format::htmlchars($f->get('label')); ?>:</label> - </td><td> - <span style="display:inline-block"> + <?php + if ($f->get('hint')) { ?> + <br/><em style="color:gray;display:inline-block"><?php + echo Format::htmlchars($f->get('hint')); ?></em> + <?php + } ?> + </div><div> <?php $f->render(); if ($f->get('required')) { ?> <font class="error">*</font> <?php } - if ($f->get('hint')) { ?> - <br /><em style="color:gray;display:inline-block"><?php - echo Format::htmlchars($f->get('hint')); ?></em> - <?php - } ?> - </span> + </div> <?php foreach ($f->errors() as $e) { ?> - <br /> - <font class="error"><?php echo $e; ?></font> + <div class="error"><?php echo $e; ?></div> <?php } ?> - </td></tr> - <?php - } + </div> + <?php } ?> - <tr><td colspan="2"><hr/></td></tr> - <tr><td class="multi-line"> + <hr/> + <div class="flush-left custom-field"> + <div class="field-label"> <label for="hint" - style="vertical-align:top;padding-top:0.2em">Help Text:</label> - </td><td> - <span style="display:inline-block"> - <textarea name="hint" rows="2" cols="40"><?php - echo Format::htmlchars($field->get('hint')); ?></textarea> + style="vertical-align:top;padding-top:0.2em"><?php echo __('Help Text') ?>:</label> <br /> <em style="color:gray;display:inline-block"> <?php echo __('Help text shown with the field'); ?></em> - </span> - </td></tr> - </table> + </div> + <div> + <textarea style="width:100%" name="hint" rows="2" cols="40"><?php + echo Format::htmlchars($field->get('hint')); ?></textarea> + </div> + </div> <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> - <input type="button" value="Cancel" class="close"> + <input type="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" value="<?php echo __('Cancel'); ?>" class="close"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Save"> + <input type="submit" value="<?php echo __('Save'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/list-item-properties.tmpl.php b/include/staff/templates/list-item-properties.tmpl.php index 6895d6a48b87fdc9012b0e996a24f063f7c2a9dc..a4f143d9125eb33e3ee8c7d49113a7403d5c9364 100644 --- a/include/staff/templates/list-item-properties.tmpl.php +++ b/include/staff/templates/list-item-properties.tmpl.php @@ -13,8 +13,6 @@ } }); return false;"> - <table width="100%" class="fixed"> - <tr><td style="width:120px"></td><td></td></tr> <?php echo csrf_token(); $config = $item->getConfiguration(); @@ -25,31 +23,31 @@ else if ($f->get('default')) $f->value = $f->get('default'); ?> - <tr><td class="multi-line"> + <div class="custom-field"> + <div class="field-label"> <label for="<?php echo $f->getWidget()->name; ?>" style="vertical-align:top;padding-top:0.2em"> <?php echo Format::htmlchars($f->get('label')); ?>:</label> - </td><td> - <span style="display:inline-block;width:100%"> + <?php + if ($f->get('hint')) { ?> + <br /><em style="color:gray;display:inline-block"><?php + echo Format::htmlchars($f->get('hint')); ?></em> + <?php + } ?> + </div><div> <?php $f->render(); if ($f->get('required')) { ?> <font class="error">*</font> <?php } - if ($f->get('hint')) { ?> - <br /><em style="color:gray;display:inline-block"><?php - echo Format::htmlchars($f->get('hint')); ?></em> - <?php - } ?> - </span> + </div> <?php foreach ($f->errors() as $e) { ?> - <br /> - <font class="error"><?php echo $e; ?></font> + <div class="error"><?php echo $e; ?></div> <?php } ?> - </td></tr> + </div> <?php } ?> @@ -57,11 +55,11 @@ <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> - <input type="button" value="Cancel" class="close"> + <input type="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" value="<?php echo __('Cancel'); ?>" class="close"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Save"> + <input type="submit" value="<?php echo __('Save'); ?>"> </span> </p> </form> diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index eb27fc2ce7bec1bbc9e9d50675cc77529f2761e9..f95112dbd23ed338b62a16452c79379c10025d61 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -907,11 +907,11 @@ $tcount+= $ticket->getNumNotes(); <input type="hidden" name="a" value="print"> <input type="hidden" name="id" value="<?php echo $ticket->getId(); ?>"> <fieldset class="notes"> - <label for="notes"><?php echo __('Print Notes');?>:</label> + <label class="fixed-size" for="notes"><?php echo __('Print Notes');?>:</label> <input type="checkbox" id="notes" name="notes" value="1"> <?php echo __('Print <b>Internal</b> Notes/Comments');?> </fieldset> <fieldset> - <label for="psize"><?php echo __('Paper Size');?>:</label> + <label class="fixed-size" for="psize"><?php echo __('Paper Size');?>:</label> <select id="psize" name="psize"> <option value="">— <?php echo __('Select Print Paper Size');?> —</option> <?php @@ -996,7 +996,7 @@ $tcount+= $ticket->getNumNotes(); </p> <p class="confirm-action" style="display:none;" id="changeuser-confirm"> <span id="msg_warning" style="display:block;vertical-align:top"> - <b><?php echo sprintf(Format::htmlchars(__('%s <%s> will longer have access to the ticket')), + <?php echo sprintf(Format::htmlchars(__('%s <%s> will longer have access to the ticket')), '<b>'.Format::htmlchars($ticket->getName()).'</b>', Format::htmlchars($ticket->getEmail())); ?> </span> <?php echo sprintf(__('Are you sure want to <b>change</b> ticket owner to %s?'), diff --git a/scp/css/scp.css b/scp/css/scp.css index 637783343db963f8ce6bc8ae2b39f0da474fee80..b87777448a40336107ab4ca0c90ced1f253043b0 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -1400,7 +1400,14 @@ time { overflow:hidden; } -.dialog label { +.dialog .custom-field .field-label { + margin-left: 3px; + margin-right: 3px; +} +.dialog .custom-field + .custom-field { + margin-top: 8px; +} +.dialog label.fixed-size { width:100px; display:inline-block; text-align:right; @@ -1870,6 +1877,9 @@ table.custom-info td { .flush-right { text-align: right; } +.flush-left { + text-align: left; +} .ltr { direction: ltr; unicode-bidi: embed;