Make lyrics optional

This commit is contained in:
Kelvin 2016-04-03 17:57:00 +01:00
parent 22a81e42e0
commit 327588aa6c
2 changed files with 1 additions and 5 deletions

View file

@ -74,10 +74,6 @@ class EditTrackCommand extends CommandBase
'album_id' => 'exists:albums,id'
];
if ($isVocal) {
$rules['lyrics'] = 'required';
}
if (isset($this->_input['track_type_id']) && $this->_input['track_type_id'] == 2) {
$rules['show_song_ids'] = 'required|exists:show_songs,id';
}

View file

@ -27,7 +27,7 @@
</div>
<div class="span6 form-row" ng-class="{'has-error': errors.lyrics != null}">
<label for="is_vocal" class="strong"><input ng-disabled="isSaving" ng-change="touchModel(); updateIsVocal()" id="is_vocal" type="checkbox" ng-model="track.is_vocal" /> Is Vocal</label>
<textarea ng-disabled="isSaving" ng-change="touchModel()" ng-show="track.is_vocal" ng-animate="'fade'" placeholder="Lyrics (required)" id="lyrics" ng-model="track.lyrics"></textarea>
<textarea ng-disabled="isSaving" ng-change="touchModel()" ng-show="track.is_vocal" ng-animate="'fade'" placeholder="Lyrics (optional)" id="lyrics" ng-model="track.lyrics"></textarea>
<div class="error">{{errors.lyrics}}</div>
</div>
</div>