Skip to content

Commit

Permalink
8.7. Пришёл, увидел, загрузил (часть 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
dashuulka committed May 26, 2024
1 parent c133365 commit 21fa4f5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/template/editing-form-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,19 @@ function createResetButtonTemplate({ type, isDisabled, isDeleting }) {
${isDisabled ? 'disabled' : ''}>${label}</button>`;
}

function createRollupButton(isDisabled) {
return `
<button class="event__rollup-btn" type="button" ${isDisabled ? 'disabled' : ''}>
<span class="visually-hidden">Open event</span>
</button>`;
}

function createControlsButtonsTemplate({ type, isSaving, isDeleting, isDisabled }) {
return `${createResetButtonTemplate(type)}
${type === EditingType.UPDATE ? createRollupBtn() : ''}
${type === EditingType.UPDATE ? createRollupButton() : ''}
${createSaveButtonTemplate({ isSaving, isDisabled })}
${createResetButtonTemplate({ type, isDeleting, isDisabled })}
${type === EditingType.UPDATE ? createRollupBtn(isDisabled) : ''}`;
${type === EditingType.UPDATE ? createRollupButton(isDisabled) : ''}`;
}

function createEditPointTemplate({state, pointDestinations, /* pointOffers */}) {
Expand Down

0 comments on commit 21fa4f5

Please sign in to comment.