1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

unable non-required [text-setting]

This commit is contained in:
vincent 2022-06-08 10:35:53 +02:00 committed by Sylvain
parent 598973ea84
commit ed34279cef
3 changed files with 6 additions and 1 deletions

View File

@ -21,6 +21,10 @@ Application.Directives.directive('textSetting', ['Setting', 'growl', '_t',
if (typeof $scope.type === 'undefined') {
$scope.type = 'text';
}
// 'required' default to true
if (typeof $scope.required === 'undefined') {
$scope.required = true;
}
// The setting
$scope.setting = {
name: $scope.name,

View File

@ -29,6 +29,7 @@
<div class="col-md-6">
<text-setting name="twitter_name"
settings="allSettings"
required="false"
label="app.admin.settings.twitter_stream"
fa-icon="fa-twitter">
</text-setting>

View File

@ -10,7 +10,7 @@
id="setting-{{setting.name}}"
placeholder="{{placeholder}}"
ng-model="setting.value"
ng-required="true"
ng-required="required"
ng-minlength="minLength"
ng-maxlength="maxLength"
ng-trim="false"