View | Details | Raw Unified | Return to bug 25095 | Differences between
and this patch

Collapse All | Expand All

(-)management/univention-management-console-module-ucr/umc/js/ucr.js (-3 / +9 lines)
 Lines 77-83    Link Here 
77
				type: TextBox,
77
				type: TextBox,
78
				name: 'key',
78
				name: 'key',
79
				description: _( 'Name of UCR variable' ),
79
				description: _( 'Name of UCR variable' ),
80
				label: _( 'UCR variable' )
80
				label: _( 'UCR variable' ),
81
				invalidMessage: _( 'A valid key must contain at least one character and can only contain letters, numerals, and "/", ".", "_", "-".' ),
82
				validator: function (value, constraints) {
83
					return !!value && !/[^a-zA-Z0-9/._-]/.test(value);
84
				}
81
			}, {
85
			}, {
82
				type: TextBox,
86
				type: TextBox,
83
				name: 'value',
87
				name: 'value',
 Lines 105-112    Link Here 
105
				label: _( 'Save' ),
109
				label: _( 'Save' ),
106
				style: 'float: right',
110
				style: 'float: right',
107
				callback: lang.hitch(this, function() {
111
				callback: lang.hitch(this, function() {
108
					this._form.save();
112
					if (this._form.getWidget('key').isValid()) {
109
					this.hide();
113
						this._form.save();
114
						this.hide();
115
					}
110
				})
116
				})
111
			}, {
117
			}, {
112
				//FIXME: Should be much simpler. The key name should be enough
118
				//FIXME: Should be much simpler. The key name should be enough

Return to bug 25095