I'm happy with the code in this branch, with a few nitpicks. You need to
get a UI review too (and I'm not a UI reviewer). I've requested a UI review
for the MP.
167 +USE_ARCHIVE_VOCABULARY = SimpleVocabulary((
168 + SimpleTerm(EXISTING_PPA, EXISTING_PPA,
169 + _("Use an existing PPA")),
170 + SimpleTerm(CREATE_NEW, CREATE_NEW,
171 + _("Create a new PPA for this recipe")),
172 + ))
This should be formatted:
USE_ARCHIVE_VOCABULARY = SimpleVocabulary((
SimpleTerm(EXISTING_PPA, EXISTING_PPA, _("Use an existing PPA")),
SimpleTerm(
CREATE_NEW, CREATE_NEW, _("Create a new PPA for this recipe")),
))
183 + ppa_name = TextLine(
184 + title=_("New PPA name"), required=False,
185 + constraint=name_validator,
186 + description=_("A new PPA with this name will be created for "
187 + "the owner of the recipe ."))
The arguments here should be indented by one level from the declaration,
not two.
A couple of JS points that I'm not too worried about (but decided to
point out all the same):
444 + function set_enabled(field_id, is_enabled) {
445 + var field = Y.DOM.byId(field_id);
446 + field.disabled = !is_enabled;
447 + if (is_enabled && set_field_focus) field.focus();
448 + };
Hi Tim,
I'm happy with the code in this branch, with a few nitpicks. You need to
get a UI review too (and I'm not a UI reviewer). I've requested a UI review
for the MP.
82 + return render( index=term. value,
83 + text=label,
84 + value=value,
85 + name=widget.name,
86 + cssClass='')
This should be formatted as:
return render(
index= term.value, text=label, value=value, name=widget.name,
cssClass= '')
167 +USE_ARCHIVE_ VOCABULARY = SimpleVocabulary(( EXISTING_ PPA, EXISTING_PPA, CREATE_ NEW, CREATE_NEW,
168 + SimpleTerm(
169 + _("Use an existing PPA")),
170 + SimpleTerm(
171 + _("Create a new PPA for this recipe")),
172 + ))
This should be formatted:
USE_ARCHIVE_ VOCABULARY = SimpleVocabulary(( EXISTING_ PPA, EXISTING_PPA, _("Use an existing PPA")),
SimpleTerm(
SimpleTerm(
CREATE_NEW, CREATE_NEW, _("Create a new PPA for this recipe")),
))
183 + ppa_name = TextLine( name_validator,
184 + title=_("New PPA name"), required=False,
185 + constraint=
186 + description=_("A new PPA with this name will be created for "
187 + "the owner of the recipe ."))
The arguments here should be indented by one level from the declaration,
not two.
A couple of JS points that I'm not too worried about (but decided to
point out all the same):
444 + function set_enabled( field_id, is_enabled) { field_id) ;
445 + var field = Y.DOM.byId(
446 + field.disabled = !is_enabled;
447 + if (is_enabled && set_field_focus) field.focus();
448 + };
You don't need a semicolon here.
450 + module. onclick_ use_ppa = function(e) { dValue( 'input[ name=field. use_ppa] '); PPA_NAME_ ID, true); PPA_SELECTOR_ ID, false); PPA_NAME_ ID, false); PPA_SELECTOR_ ID, true);
451 + var value = getRadioSelecte
452 + if (value == 'create-new') {
453 + set_enabled(
454 + set_enabled(
455 + }
456 + else {
457 + set_enabled(
458 + set_enabled(
459 + }
460 + }
But technically you *do* need one here, since it's part of an
assignment. Ain't JS fun?