[Rt-commit] rt branch, 4.4/cf-entry-hint, repushed
? sunnavy
sunnavy at bestpractical.com
Mon Feb 24 12:01:50 EST 2014
The branch 4.4/cf-entry-hint was deleted and repushed:
was 229e6237e3226835c07b4a94c07faf61efcb5308
now 5cb59368955e63a0b3701081a8edf1af04a7b9cf
1: 29cb180 = 1: 29cb180 EntryHint column for CustomFields table
2: 42d7da6 = 2: 42d7da6 set EntryHint on create and default it to FriendlyType if not define
3: 307ed1d = 3: 307ed1d update EntryHint accordingly when Type is updated and EntryHint matches the old FriendlyType
4: 229e623 ! 4: 5cb5936 EntryHint field edit support on cf admin page
@@ -13,24 +13,35 @@
+jQuery( function() {
+ var select = jQuery('select[name=TypeComposite]');
+ var default_hint = select.find('option:selected').text();
++ var hint_input = jQuery('input[name=EntryHint]');
+ select.change(function() {
-+ var hint_input = jQuery('input[name=EntryHint]');
+ var new_hint = jQuery(this).find('option:selected').text();
+ if ( hint_input.val() == default_hint ) {
+ hint_input.val(new_hint);
+ }
+ default_hint = new_hint;
+ });
++% if ( $id eq 'new' && not defined $EntryHint) {
++ hint_input.val(default_hint);
++% }
+});
+</script>
+
+<tr><td class="label"><&|/l&>Entry Hint</&></td>
-+<td><input name="EntryHint" value="<% $CustomFieldObj->EntryHint // '' %>" size="80" /></td></tr>
++<td><input name="EntryHint" value="<% $CustomFieldObj->EntryHint // $EntryHint // '' %>" size="80" /></td></tr>
+
+
<tr class="edit_validation"><td class="label"><&|/l&>Validation</&></td>
<td><& /Widgets/ComboBox,
Name => 'Pattern',
+@@
+ IncludeContentForValue => $IncludeContentForValue,
+ BasedOn => $BasedOn,
+ Disabled => ($Enabled ? 0 : 1),
++ EntryHint => $EntryHint,
+ );
+ if (!$val) {
+ push @results, loc("Could not create CustomField: [_1]", $msg);
@@
#we're asking about enabled on the web page but really care about disabled.
$ARGS{'Disabled'} = $Enabled? 0 : 1;
@@ -40,3 +51,9 @@
push @results, UpdateRecordObject(
AttributesRef => \@attribs,
Object => $CustomFieldObj,
+@@
+ $LinkValueTo => undef
+ $IncludeContentForValue => undef
+ $BasedOn => undef
++$EntryHint => undef
+ </%ARGS>
More information about the rt-commit
mailing list