UNPKG

unserver-unify

Version:

88 lines (86 loc) 3.43 kB
<div ng-controller="BlogEditCtrl as ctrl"> <div class="col-md-12"> <div class="alert alert-danger" ng-if="form.$invalid && submitted"> <div ng-if="form.title.$invalid && submitted"> {{ validStrings.title }} </div> <div ng-if="form.tab.$invalid && submitted"> {{ validStrings.tab }} </div> <div ng-if="form.content.$invalid && submitted"> {{ validStrings.content }} </div> </div> <form class="sky-form" name="form" ng-class='{"shake":shaking}'> <header> {{action | translate}} </header> <fieldset> <div class="row"> <section class="col-md-8 col-sm-8 col-xs-12" ng-class='{"has-error":form.title.$invalid && submitted}'> <label class="label"> <b> {{'Title' | translate}} </b> </label> <div class="input"> <i class="icon-append fa fa-header"> </i> <input focus-me="true" id="title" name="title" ng-minlength="1" ng-model="ctrl.topic.title" placeholder="{{'More than 10 Characters' | translate}}" required="" type="text"> </input> </div> </section> <section class="col-md-4 col-sm-5 col-xs-12" ng-if="options&&options.length>0"> <div ng-class='{"has-error":form.tab.$invalid && submitted}'> <label class="label" style="border:none;background-color:transparent"> <b> {{'Category' | translate}} </b> </label> <div class="input"> <i class="icon-append fa fa-tags"> </i> <select class="form-control" name="tab" ng-model="ctrl.topic.tab" required=""> <option disabled="" selected="" translate value=""> Category </option> <option ng-repeat="option in options" value="{{option}}"> {{option|translate}} </option> </select> </div> </div> </section> <section class="col-md-12 col-sm-12 col-xs-12 comment_top"> <label class="label"> <b> {{ {eng: 'Content', chn:'正文'} | trans}} </b> </label> <div class="textarea"> <i class="icon-append fa fa-comment"> </i> <div name="content" ng-model="ctrl.topic.content" text-angular=""> </div> </div> </section> </div> <span class="input-group-addon" style="border:none;background-color:transparent; text-align:left; padding-left:0;"> <input ng-model="ctrl.topic.allowcomment" type="checkbox"> {{ { eng :'Allow Reply for this Comment', chn : '是否允许跟贴'} | trans}} </input> </span> </fieldset> <footer> <button class="btn btn-u" ng-click="ctrl.submit()" type="submit"> {{ saveButtonTitle }} </button> <button class="btn btn-primary" ng-click="ctrl.uploadFile(ctrl.wikiImgSetting)" translate> Upload Image <i class="fa fa-picture-o"> </i> </button> </footer> </form> </div> </div>