Skip to content

Commit

Permalink
Move the label field to the options tab
Browse files Browse the repository at this point in the history
Closes #22
  • Loading branch information
laoneo committed Apr 12, 2016
1 parent 8dd9e50 commit c87b689
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions administrator/components/com_fields/models/forms/field.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
default="text" description="COM_FIELDS_FIELD_TYPE_DESC" class=""
required="true">
</field>
<field name="label" type="text" label="COM_FIELDS_FIELD_LABEL_LABEL"
description="COM_FIELDS_FIELD_LABEL_DESC" class="input-xxlarge"
size="40" required="true" />
<field name="required" type="radio" class="btn-group" default="0"
label="COM_FIELDS_FIELD_REQUIRED_LABEL" description="COM_FIELDS_FIELD_REQUIRED_DESC">
<option value="1">JYES</option>
Expand Down Expand Up @@ -91,6 +88,9 @@

<fields name="params" label="COM_FIELDS_FIELD_BASIC_LABEL">
<fieldset name="basic">
<field name="label" type="text" label="COM_FIELDS_FIELD_LABEL_LABEL"
description="COM_FIELDS_FIELD_LABEL_DESC" class="input-xxlarge"
size="40" required="true" />
<field name="image" type="media" label="COM_FIELDS_FIELD_IMAGE_LABEL"
description="COM_FIELDS_FIELD_IMAGE_DESC" />
<field name="image_alt" type="text"
Expand Down
5 changes: 2 additions & 3 deletions administrator/components/com_fields/views/field/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
jQuery(document).ready(function() {
jQuery("#jform_title").data("dp-old-value", jQuery("#jform_title").val());
jQuery("#jform_title").change(function(data, handler) {
if(jQuery("#jform_title").data("dp-old-value") == jQuery("#jform_label").val()) {
jQuery("#jform_label").val(jQuery("#jform_title").val());
if(jQuery("#jform_title").data("dp-old-value") == jQuery("#jform_params_label").val()) {
jQuery("#jform_params_label").val(jQuery("#jform_title").val());
}
jQuery("#jform_title").data("dp-old-value", jQuery("#jform_title").val());
Expand All @@ -54,7 +54,6 @@
<div class="span9">
<?php
echo $this->form->renderField('type');
echo $this->form->renderField('label');
echo $this->form->renderField('required');
echo $this->form->renderField('default_value');

Expand Down

0 comments on commit c87b689

Please sign in to comment.