I am trying to add default empty text to an HTML field in TFS 2013. I am doing this by updating the "EmptyText" attribute for the field in the Layout options (using Process Editor).
However, regardless of what I enter here, the intended text is never displayed. It is always empty. I have the same issue with both HTML & Plain Text fields.
Is this a fundamental limitation of TFS? Or am I specifying this incorrectly?
I am not using a DEFAULT rule because I want the user to notice that the field is empty and be required to enter a value.
I can get it work correctly. Two changes made:
Edit the "Empty Text" attribute just as you mentioned above (in my case I create one custom HTML field called Custom.DetailHTML):
Add Required rule to this field to define that this field must be specified with a value:
<FieldDefinition name="DetailHtml" refname="Custom.DetailHtml" type="HTML">
<REQUIRED />
</FieldDefinition>
If you still can't get it work, please show your WIT file.
Related
I'm trying to change field label/string on amount_by_group field that is showing total tax amount on Invoice form.
Tried to do it like this - using field attributes
<xpath expr="//field[#name='amount_by_group']" position="attributes">
<attribute name="string">Porez</attribute>
</xpath>
No luck, also tried to replace field with the same field but with string defined
<xpath expr="//field[#name='amount_by_group']" position="replace">
<field name="amount_by_group" widget="tax-group-custom-field" nolabel="1" colspan="2" attrs="{'invisible': [('amount_tax', '=', 0)]}" string="Tax"/>
</xpath>
I used methods described here (first two points in answer by Cybrosys) https://www.odoo.com/forum/help-1/change-field-label-through-python-149963
Does anybody have clue how to change that fields name? At the moment field label is "Neoporezivo" and I'd like to show it as "Porez".
What you tried is correct. It seems in your case, you have to update field translation.
When we load a new language, Odoo translates terms based on .po file given the folder i18n in the related module.
You can try first from the front end and if it works, you can override .po file.
Try this:
Active developer mode.
Go to Settings > Translations > Translated Terms
Find your displayed term and edit it with your desired term.
Refresh your page and check your form. It should update with the desired term.
EDIT:
I have created two custom fields on a JIRA story that I need rich text entry. The problem is that one is rendering correctly and the other isn't as can be see by the following images.
Both as can be seen are setup 'Text Field Multi-line' - exhausted all other lines of enquiry
The field has probably not the correct field renderer configured.
Settings --> Issues --> Field Configurations --> Your used field configuration
Now look for your field and click the "Renderers" link to select the "Wiki Style Renderer".
You need to create a Text Field, and convert it to WIKI style text field. This way you will be able to post URL.
Here is 5 minute video which I have created on how to do this.
https://youtu.be/QCNHPy88iKA
I hope it helps.
I have enabled the new work item form in TFS 2017 after upgrading from TFS 2015, but have found that there are some fields that aren't showing in the new work item form, even though I can see the field declared in the WebLayout section when editing the work item type XML. Is there a condition which hides fields in WebLayout?
The field I am trying to get appear is the Microsoft.VSTS.Scheduling.RemainingWork field. I have the following inside the WebLayout:
<WebLayout>
<!- Snipped some other groups which show -->
<Group Label="Timescales">
<!-- Snipped Some other fields which show -->
<Control FieldName="Microsoft.VSTS.Scheduling.RemainingWork" Type="FieldControl" Label="Remaining Work" />
</Group>
</WebLayout>
I also had the same issue with a custom String field, but I no longer needed the field so I removed it anyway.
The field is not shown and declared in Web Layout, you need to double check if the field is hidden or have an invalid value of the field.
In your case, you can edit the work item type to add the REQUIRED role from Remaining Work field when change particular States (such as from Done to In Progress). Please follow the below steps:
Open your work item type using TFS Power Tools in (Process Editor).
Under Workflow tab, find the Transition which from Done to
In Progress, then double click on this Transition.
In Workflow Transition dialog, under Fields tab, add the Remaining
Work field, then click OK button and save your work item type.
As a workaround, when you change the statuses, even though the transition was clearing the Reamining Work filed, still need to enter the value for the field.
So, what I found was that when I changed between 2 particular statuses, the transition was clearing the Remaining Work field value. I'm guessing that the WebLayout doesn't display invalid fields, as a blank string is not a valid Double field, which Remaining Work is defined as
OK I can't believe this can't be found anywhere so I'm asking the question.
Is there a way to set the default Html Editor Profile in Sitecore so I don't have the override the Source field on each individual Rich Text field?
e.g. I want to make this the default option for the Html editor:
/sitecore/system/Settings/Html Editor Profiles/Rich Text Medium
Its an old question but here is the solution I found in Sitecore 6.5 - I was looking to do the same thing in 6.5:
You can change the value to the path of your default editor in the web.config. This will change is across all fields where the source is not defined.
<!-- HTML EDITOR DEFAULT PROFILE
Path to the default html editor profile.
Default value: /sitecore/system/Settings/Html Editor Profiles/Rich Text Default
-->
<setting name="HtmlEditor.DefaultProfile" value="/sitecore/system/Settings/Html Editor Profiles/Rich Text Default"/>
It seems to fall back to the "/sitecore/system/Settings/Html Editor Profiles/Rich Text Default" in case the source is not defined. Thus, if you try to modify this default profile, every RTE field will obtain these modifications by default, without specifying the source.
Never tried it myself, though...
I've got an MVC app that gives the user textarea's to update some description fields. It's strongly-typed to a table object, and the fields are wrapped in a form with a Submit button.
Occaisionally they don't want any data in a field, but when they delete the text and try to save, the blanked-out field comes back with its original text (i.e. the table object passed to the Save action contains other edits, but attempts to blank out fields result in the original text staying in the field).
I'm assuming this is LINQ trying to determine which fields have been edited, but how do you tell it that it's blank on purpose?
UPDATE: It appears this may be a problem with the TinyMCE jQuery plugin. It adds rich-text functionality to textarea controls. If I turn it off, I can remove text with no problems.
UPDATE 2: It seems to be some kind of javascript bug or something. If I put another dummy field after the problem fields, they work. If I move them to another place in my code, they work. They just don't want to work where they are. Very peculiar.
I'm pretty sure that TinyMCE, by default, puts in <p></p> when the control is emptied.
So if you are checking for "" then you may be disapointed.
This initially caused me some issues but never with saving. I was checking if the field was "" and then doing something else. Once I realised that "" was never going to happen, I adapted my validation accordingly.
I just check that on a recent project using TinyMCE editor, but it indeed send "" for an empty input, and during the implementation we had no issues with that.
alt text http://diarioplus.com/files/pictures/tiny.PNG
The body property is the one with a tinyMCE editor on the client side.
I really think it will be something with the modelBinder or the way you set the values back to the model.